Closed goldmich closed 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:
cut
command removes the sample_frequency column from the ksfs
outputawk
command prints the mutation types, then the ksfs
row sums for eachclosed in 17d82cf
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!