Skip to content
Snippets Groups Projects
Commit 465b6997 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added dendrogram plot

parent 5dc0f7a4
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,7 @@ object VcfStats extends ToolCommand {
// Reading vcf records
logger.info("Start reading vcf records")
var counter = 0
for (record <- reader) {
qualStats(record.getPhredScaledQual) = qualStats.getOrElse(record.getPhredScaledQual, 0) + 1
for (sample1 <- samples) {
......@@ -77,7 +78,10 @@ object VcfStats extends ToolCommand {
allelesOverlap(sample1)(sample2) = allelesOverlap(sample1)(sample2) + 1
}
}
counter += 1
if (counter % 100000 == 0) logger.info(counter + " variants done")
}
logger.info(counter + " variants done")
logger.info("Done reading vcf records")
plotXy(writeField("QUAL", qualStats.toMap))
......@@ -171,7 +175,8 @@ object VcfStats extends ToolCommand {
def plotHeatmap(file: File) {
executeRscript("plotHeatmap.R", Array(file.getAbsolutePath,
file.getAbsolutePath.stripSuffix(".tsv") + ".heatmap.png",
file.getAbsolutePath.stripSuffix(".tsv") + ".heatmap.clustering.png"))
file.getAbsolutePath.stripSuffix(".tsv") + ".heatmap.clustering.png",
file.getAbsolutePath.stripSuffix(".tsv") + ".heatmap.dendrogram.png"))
}
def plotXy(file: File) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment