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

Change some options

parent fd8a4043
No related branches found
No related tags found
No related merge requests found
...@@ -36,11 +36,8 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript { ...@@ -36,11 +36,8 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
def this() = this(null) def this() = this(null)
var countBed: Option[File] = config("count_bed") var countBed: Option[File] = config("count_bed")
var squishedCountBed: File = _
var squishedCountBed: Option[File] = config("squished_count_bed")
var transcriptome: Option[File] = config("transcriptome") var transcriptome: Option[File] = config("transcriptome")
var tagsLibrary: Option[File] = config("tags_library") var tagsLibrary: Option[File] = config("tags_library")
override def defaults = ConfigUtils.mergeMaps(Map("bowtie" -> Map( override def defaults = ConfigUtils.mergeMaps(Map("bowtie" -> Map(
...@@ -129,16 +126,14 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript { ...@@ -129,16 +126,14 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
if (!outputDir.endsWith("/")) outputDir += "/" if (!outputDir.endsWith("/")) outputDir += "/"
if (transcriptome.isEmpty && tagsLibrary.isEmpty) if (transcriptome.isEmpty && tagsLibrary.isEmpty)
throw new IllegalStateException("No transcriptome or taglib found") throw new IllegalStateException("No transcriptome or taglib found")
if (countBed.isEmpty && squishedCountBed.isEmpty) if (countBed.isEmpty)
throw new IllegalStateException("No bedfile supplied, please add a countBed or squishedCountBed") throw new IllegalStateException("No bedfile supplied, please add a countBed")
} }
def biopetScript() { def biopetScript() {
if (squishedCountBed.isEmpty) { val squishBed = SquishBed(this, countBed.get, outputDir)
val squishBed = SquishBed(this, countBed.get, outputDir) add(squishBed)
add(squishBed) squishedCountBed = squishBed.output
squishedCountBed = Some(squishBed.output)
}
if (tagsLibrary.isEmpty) { if (tagsLibrary.isEmpty) {
val cdl = new SageCreateLibrary(this) val cdl = new SageCreateLibrary(this)
...@@ -158,19 +153,19 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript { ...@@ -158,19 +153,19 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
} }
def addBedtoolsCounts(bamFile: File, outputPrefix: String, outputDir: String) { def addBedtoolsCounts(bamFile: File, outputPrefix: String, outputDir: String) {
val bedtoolsSense = BedtoolsCoverage(this, bamFile, squishedCountBed.get, outputDir + outputPrefix + ".genome.sense.coverage", val bedtoolsSense = BedtoolsCoverage(this, bamFile, squishedCountBed, outputDir + outputPrefix + ".genome.sense.coverage",
depth = false, sameStrand = true, diffStrand = false) depth = false, sameStrand = true, diffStrand = false)
val countSense = new BedtoolsCoverageToCounts(this) val countSense = new BedtoolsCoverageToCounts(this)
countSense.input = bedtoolsSense.output countSense.input = bedtoolsSense.output
countSense.output = outputDir + outputPrefix + ".genome.sense.counts" countSense.output = outputDir + outputPrefix + ".genome.sense.counts"
val bedtoolsAntisense = BedtoolsCoverage(this, bamFile, squishedCountBed.get, outputDir + outputPrefix + ".genome.antisense.coverage", val bedtoolsAntisense = BedtoolsCoverage(this, bamFile, squishedCountBed, outputDir + outputPrefix + ".genome.antisense.coverage",
depth = false, sameStrand = false, diffStrand = true) depth = false, sameStrand = false, diffStrand = true)
val countAntisense = new BedtoolsCoverageToCounts(this) val countAntisense = new BedtoolsCoverageToCounts(this)
countAntisense.input = bedtoolsAntisense.output countAntisense.input = bedtoolsAntisense.output
countAntisense.output = outputDir + outputPrefix + ".genome.antisense.counts" countAntisense.output = outputDir + outputPrefix + ".genome.antisense.counts"
val bedtools = BedtoolsCoverage(this, bamFile, squishedCountBed.get, outputDir + outputPrefix + ".genome.coverage", val bedtools = BedtoolsCoverage(this, bamFile, squishedCountBed, outputDir + outputPrefix + ".genome.coverage",
depth = false, sameStrand = false, diffStrand = false) depth = false, sameStrand = false, diffStrand = false)
val count = new BedtoolsCoverageToCounts(this) val count = new BedtoolsCoverageToCounts(this)
count.input = bedtools.output count.input = bedtools.output
......
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