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
94ec5b1a
Commit
94ec5b1a
authored
Oct 04, 2016
by
Peter van 't Hof
Browse files
Fixed output of centrifuge
parent
83e1c12f
Changes
2
Hide whitespace changes
Inline
Side-by-side
gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsCentrifuge.scala
View file @
94ec5b1a
...
...
@@ -3,7 +3,7 @@ package nl.lumc.sasc.biopet.pipelines.gears
import
nl.lumc.sasc.biopet.core.SampleLibraryTag
import
nl.lumc.sasc.biopet.core.summary.SummaryQScript
import
nl.lumc.sasc.biopet.extensions.Gzip
import
nl.lumc.sasc.biopet.extensions.centrifuge.
{
Centrifuge
,
CentrifugeKreport
}
import
nl.lumc.sasc.biopet.extensions.centrifuge.
{
Centrifuge
,
CentrifugeKreport
}
import
nl.lumc.sasc.biopet.extensions.tools.KrakenReportToJson
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.queue.QScript
...
...
@@ -27,18 +27,21 @@ class GearsCentrifuge(val root: Configurable) extends QScript with SummaryQScrip
require
(
outputName
!=
null
)
}
def
centrifugeOutput
=
new
File
(
outputDir
,
s
"$outputName.centrifuge.gz"
)
def
biopetScript
()
:
Unit
=
{
val
centrifugeOutput
=
new
File
(
outputDir
,
s
"$outputName.centrifuge.gz"
)
val
centrifuge
=
new
Centrifuge
(
this
)
centrifuge
.
inputR1
=
fastqR1
centrifuge
.
inputR2
=
fastqR2
centrifuge
.
output
=
new
File
(
outputDir
,
s
"$outputName.centrifuge"
)
centrifuge
.
report
=
Some
(
new
File
(
outputDir
,
s
"$outputName.centrifuge.report"
))
val
cmd
=
centrifuge
|
new
Gzip
(
this
)
>
centrifugeOutput
cmd
.
threadsCorrection
=
-
1
add
(
cmd
)
centrifuge
.
isIntermediate
=
true
add
(
centrifuge
)
add
(
centrifuge
.
output
:<:
new
Gzip
(
this
)
>
centrifugeOutput
)
makeKreport
(
List
(
centrifuge
O
utput
),
"centrifuge"
,
unique
=
false
)
makeKreport
(
List
(
centrifuge
O
utput
),
"centrifuge_unique"
,
unique
=
true
)
makeKreport
(
List
(
centrifuge
.
o
utput
),
"centrifuge"
,
unique
=
false
)
makeKreport
(
List
(
centrifuge
.
o
utput
),
"centrifuge_unique"
,
unique
=
true
)
addSummaryJobs
()
}
...
...
@@ -65,9 +68,10 @@ class GearsCentrifuge(val root: Configurable) extends QScript with SummaryQScrip
def
summarySettings
:
Map
[
String
,
Any
]
=
Map
()
/** Statistics shown in the summary file */
def
summaryFiles
:
Map
[
String
,
File
]
=
outputFiles
+
(
"input_R1"
->
fastqR1
)
++
(
fastqR2
match
{
case
Some
(
file
)
=>
Map
(
"input_R2"
->
file
)
case
_
=>
Map
()
})
def
summaryFiles
:
Map
[
String
,
File
]
=
outputFiles
+
(
"input_R1"
->
fastqR1
,
"centrifuge_output"
->
centrifugeOutput
)
++
(
fastqR2
match
{
case
Some
(
file
)
=>
Map
(
"input_R2"
->
file
)
case
_
=>
Map
()
})
}
gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleTest.scala
View file @
94ec5b1a
...
...
@@ -18,12 +18,12 @@ import java.io.File
import
com.google.common.io.Files
import
nl.lumc.sasc.biopet.core.BiopetPipe
import
nl.lumc.sasc.biopet.extensions.centrifuge.
{
Centrifuge
,
CentrifugeKreport
}
import
nl.lumc.sasc.biopet.extensions.kraken.
{
Kraken
,
KrakenReport
}
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
import
nl.lumc.sasc.biopet.extensions.samtools.SamtoolsView
import
nl.lumc.sasc.biopet.extensions.tools.KrakenReportToJson
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
...
...
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