aineniamh / snipit

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

Option to sort sequences in output graphic by SNP count #6

Closed matt-sd-watson closed 3 years ago

matt-sd-watson commented 3 years ago

By default, snipit shows the sequences in the graphic by the order in which they appear in the alignment file. This PR adds the option to show the order of sequences by their relative number of SNPs to the reference. The idea here is to be able to loosely group and arrange sequences with similar SNP counts together without needing to know much about the sequences beforehand, potentially bringing identical or very similar sequences closer together for easier visual comparison. This option is disabled by default.

By default, the sequences with the highest SNPs will be shown next to the reference. The intuition is to have the sequences that need the most visual comparison (most number of SNPs) closest to the reference to aid the visual assessment. This can be changed by enabling the --high-to-low option, which puts the sequences(s) with the fewest SNPs next to the reference.

aineniamh commented 3 years ago

This is great! Thanks for contributing! 🎉