Commit 9c0409f6 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Change name

parent 11a6c2db
......@@ -211,6 +211,7 @@ object VcfStats extends ToolCommand {
val usedAlleles = (for (allele <- genotype.getAlleles) yield record.getAlleleIndex(allele)).toList
addToBuffer("general", "Total")
if (genotype.isHet) addToBuffer("general", "Het")
if (genotype.isHetNonRef) addToBuffer("general", "HetNonRef")
if (genotype.isHom) addToBuffer("general", "Hom")
......@@ -243,7 +244,7 @@ object VcfStats extends ToolCommand {
val file = new File(prefix + field + ".tsv")
file.getParentFile.mkdirs()
val writer = new PrintWriter(file)
writer.println(samples.mkString("\t", "\t", ""))
writer.println(samples.mkString(field+"\t", "\t", ""))
val keySet = (for (sample <- samples) yield stats.samplesStats(sample).genotypeStats.getOrElse(field, Map[Any, Int]()).keySet).fold(Set[Any]())(_ ++ _)
for (key <- keySet.toList.sortWith(sortAnyAny(_, _))) {
val values = for (sample <- samples) yield stats.samplesStats(sample).genotypeStats.getOrElse(field, Map[Any, Int]()).getOrElse(key, 0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment