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
ad91759b
Commit
ad91759b
authored
Jun 25, 2015
by
bow
Browse files
Fix bug causing missing fragment count row
parent
8a617e00
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/Gentrap.scala
View file @
ad91759b
...
...
@@ -102,7 +102,8 @@ class Gentrap(val root: Configurable) extends QScript with MultiSampleQScript wi
/** Adds output merge jobs for the given expression mode */
// TODO: can we combine the enum with the file extension (to reduce duplication and potential errors)
private
def
makeMergeTableJob
(
inFunc
:
(
Sample
=>
Option
[
File
]),
ext
:
String
,
idCols
:
List
[
Int
],
valCol
:
Int
,
outBaseName
:
String
=
"all_samples"
,
fallback
:
String
=
"-"
)
:
Option
[
MergeTables
]
=
{
numHeaderLines
:
Int
=
1
,
outBaseName
:
String
=
"all_samples"
,
fallback
:
String
=
"-"
)
:
Option
[
MergeTables
]
=
{
val
tables
=
samples
.
values
.
map
{
inFunc
}.
toList
.
flatten
tables
.
nonEmpty
.
option
{
...
...
@@ -113,6 +114,7 @@ class Gentrap(val root: Configurable) extends QScript with MultiSampleQScript wi
job
.
valueColumnIndex
=
valCol
job
.
fileExtension
=
Option
(
ext
)
job
.
fallbackString
=
Option
(
fallback
)
job
.
numHeaderLines
=
Option
(
numHeaderLines
)
// TODO: separate the addition into another function?
job
}
...
...
@@ -140,14 +142,16 @@ class Gentrap(val root: Configurable) extends QScript with MultiSampleQScript wi
/** Merged gene fragment count table */
private
lazy
val
geneFragmentsCountJob
=
makeMergeTableJob
((
s
:
Sample
)
=>
s
.
geneFragmentsCount
,
".fragments_per_gene"
,
List
(
1
),
2
,
fallback
=
"0"
)
makeMergeTableJob
((
s
:
Sample
)
=>
s
.
geneFragmentsCount
,
".fragments_per_gene"
,
List
(
1
),
2
,
numHeaderLines
=
0
,
fallback
=
"0"
)
private
lazy
val
geneFragmentsCountHeatmapJob
=
makeHeatmapJob
(
geneFragmentsCountJob
,
"fragments_per_gene"
,
FragmentsPerGene
)
/** Merged exon fragment count table */
private
lazy
val
exonFragmentsCountJob
=
makeMergeTableJob
((
s
:
Sample
)
=>
s
.
exonFragmentsCount
,
".fragments_per_exon"
,
List
(
1
),
2
,
fallback
=
"0"
)
makeMergeTableJob
((
s
:
Sample
)
=>
s
.
exonFragmentsCount
,
".fragments_per_exon"
,
List
(
1
),
2
,
numHeaderLines
=
0
,
fallback
=
"0"
)
private
lazy
val
exonFragmentsCountHeatmapJob
=
makeHeatmapJob
(
exonFragmentsCountJob
,
"fragments_per_exon"
,
FragmentsPerExon
)
...
...
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