aineniamh / snipit

snipit: summarise snps relative to your reference sequence
GNU General Public License v3.0
148 stars 28 forks source link

Coloring reference bases in --recombi-mode #28

Closed ktmeaton closed 11 months ago

ktmeaton commented 1 year ago

I'm currently working on integrating your visualization script into my recombination detection tools. I love the --recombi-mode option, but since the reference bases aren't colored, it can be difficult to see the breakpoints.

For example, this command produces the following visualization of XBF:

snipit XBF.fasta \
  --recombi-mode \
  --recombi-references BA.5.2,CJ.1 \
  --reference Reference \
  --flip-vertical \
  --format png \
  --solid-background

Alignment: XBF.fasta.zip (I've masked non-barcode positions for BA.5.2 and CJ.1)

recombination_BA 5 2_CJ 1

But I'd find it more useful if:

  1. The reference bases were also colored for each recombi-reference (ex. BA.5.2=blue, CJ.1=red)
  2. The recombi-references maybe had different saturation for reference versus mutations (ex. reference=light color, mutation = dark color)?

This is a mock-up of a color scheme I'm imagining. Which makes the genomic composition of XBF more clear, and the breakpoints easier to see.

image

I'm wondering if you'd also find value (or problems?) with this style of visualization? If you think it's worthwhile, I could experiment in a pull request to see what kind of code changes would be needed?

Thanks for developing this amazing visualizer!

ktmeaton commented 1 year ago

My "wish list" for this PR kept growing, to the point that it was outside the scope of this tool. I ended up writing a custom plotting script to achieve the desired effect, so please feel free to close this issue as "off-topic" 🙂

aineniamh commented 11 months ago

Hey @ktmeaton, coming to this far too late for it to be useful- I missed both of these (I must have notifications for this repo turned off by accident). Will close now, but glad you got what you needed! Sorry!