Commit 07d1825f authored by Sander Bollen's avatar Sander Bollen

had to add mockito to biopet extensions pom

parent e7237458
......@@ -29,6 +29,13 @@
<version>2.2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -53,10 +53,10 @@ class BcftoolsView(val root: Configurable) extends Bcftools {
var sampleFile: File = _
@Argument(doc = "minimum allele count")
var minAC: Int = _
var minAC: Option[Int] = _
@Argument(doc = "max allele count")
var maxAC: Int = _
var maxAC: Option[Int] = _
@Argument(doc = "exclude (expression)")
var exclude: String = _
......@@ -74,10 +74,10 @@ class BcftoolsView(val root: Configurable) extends Bcftools {
var known: Boolean = false
@Argument(doc = "min alleles")
var minAlleles: Int = _
var minAlleles: Option[Int] = _
@Argument(doc = "max alleles")
var maxAlleles: Int = _
var maxAlleles: Option[Int] = _
@Argument(doc = "novel (ID field is .) only")
var novel: Boolean = false
......@@ -89,10 +89,10 @@ class BcftoolsView(val root: Configurable) extends Bcftools {
var excludePhased: Boolean = false
@Argument(doc = "min allele frequency")
var minAF: Int = _
var minAF: Option[Int] = _
@Argument(doc = "max allele frequency")
var maxAF: Int = _
var maxAF: Option[Int] = _
@Argument(doc = "uncalled only")
var uncalled: Boolean = false
......@@ -123,7 +123,7 @@ class BcftoolsView(val root: Configurable) extends Bcftools {
}
def baseCmd = {
executable + conditional(dropGenotype, "-G") + conditional(headerOnly, "-h") +
executable + " view " + conditional(dropGenotype, "-G") + conditional(headerOnly, "-h") +
required("-l", compressionLevel) + required("-O", outputType) +
optional("-r", regions) + optional("-R", regionFile) +
optional("-t", targets) + optional("-T", targetFile) +
......@@ -153,4 +153,14 @@ class BcftoolsView(val root: Configurable) extends Bcftools {
baseCmd + required("-o", output) + required(input)
}
/**
* Convert cmdLine into line without quotes and double spaces
* primarily for testing
* @return
*/
final def cmd = {
val a = cmdLine
a.replace("'", "").replace(" ", " ").trim
}
}
......@@ -11,7 +11,7 @@ import org.testng.annotations.Test
/**
* Created by ahbbollen on 12-10-15.
*/
class BcfToolsTest extends TestNGSuite with MockitoSugar with Matchers {
class BcfToolsTest extends TestNGSuite with Matchers with MockitoSugar {
@Test
def BcfToolsViewTest = {
......@@ -29,7 +29,7 @@ class BcfToolsTest extends TestNGSuite with MockitoSugar with Matchers {
view.input = tmpInput
view.output = tmpOutput
// view.cmdLine should equal(s"bcftools -o $outputPath $inputPath}")
view.cmd should equal(s"bcftools view -l 9 -O z -o $outputPath $inputPath")
}
}
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