Skip to content
Snippets Groups Projects
Commit 480684fb authored by Sander Bollen's avatar Sander Bollen
Browse files

> 85% class coverage for BastyGenerateFasta

parent d50b72d0
No related branches found
No related tags found
No related merge requests found
......@@ -172,9 +172,12 @@ object BastyGenerateFasta extends ToolCommand {
if (cmdArgs.outputConsensus != null || cmdArgs.outputConsensusVariants != null) {
writeConsensus()
}
//FIXME: what to do if outputcConsensus is set, but not outputConsensusVariants (and vice versa)?
}
protected def writeConsensus() {
//FIXME: preferably split this up in functions, so that they can be unit tested
val referenceFile = new IndexedFastaSequenceFile(cmdArgs.reference)
val referenceDict = referenceFile.getSequenceDictionary
......
......@@ -47,6 +47,15 @@ class BastyGenerateFastaTest extends TestNGSuite with MockitoSugar with Matchers
main(arguments)
}
@Test def testMainVcfAndBamMore = {
val tmp = File.createTempFile("basty_out", ".fa")
val tmppath = tmp.getAbsolutePath
tmp.deleteOnExit()
val arguments = Array("-V", chrQ_path, "--outputConsensus", tmppath, "--outputConsensusVariants", tmppath, "--bamFile", bam_path, "--sampleName", "Child_7006504", "--reference", chrQRef_path, "--outputName", "test")
main(arguments)
}
@Test def testGetMaxAllele = {
val reader = new VCFFileReader(vepped, false)
val record = reader.iterator().next()
......
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