Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
e27fdd9e
Commit
e27fdd9e
authored
Jul 01, 2016
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added variantcalling and summary testing
parent
a5f383c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/Gentrap.scala
...scala/nl/lumc/sasc/biopet/pipelines/gentrap/Gentrap.scala
+1
-1
gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala
...a/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala
+16
-2
No files found.
gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/Gentrap.scala
View file @
e27fdd9e
...
...
@@ -253,7 +253,7 @@ object Gentrap extends PipelineCommand {
}
/** Converts string with underscores into camel-case strings */
private
def
camelize
(
ustring
:
String
)
:
String
=
ustring
private
[
gentrap
]
def
camelize
(
ustring
:
String
)
:
String
=
ustring
.
split
(
"_"
)
.
map
(
_
.
toLowerCase
.
capitalize
)
.
mkString
(
""
)
...
...
gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala
View file @
e27fdd9e
...
...
@@ -48,6 +48,7 @@ abstract class GentrapTestAbstract(val expressionMeasures: List[String]) extends
def
removeRiboReads
:
Option
[
Boolean
]
=
Some
(
false
)
def
sample1
:
Boolean
=
true
def
sample2
:
Boolean
=
true
def
callVariants
:
Option
[
Boolean
]
=
None
@DataProvider
(
name
=
"expMeasuresstrandProtocol"
)
def
expMeasuresStrandProtocolProvider
=
{
...
...
@@ -66,7 +67,8 @@ abstract class GentrapTestAbstract(val expressionMeasures: List[String]) extends
"strand_protocol"
->
strandProtocol
)
++
aligner
.
map
(
"aligner"
->
_
)
++
removeRiboReads
.
map
(
"remove_ribosomal_reads"
->
_
)
removeRiboReads
.
map
(
"remove_ribosomal_reads"
->
_
)
++
callVariants
.
map
(
"call_variants"
->
_
)
val
configs
:
List
[
Option
[
Map
[
String
,
Any
]]]
=
List
(
Some
(
settings
),
(
if
(
sample1
)
Some
(
GentrapTest
.
sample1
)
else
None
),
(
if
(
sample2
)
Some
(
GentrapTest
.
sample2
)
else
None
))
val
config
=
configs
.
flatten
.
foldLeft
(
GentrapTest
.
executables
)((
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
,
b
))
val
gentrap
:
Gentrap
=
initPipeline
(
config
)
...
...
@@ -92,6 +94,14 @@ abstract class GentrapTestAbstract(val expressionMeasures: List[String]) extends
case
f
=>
List
(
f
)
}.
groupBy
(
_
.
getClass
)
gentrap
.
shivaVariantcalling
.
isDefined
shouldBe
callVariants
.
getOrElse
(
false
)
gentrap
.
summarySettings
.
getOrElse
(
"expression_measures"
,
List
()).
asInstanceOf
[
List
[
String
]].
sorted
shouldBe
expressionMeasures
.
map
(
Gentrap
.
camelize
(
_
)).
sorted
gentrap
.
summarySettings
.
get
(
"call_variants"
)
shouldBe
Some
(
callVariants
.
getOrElse
(
false
))
gentrap
.
summarySettings
.
get
(
"remove_ribosomal_reads"
)
shouldBe
Some
(
removeRiboReads
.
getOrElse
(
false
))
gentrap
.
summarySettings
.
get
(
"strand_protocol"
)
shouldBe
Some
(
Gentrap
.
camelize
(
strandProtocol
))
if
(
expressionMeasures
.
contains
(
"fragments_per_gene"
))
assert
(
gentrap
.
functions
.
exists
(
_
.
isInstanceOf
[
HtseqCount
]))
...
...
@@ -150,6 +160,9 @@ class GentrapNoSamplesTest extends GentrapTestAbstract(List("fragments_per_gene"
class
GentrapRemoveRibosomeTest
extends
GentrapTestAbstract
(
List
(
"fragments_per_gene"
))
{
override
def
removeRiboReads
=
Some
(
true
)
}
class
GentrapCallVariantsTest
extends
GentrapTestAbstract
(
List
(
"fragments_per_gene"
))
{
override
def
callVariants
=
Some
(
true
)
}
object
GentrapTest
{
val
outputDir
=
Files
.
createTempDir
()
...
...
@@ -180,7 +193,8 @@ object GentrapTest {
"annotation_refflat"
->
(
outputDir
+
File
.
separator
+
"ref.fa"
),
"ribosome_refflat"
->
(
outputDir
+
File
.
separator
+
"ref.fa"
),
"varscan_jar"
->
"test"
,
"rscript"
->
Map
(
"exe"
->
"test"
)
"rscript"
->
Map
(
"exe"
->
"test"
),
"gatk_jar"
->
"test"
)
++
Seq
(
// fastqc executables
"fastqc"
,
"seqtk"
,
"sickle"
,
"cutadapt"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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