tseemann / snp-dists

Pairwise SNP distance matrix from a FASTA sequence alignment
GNU General Public License v3.0
126 stars 28 forks source link

Add option to report output directly in "molten" format? #37

Closed boasvdp closed 4 years ago

boasvdp commented 4 years ago

I find myself often using Python scripts to convert the SNP difference matrix to a "molten" format, such as that:

snp-dists 0.6.3 strain1 strain2
strain1 0 5
strain2 5 0

becomes

strain1 strain1 0
strain1 strain2 5
strain2 strain1 5
strain2 strain2 0

Or something along these lines.

Would this be useful for snp-dists? It is not a big issue putting the output through a script everytime but it might be a bit easier for looking up specific pairs.

kloetzl commented 4 years ago

Reminds me of this discussion for mash, just the other way round.

tseemann commented 4 years ago

@kloetzl lol - yes indeed!

@boasvdp this wasn't a difficult one, thanks for the idea. what tools uses molten format?

boasvdp commented 4 years ago

Great, thanks! I often find it easier for parsing the comparisons in my own scripts (e.g. SNP histograms) :-)