Commit bace55eb authored by Peter van 't Hof's avatar Peter van 't Hof

Added report to qiime open reference

parent 7657016c
......@@ -16,9 +16,9 @@ package nl.lumc.sasc.biopet.extensions.qiime
import java.io.File
import nl.lumc.sasc.biopet.core.{BiopetCommandLineFunction, Version}
import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version }
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Input, Output}
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
/**
* Created by pjvan_thof on 12/4/15.
......@@ -54,7 +54,7 @@ class PickOpenReferenceOtus(val root: Configurable) extends BiopetCommandLineFun
var minOtuSize: Option[Int] = config("min_otu_size")
var suppressAlignAndTree: Boolean = config("suppress_taxonomy_assignment", default = false)
def otuTable = new File(outputDir, "otu_table_mc2.biom")
def otuTable = new File(outputDir, "otu_table_mc2_w_tax.biom")
def failedOtuTable = new File(outputDir, "otu_table_mc2_w_tax_no_pynast_failures.biom")
def otuMap = new File(outputDir, "final_otu_map.txt")
......
......@@ -131,8 +131,8 @@ class Gears(val root: Configurable) extends QScript with MultiSampleQScript { qs
class Sample(sampleId: String) extends AbstractSample(sampleId) {
/**
* Factory method for Library class
*
* @param id SampleId
*
* @param id SampleId
* @return Sample class
*/
def makeLibrary(id: String): Library = new Library(id)
......@@ -224,6 +224,8 @@ class Gears(val root: Configurable) extends QScript with MultiSampleQScript { qs
/** File to put in the summary for thie pipeline */
def summaryFiles: Map[String, File] = (
qiimeOpenOtuTable.map("qiime_open_otu_table" -> _) ++
qiimeOpenOtuMap.map("qiime_open_otu_map" -> _) ++
qiimeClosedOtuTable.map("qiime_closed_otu_table" -> _) ++
qiimeClosedOtuMap.map("qiime_closed_otu_map" -> _)
).toMap
......
......@@ -88,4 +88,3 @@ class GearsQiimeOpen(val root: Configurable) extends QScript with SummaryQScript
}
}
......@@ -40,6 +40,9 @@ object GearsReport extends MultisampleReportBuilder {
val krakenExecuted = summary.getSampleValues("gearskraken", "stats", "krakenreport").values.forall(_.isDefined)
val qiimeClosesOtuTable = summary.getValue("gears", "files", "pipeline", "qiime_closed_otu_table", "path")
.map(x => new File(x.toString))
val qiimeOpenOtuTable = summary.getValue("gears", "files", "pipeline", "qiime_open_otu_table", "path")
.map(x => new File(x.toString))
ReportPage(
(if (krakenExecuted) List("Kraken analysis" -> ReportPage(List(), List(
......@@ -48,6 +51,9 @@ object GearsReport extends MultisampleReportBuilder {
else Nil) ::: (if (qiimeClosesOtuTable.isDefined) List("Qiime closed reference analysis" -> ReportPage(List(), List(
"Krona plot" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp"
)), Map("biomFile" -> qiimeClosesOtuTable.get)))
else Nil) ::: (if (qiimeOpenOtuTable.isDefined) List("Qiime open reference analysis" -> ReportPage(List(), List(
"Krona plot" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp"
)), Map("biomFile" -> qiimeOpenOtuTable.get)))
else Nil) ::: List("Samples" -> generateSamplesPage(pageArgs)) ++
Map(
"Versions" -> ReportPage(List(), List(
......@@ -71,6 +77,8 @@ object GearsReport extends MultisampleReportBuilder {
val krakenExecuted = summary.getValue(Some(sampleId), None, "gearskraken", "stats", "krakenreport").isDefined
val qiimeClosesOtuTable = summary.getValue(Some(sampleId), None, "gearsqiimeclosed", "files", "pipeline", "otu_table", "path")
.map(x => new File(x.toString))
val qiimeOpenOtuTable = summary.getValue(Some(sampleId), None, "gearsqiimeopen", "files", "pipeline", "otu_table", "path")
.map(x => new File(x.toString))
ReportPage((if (krakenExecuted) List("Kraken" -> ReportPage(List(), List(
"Kraken analysis" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
......@@ -78,6 +86,9 @@ object GearsReport extends MultisampleReportBuilder {
else Nil) ::: (if (qiimeClosesOtuTable.isDefined) List("Qiime closed reference analysis" -> ReportPage(List(), List(
"Krona plot" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp"
)), Map("biomFile" -> qiimeClosesOtuTable.get)))
else Nil) ::: (if (qiimeOpenOtuTable.isDefined) List("Qiime open reference analysis" -> ReportPage(List(), List(
"Krona plot" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp"
)), Map("biomFile" -> qiimeOpenOtuTable.get)))
else Nil) ::: List(
"Libraries" -> generateLibraryPage(args)
), List("QC reads" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"),
......@@ -91,6 +102,8 @@ object GearsReport extends MultisampleReportBuilder {
val krakenExecuted = summary.getValue(Some(sampleId), Some(libId), "gearskraken", "stats", "krakenreport").isDefined
val qiimeClosesOtuTable = summary.getValue(Some(sampleId), Some(libId), "gearsqiimeclosed", "files", "pipeline", "otu_table", "path")
.map(x => new File(x.toString))
val qiimeOpenOtuTable = summary.getValue(Some(sampleId), Some(libId), "gearsqiimeopen", "files", "pipeline", "otu_table", "path")
.map(x => new File(x.toString))
ReportPage(
(if (flexiprepExecuted) List("QC" -> FlexiprepReport.flexiprepPage) else Nil
......@@ -100,6 +113,9 @@ object GearsReport extends MultisampleReportBuilder {
else Nil) ::: (if (qiimeClosesOtuTable.isDefined) List("Qiime closed reference analysis" -> ReportPage(List(), List(
"Krona plot" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp"
)), Map("biomFile" -> qiimeClosesOtuTable.get)))
else Nil) ::: (if (qiimeOpenOtuTable.isDefined) List("Qiime open reference analysis" -> ReportPage(List(), List(
"Krona plot" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/qiimeKrona.ssp"
)), Map("biomFile" -> qiimeOpenOtuTable.get)))
else Nil), List(
"QC reads" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"),
"QC bases" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp")
......
Markdown is supported
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