harrispopgen / mutyper

Ancestral k-mer mutation types for SNP data
https://harrispopgen.github.io/mutyper/
MIT License
7 stars 3 forks source link

population mutation spectra? #8

Closed goldmich closed 4 years ago

goldmich commented 4 years ago

Would be awesome to output the mutation spectrum for a group of individuals - effectively colsums of a ksfs, i.e. input data for the Harris & Pritchard 2017 heatmaps. Thanks!

wsdewitt commented 4 years ago

@goldmich Here's a workaround to get this on the command line:

mutyper variants <fasta> <vcf> | mutyper ksfs - | cut -f2- | awk 'NR==1{print $0} {for (i=1;i<=NF;i++) sum[i]+=$i} END{for (i in sum) printf sum[i] "\t"; print }'

Explanation:

wsdewitt commented 4 years ago

closed in 17d82cf