Skip to content
Snippets Groups Projects
Commit 05629c68 authored by bow's avatar bow
Browse files

Merge branch 'fix-samplenames_qiime' into 'develop'

Fix samplenames qiime

Samples in qiime may not contain `_`, this now get replaces to `-` for qiime only.

Also fixed small bug in vcfstats summary.

See merge request !380
parents e8000f2f 307e9c87
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,7 @@ class VcfStats(val root: Configurable) extends ToolCommandFunction with Summariz
Map("info" -> (for (
line <- Source.fromFile(generalStats).getLines().toList.tail;
values = line.split("\t") if values.size >= 2 && !values(0).isEmpty
) yield values(0) -> tryToParseNumber(values(1))
) yield values(0) -> tryToParseNumber(values(1)).getOrElse(None)
).toMap)
}
......@@ -102,7 +102,7 @@ class VcfStats(val root: Configurable) extends ToolCommandFunction with Summariz
for (s <- 1 until data(0).size) {
val sample = data(0)(s)
val stats = Map("genotype" -> (for (f <- 1 until data.length) yield {
data(f)(0) -> tryToParseNumber(data(f)(s))
data(f)(0) -> tryToParseNumber(data(f)(s)).getOrElse(None)
}).toMap)
val sum = new Summarizable {
......
......@@ -79,7 +79,7 @@ object VcfWithVcf extends ToolCommand {
logger.info("Init phase")
val argsParser = new OptParser
val commandArgs: Args = argsParser.parse(args, Args()) getOrElse(throw new IllegalArgumentException)
val commandArgs: Args = argsParser.parse(args, Args()) getOrElse (throw new IllegalArgumentException)
val reader = new VCFFileReader(commandArgs.inputFile)
val secondaryReader = new VCFFileReader(commandArgs.secondaryVcf)
......
......@@ -57,7 +57,7 @@ class GearsQiimeClosed(val root: Configurable) extends QScript with SummaryQScri
val splitLib = new SplitLibrariesFastq(this)
splitLib.input :+= fastqInput
splitLib.outputDir = new File(outputDir, "split_libraries_fastq")
sampleId.foreach(splitLib.sampleIds :+= _)
sampleId.foreach(splitLib.sampleIds :+= _.replaceAll("_", "-"))
add(splitLib)
val closedReference = new PickClosedReferenceOtus(this)
......
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