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

Convert more to biopet values

parent 622b7500
......@@ -22,64 +22,54 @@ class PrintReads(val root: Configurable) extends CommandLineGATK with ScatterGat
@Gather(classOf[BamGatherFunction])
var out: File = _
/** Automatically generated index for out */
@Output(fullName = "outIndex", shortName = "", doc = "Automatically generated index for out", required = false, exclusiveOf = "", validation = "")
@Gather(enabled = false)
private var outIndex: File = _
/** Automatically generated md5 for out */
@Output(fullName = "outMD5", shortName = "", doc = "Automatically generated md5 for out", required = false, exclusiveOf = "", validation = "")
@Gather(enabled = false)
private var outMD5: File = _
/** Exclude all reads with this read group from the output */
@Argument(fullName = "readGroup", shortName = "readGroup", doc = "Exclude all reads with this read group from the output", required = false, exclusiveOf = "", validation = "")
var readGroup: String = _
var readGroup: Option[String] = config("readGroup", default = false)
/** Exclude all reads with this platform from the output */
@Argument(fullName = "platform", shortName = "platform", doc = "Exclude all reads with this platform from the output", required = false, exclusiveOf = "", validation = "")
var platform: String = _
var platform: Option[String] = config("platform")
/** Print the first n reads from the file, discarding the rest */
@Argument(fullName = "number", shortName = "n", doc = "Print the first n reads from the file, discarding the rest", required = false, exclusiveOf = "", validation = "")
var number: Option[Int] = None
var number: Option[Int] = config("number")
/** File containing a list of samples (one per line). Can be specified multiple times */
@Argument(fullName = "sample_file", shortName = "sf", doc = "File containing a list of samples (one per line). Can be specified multiple times", required = false, exclusiveOf = "", validation = "")
var sample_file: Seq[File] = Nil
var sample_file: List[File] = config("sample_file", default = Nil)
/** Sample name to be included in the analysis. Can be specified multiple times. */
@Argument(fullName = "sample_name", shortName = "sn", doc = "Sample name to be included in the analysis. Can be specified multiple times.", required = false, exclusiveOf = "", validation = "")
var sample_name: Seq[String] = Nil
var sample_name: List[String] = config("sample_name", default = Nil)
/** Simplify all reads */
@Argument(fullName = "simplify", shortName = "s", doc = "Simplify all reads", required = false, exclusiveOf = "", validation = "")
var simplify: Boolean = _
var simplify: Boolean = config("simplify", default = false)
/** Don't output a program tag */
@Argument(fullName = "no_pg_tag", shortName = "npt", doc = "Don't output a program tag", required = false, exclusiveOf = "", validation = "")
var no_pg_tag: Boolean = _
var no_pg_tag: Boolean = config("no_pg_tag", default = false)
/** Filter out reads with CIGAR containing the N operator, instead of failing with an error */
@Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_reads_with_N_cigar: Boolean = _
var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false)
/** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */
@Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_mismatching_base_and_quals: Boolean = _
var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false)
/** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = _
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out))
if (!disable_bam_indexing)
outIndex = new File(out.getPath.stripSuffix(".bam") + ".bai")
outputFiles :+= new File(out.getPath.stripSuffix(".bam") + ".bai")
if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out))
if (generate_md5)
outMD5 = new File(out.getPath + ".md5")
outputFiles :+= new File(out.getPath + ".md5")
}
override def cmdLine = super.cmdLine +
......
......@@ -116,14 +116,14 @@ class Shiva(val root: Configurable) extends QScript with ShivaTrait {
if (config("use_analyze_covariates", default = false).asBoolean) {
val baseRecalibratorAfter = BaseRecalibrator(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal.after"))
baseRecalibratorAfter.BQSR = baseRecalibrator.out
baseRecalibratorAfter.BQSR = Some(baseRecalibrator.out)
add(baseRecalibratorAfter)
add(AnalyzeCovariates(this, baseRecalibrator.out, baseRecalibratorAfter.out, swapExt(dir, inputBam, ".bam", ".baserecal.pdf")))
}
val printReads = PrintReads(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal.bam"))
printReads.BQSR = baseRecalibrator.out
printReads.BQSR = Some(baseRecalibrator.out)
printReads.isIntermediate = isIntermediate
add(printReads)
......
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