Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
adf2e18f
Commit
adf2e18f
authored
9 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Fixed gentrap tests
parent
319f9274
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala
+16
-42
16 additions, 42 deletions
...a/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala
with
16 additions
and
42 deletions
public/gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala
+
16
−
42
View file @
adf2e18f
...
...
@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.pipelines.gentrap
import
java.io.
{
File
,
FileOutputStream
}
import
com.google.common.io.Files
import
nl.lumc.sasc.biopet.extensions.tools.BaseCounter
import
nl.lumc.sasc.biopet.utils.config.Config
import
nl.lumc.sasc.biopet.extensions._
import
nl.lumc.sasc.biopet.extensions.gmap.Gsnap
...
...
@@ -72,7 +73,7 @@ abstract class GentrapTestAbstract(val expressionMeasure: String) extends TestNG
)
val
validExpressionMeasures
=
Set
(
"fragments_per_gene"
,
"fragments_per_exon"
,
"base
s_per_gene"
,
"bases_per_exon
"
,
"fragments_per_gene"
,
"fragments_per_exon"
,
"base
_counts
"
,
"cufflinks_strict"
,
"cufflinks_guided"
,
"cufflinks_blind"
)
@DataProvider
(
name
=
"expMeasuresstrandProtocol"
)
...
...
@@ -119,54 +120,28 @@ abstract class GentrapTestAbstract(val expressionMeasure: String) extends TestNG
val
functions
=
gentrap
.
functions
.
groupBy
(
_
.
getClass
)
val
numSamples
=
sampleConfig
(
"samples"
).
size
if
(
expMeasures
.
contains
(
"fragments_per_gene"
))
{
gentrap
.
functions
.
collect
{
case
x
:
HtseqCount
=>
x
.
output
.
toString
.
endsWith
(
".fragments_per_gene"
)
}.
size
shouldBe
numSamples
}
if
(
expMeasures
.
contains
(
"fragments_per_gene"
))
assert
(
gentrap
.
functions
.
exists
(
_
.
isInstanceOf
[
HtseqCount
]))
if
(
expMeasures
.
contains
(
"fragments_per_exon"
))
{
gentrap
.
functions
.
collect
{
case
x
:
HtseqCount
=>
x
.
output
.
toString
.
endsWith
(
".fragments_per_exon"
)
}.
size
shouldBe
numSamples
}
if
(
expMeasures
.
contains
(
"fragments_per_exon"
))
assert
(
gentrap
.
functions
.
exists
(
_
.
isInstanceOf
[
HtseqCount
]))
if
(
expMeasures
.
contains
(
"bases_per_gene"
))
{
gentrap
.
functions
.
collect
{
case
x
:
AggrBaseCount
=>
x
.
output
.
toString
.
endsWith
(
".bases_per_gene"
)
}.
size
shouldBe
numSamples
}
if
(
expMeasures
.
contains
(
"bases_per_exon"
))
{
gentrap
.
functions
.
collect
{
case
x
:
AggrBaseCount
=>
x
.
output
.
toString
.
endsWith
(
".bases_per_exon"
)
}.
size
shouldBe
numSamples
}
if
(
expMeasures
.
contains
(
"base_counts"
))
gentrap
.
functions
.
count
(
_
.
isInstanceOf
[
BaseCounter
])
shouldBe
numSamples
if
(
expMeasures
.
contains
(
"cufflinks_strict"
))
{
gentrap
.
functions
.
collect
{
case
x
:
Cufflinks
=>
x
.
outputGenesFpkm
.
getParentFile
.
toString
.
endsWith
(
"cufflinks_strict"
)
case
x
:
Ln
=>
x
.
output
.
toString
.
endsWith
(
".genes_fpkm_cufflinks_strict"
)
||
x
.
output
.
toString
.
endsWith
(
".isoforms_fpkm_cufflinks_strict"
)
}
.
count
(
identity
)
shouldBe
numSamples
*
3
// three types of jobs per sample
assert
(
gentrap
.
functions
.
exists
(
_
.
isInstanceOf
[
Cufflinks
]))
assert
(
gentrap
.
functions
.
exists
(
_
.
isInstanceOf
[
Ln
]))
}
if
(
expMeasures
.
contains
(
"cufflinks_guided"
))
{
gentrap
.
functions
.
collect
{
case
x
:
Cufflinks
=>
x
.
outputGenesFpkm
.
getParentFile
.
toString
.
endsWith
(
"cufflinks_guided"
)
case
x
:
Ln
=>
x
.
output
.
toString
.
endsWith
(
".genes_fpkm_cufflinks_guided"
)
||
x
.
output
.
toString
.
endsWith
(
".isoforms_fpkm_cufflinks_guided"
)
}
.
count
(
identity
)
shouldBe
numSamples
*
3
// three types of jobs per sample
assert
(
gentrap
.
functions
.
exists
(
_
.
isInstanceOf
[
Cufflinks
]))
assert
(
gentrap
.
functions
.
exists
(
_
.
isInstanceOf
[
Ln
]))
}
if
(
expMeasures
.
contains
(
"cufflinks_blind"
))
{
gentrap
.
functions
.
collect
{
case
x
:
Cufflinks
=>
x
.
outputGenesFpkm
.
getParentFile
.
toString
.
endsWith
(
"cufflinks_blind"
)
case
x
:
Ln
=>
x
.
output
.
toString
.
endsWith
(
".genes_fpkm_cufflinks_blind"
)
||
x
.
output
.
toString
.
endsWith
(
".isoforms_fpkm_cufflinks_blind"
)
}
.
count
(
identity
)
shouldBe
numSamples
*
3
// three types of jobs per sample
assert
(
gentrap
.
functions
.
exists
(
_
.
isInstanceOf
[
Cufflinks
]))
assert
(
gentrap
.
functions
.
exists
(
_
.
isInstanceOf
[
Ln
]))
}
}
...
...
@@ -177,9 +152,8 @@ abstract class GentrapTestAbstract(val expressionMeasure: String) extends TestNG
}
class
GentrapFragmentsPerGeneTest
extends
GentrapTestAbstract
(
"fragments_per_gene"
)
class
GentrapFragmentsPerExonTest
extends
GentrapTestAbstract
(
"fragments_per_exon"
)
class
GentrapBasesPerGeneTest
extends
GentrapTestAbstract
(
"bases_per_gene"
)
class
GentrapBasesPerExonTest
extends
GentrapTestAbstract
(
"bases_per_exon"
)
//class GentrapFragmentsPerExonTest extends GentrapTestAbstract("fragments_per_exon")
class
GentrapBaseCountsTest
extends
GentrapTestAbstract
(
"base_counts"
)
class
GentrapCufflinksStrictTest
extends
GentrapTestAbstract
(
"cufflinks_strict"
)
class
GentrapCufflinksGuidedTest
extends
GentrapTestAbstract
(
"cufflinks_guided"
)
class
GentrapCufflinksBlindTest
extends
GentrapTestAbstract
(
"cufflinks_blind"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment