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

- output file for star

parent de498a26
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ class Star(private var globalConfig: Config) extends CommandLineFunction {
@Input(doc="Fastq file R2", shortName="R2", required=false) var R2: File = _
@Argument(doc="Output Directory", shortName="outputDir") var outputDir: String = _
@Argument(doc="GenomeDir", required=false) var genomeDir: String = _
if (genomeDir == null) genomeDir = config.getAsString("genomeDir", referenceFile.getParent + "/star")
if (genomeDir == null) genomeDir = config.getAsString("genomeDir", referenceFile.getParent + "/star/ref")
@Argument(doc="STAR runmode", shortName="runmode", required=false) var runmode: String = _
......@@ -30,7 +30,7 @@ class Star(private var globalConfig: Config) extends CommandLineFunction {
if (threads > maxThreads) threads = maxThreads
nCoresRequest = Option(threads)
@Output var outputSam: File = new File(outputDir + "/star_output.sam")
@Output var outputSam: File = new File(outputDir + "/Aligned.out.sam")
def commandLine : String= {
//init()
......
......@@ -91,7 +91,7 @@ class Gatk(private var globalConfig: Config) extends QScript {
//indel recal
val indelVariantRecalibrator = new VariantRecalibrator() with gatkArguments {
this.input +:= genotypeGVCFs.out
this.input +:= snpApplyRecalibration.out
this.nt = 4
this.memoryLimit = 2 * nt
this.recal_file = swapExt(genotypeGVCFs.out,".vcf",".indel.recal")
......@@ -104,10 +104,10 @@ class Gatk(private var globalConfig: Config) extends QScript {
add(indelVariantRecalibrator)
val indelApplyRecalibration = new ApplyRecalibration() with gatkArguments {
this.input +:= genotypeGVCFs.out
this.input +:= snpApplyRecalibration.out
this.recal_file = indelVariantRecalibrator.recal_file
this.tranches_file = indelVariantRecalibrator.tranches_file
this.out = swapExt(genotypeGVCFs.out,".vcf",".indel.recal.vcf")
this.out = swapExt(genotypeGVCFs.out,".recal.vcf",".indel.recal.vcf")
this.ts_filter_level = 99.0
this.mode = org.broadinstitute.sting.gatk.walkers.variantrecalibration.VariantRecalibratorArgumentCollection.Mode.INDEL
this.nt = 3
......@@ -115,14 +115,6 @@ class Gatk(private var globalConfig: Config) extends QScript {
if (scatterCount > 1) this.scatterCount = scatterCount
}
add(indelApplyRecalibration)
// merge snp and indels
val catVariants = new CatVariants() {
this.variant = Seq(snpApplyRecalibration.out,indelApplyRecalibration.out)
this.outputFile = swapExt(genotypeGVCFs.out,".vcf",".recal.vcf")
this.reference = referenceFile
}
add(catVariants)
} else logger.warn("No gVCFs to genotype")
......
......@@ -88,7 +88,7 @@ class Mapping(private var globalConfig: Config) extends QScript {
bamFile = addSortSam(List(bwaCommand.output), swapExt(outputDir,bwaCommand.output,".sam",".bam"), outputDir)
} else if (aligner == "star") {
val starCommand = new Star(config) { R1 = fastq_R1; if (paired) R2 = fastq_R2; this.outputDir = qscript.outputDir + "star/" ;
outputSam = new File(this.outputDir + "/star_output.sam") }
outputSam = new File(this.outputDir + "/Aligned.out.sam") }
add(starCommand)
bamFile = addAddOrReplaceReadGroups(List(starCommand.outputSam), swapExt(outputDir,starCommand.outputSam,".sam",".bam"), outputDir)
}
......
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