Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
074d8d3b
Commit
074d8d3b
authored
Nov 10, 2016
by
Peter van 't Hof
Browse files
Fixed unit tests
parent
8ad8f6c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleTest.scala
View file @
074d8d3b
...
...
@@ -17,7 +17,7 @@ package nl.lumc.sasc.biopet.pipelines.gears
import
java.io.File
import
com.google.common.io.Files
import
nl.lumc.sasc.biopet.core.Biopet
Pipe
import
nl.lumc.sasc.biopet.core.Biopet
CommandLineFunction
import
nl.lumc.sasc.biopet.extensions.centrifuge.
{
Centrifuge
,
CentrifugeKreport
}
import
nl.lumc.sasc.biopet.extensions.kraken.
{
Kraken
,
KrakenReport
}
import
nl.lumc.sasc.biopet.extensions.picard.SamToFastq
...
...
@@ -106,7 +106,8 @@ abstract class TestGearsSingle extends TestNGSuite with Matchers {
gears
.
outputName
shouldBe
(
if
(
inputMode
==
Some
(
"bam"
))
"bamfile"
else
"R1"
)
}
val
pipesJobs
=
gears
.
functions
.
filter
(
_
.
isInstanceOf
[
BiopetPipe
]).
flatMap
(
_
.
asInstanceOf
[
BiopetPipe
].
pipesJobs
)
val
pipesJobs
=
gears
.
functions
.
filter
(
_
.
isInstanceOf
[
BiopetCommandLineFunction
])
.
flatMap
(
_
.
asInstanceOf
[
BiopetCommandLineFunction
].
pipesJobs
)
gears
.
summarySettings
(
"gears_use_kraken"
)
shouldBe
kraken
.
getOrElse
(
false
)
gears
.
summarySettings
(
"gear_use_qiime_rtax"
)
shouldBe
qiimeRtax
...
...
mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala
View file @
074d8d3b
...
...
@@ -14,10 +14,10 @@
*/
package
nl.lumc.sasc.biopet.pipelines.mapping
import
java.io.
{
File
,
FileOutputStream
}
import
java.io.
{
File
,
FileOutputStream
}
import
com.google.common.io.Files
import
nl.lumc.sasc.biopet.core.Biopet
Pipe
import
nl.lumc.sasc.biopet.core.Biopet
CommandLineFunction
import
nl.lumc.sasc.biopet.extensions.centrifuge.Centrifuge
import
nl.lumc.sasc.biopet.pipelines.flexiprep.Fastqc
import
nl.lumc.sasc.biopet.utils.ConfigUtils
...
...
@@ -86,7 +86,8 @@ abstract class AbstractTestMapping(val aligner: String) extends TestNGSuite with
mapping
.
libId
=
Some
(
"1"
)
mapping
.
script
()
val
pipesJobs
=
mapping
.
functions
.
filter
(
_
.
isInstanceOf
[
BiopetPipe
]).
flatMap
(
_
.
asInstanceOf
[
BiopetPipe
].
pipesJobs
)
val
pipesJobs
=
mapping
.
functions
.
filter
(
_
.
isInstanceOf
[
BiopetCommandLineFunction
])
.
flatMap
(
_
.
asInstanceOf
[
BiopetCommandLineFunction
].
pipesJobs
)
//Flexiprep
mapping
.
functions
.
count
(
_
.
isInstanceOf
[
Fastqc
])
shouldBe
(
if
(
skipFlexiprep
)
0
else
if
(
paired
)
4
else
2
)
...
...
mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingTest.scala
View file @
074d8d3b
...
...
@@ -14,13 +14,13 @@
*/
package
nl.lumc.sasc.biopet.pipelines.mapping
import
java.io.
{
File
,
FileOutputStream
}
import
java.io.
{
File
,
FileOutputStream
}
import
com.google.common.io.Files
import
nl.lumc.sasc.biopet.core.Biopet
Pipe
import
nl.lumc.sasc.biopet.core.Biopet
CommandLineFunction
import
nl.lumc.sasc.biopet.extensions.centrifuge.Centrifuge
import
nl.lumc.sasc.biopet.extensions.picard.
{
MarkDuplicates
,
MergeSamFiles
}
import
nl.lumc.sasc.biopet.utils.
{
ConfigUtils
,
Logging
}
import
nl.lumc.sasc.biopet.utils.
{
ConfigUtils
,
Logging
}
import
nl.lumc.sasc.biopet.utils.config.Config
import
org.broadinstitute.gatk.queue.QSettings
import
org.scalatest.Matchers
...
...
@@ -88,7 +88,8 @@ trait MultisampleMappingTestTrait extends TestNGSuite with Matchers {
val
numberFastqLibs
=
(
if
(
sample1
)
1
else
0
)
+
(
if
(
sample2
)
2
else
0
)
+
(
if
(
sample3
&&
bamToFastq
)
1
else
0
)
+
(
if
(
sample4
&&
bamToFastq
)
1
else
0
)
val
numberSamples
=
(
if
(
sample1
)
1
else
0
)
+
(
if
(
sample2
)
1
else
0
)
val
pipesJobs
=
pipeline
.
functions
.
filter
(
_
.
isInstanceOf
[
BiopetPipe
]).
flatMap
(
_
.
asInstanceOf
[
BiopetPipe
].
pipesJobs
)
val
pipesJobs
=
pipeline
.
functions
.
filter
(
_
.
isInstanceOf
[
BiopetCommandLineFunction
])
.
flatMap
(
_
.
asInstanceOf
[
BiopetCommandLineFunction
].
pipesJobs
)
import
MultisampleMapping.MergeStrategy
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
MarkDuplicates
])
shouldBe
(
numberFastqLibs
+
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment