Commit 54b82548 authored by Peter van 't Hof's avatar Peter van 't Hof

Typos

parent 3c677903
......@@ -62,7 +62,7 @@ object VcfFilter extends ToolCommand {
filterHetVarToHomVar: List[(String, String)] = Nil,
iDset: Set[String] = Set(),
minGenomeQuality: Int = 0,
advanceGroups: List[List[String]] = Nil)
advancedGroups: List[List[String]] = Nil)
class OptParser extends AbstractOptParser[Args](commandName) {
opt[File]('I', "inputVcf") required () maxOccurs 1 valueName "<file>" action { (x, c) =>
......@@ -154,8 +154,8 @@ object VcfFilter extends ToolCommand {
opt[Int]("minGenomeQuality") unbounded () action { (x, c) =>
c.copy(minGenomeQuality = x)
}
opt[String]("advanceGroups") unbounded () action { (x, c) =>
c.copy(advanceGroups = x.split(",").toList :: c.advanceGroups)
opt[String]("advancedGroups") unbounded () action { (x, c) =>
c.copy(advancedGroups = x.split(",").toList :: c.advancedGroups)
} text "All members of groups sprated with a ','"
}
......@@ -209,7 +209,7 @@ object VcfFilter extends ToolCommand {
denovoTrio(record, cmdArgs.trioLossOfHet, onlyLossHet = true) &&
resToDom(record, cmdArgs.resToDom) &&
trioCompound(record, cmdArgs.trioCompound) &&
advanceGroupFilter(record, cmdArgs.advanceGroups) &&
advanceGroupFilter(record, cmdArgs.advancedGroups) &&
(cmdArgs.iDset.isEmpty || inIdSet(record, cmdArgs.iDset))) {
writer.add(record)
counterLeft += 1
......@@ -454,7 +454,7 @@ object VcfFilter extends ToolCommand {
* returns true when for all groups all or none members have a variants,
* records with partial groups are discarded
*/
def advanceGroupFilter(record: VariantContext, groups: List[List[String]]): Boolean = {
def advancedGroupFilter(record: VariantContext, groups: List[List[String]]): Boolean = {
val samples = record.getGenotypes
.map(a => a.getSampleName -> (a.isHomRef || a.isNoCall || VcfUtils.isCompoundNoCall(a)))
.toMap
......
......@@ -261,17 +261,17 @@ class VcfFilterTest extends TestNGSuite with MockitoSugar with Matchers {
inIdSet(record, Set("dummy")) shouldBe false
}
@Test def testAdvanceGroup(): Unit = {
@Test def testAdvancedGroup(): Unit = {
val reader = new VCFFileReader(vepped, false)
val record = reader.iterator().next()
advanceGroupFilter(record, Nil) shouldBe true
advanceGroupFilter(record, List(List("Sample_101", "Sample_102"))) shouldBe true
advanceGroupFilter(record, List(List("Sample_102", "Sample_103"))) shouldBe false
advanceGroupFilter(
advancedGroupFilter(record, Nil) shouldBe true
advancedGroupFilter(record, List(List("Sample_101", "Sample_102"))) shouldBe true
advancedGroupFilter(record, List(List("Sample_102", "Sample_103"))) shouldBe false
advancedGroupFilter(
record,
List(List("Sample_102", "Sample_103"), List("Sample_101", "Sample_102"))) shouldBe false
advanceGroupFilter(record, List(List("Sample_102"), List("Sample_101", "Sample_102"))) shouldBe true
advancedGroupFilter(record, List(List("Sample_102"), List("Sample_101", "Sample_102"))) shouldBe true
}
}
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