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
1caad853
Commit
1caad853
authored
Sep 20, 2016
by
Peter van 't Hof
Browse files
Add a split to unique reports
parent
86572f26
Changes
3
Hide whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/centrifuge/CentrifugeKreport.scala
View file @
1caad853
...
...
@@ -19,10 +19,21 @@ class CentrifugeKreport(val root: Configurable) extends BiopetCommandLineFunctio
@Input
(
doc
=
"Centrifuge index prefix"
,
required
=
true
)
var
index
:
File
=
config
(
"centrifuge_index"
,
namespace
=
"centrifuge"
)
var
onlyUnique
:
Boolean
=
config
(
"only_unique"
,
default
=
false
)
var
showZeros
:
Boolean
=
config
(
"show_zeros"
,
default
=
false
)
var
isCounts
:
Boolean
=
config
(
"is_counts"
,
default
=
false
)
var
minScore
:
Option
[
Double
]
=
config
(
"min_score"
)
var
minLength
:
Option
[
Int
]
=
config
(
"min_length"
)
executable
=
config
(
"exe"
,
default
=
"centrifuge-kreport"
,
freeVar
=
false
)
def
cmdLine
=
executable
+
//TODO: Options
conditional
(
onlyUnique
,
"--only-unique"
)
+
conditional
(
showZeros
,
"--show-zeros"
)
+
conditional
(
showZeros
,
"--is-counts"
)
+
optional
(
"--min-score="
,
minScore
,
spaceSeparated
=
false
)
+
optional
(
"--min-length="
,
minLength
,
spaceSeparated
=
false
)
+
required
(
"-x"
,
index
)
+
repeat
(
centrifugeOutputFiles
)
+
" > "
+
required
(
output
)
...
...
gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsCentrifuge.scala
View file @
1caad853
...
...
@@ -18,6 +18,8 @@ class GearsCentrifuge(val root: Configurable) extends QScript with SummaryQScrip
var
outputName
:
String
=
_
override
def
fixedValues
=
Map
(
"centrifugekreport"
->
Map
(
"only_unique"
->
false
))
def
init
()
:
Unit
=
{
require
(
fastqR1
!=
null
)
if
(
outputName
==
null
)
outputName
=
fastqR1
.
getName
...
...
@@ -34,19 +36,25 @@ class GearsCentrifuge(val root: Configurable) extends QScript with SummaryQScrip
centrifuge
.
report
=
Some
(
new
File
(
outputDir
,
s
"$outputName.centrifuge.report"
))
add
(
centrifuge
)
makeKreport
(
List
(
centrifuge
.
output
),
"centrifuge"
,
unique
=
false
)
makeKreport
(
List
(
centrifuge
.
output
),
"centrifuge_unique"
,
unique
=
true
)
addSummaryJobs
()
}
protected
def
makeKreport
(
inputFiles
:
List
[
File
],
name
:
String
,
unique
:
Boolean
)
:
Unit
=
{
val
centrifugeKreport
=
new
CentrifugeKreport
(
this
)
centrifugeKreport
.
centrifugeOutputFiles
:+=
centrifuge
.
output
centrifugeKreport
.
output
=
new
File
(
outputDir
,
s
"$outputName.centrifuge.kreport"
)
centrifugeKreport
.
centrifugeOutputFiles
=
inputFiles
centrifugeKreport
.
output
=
new
File
(
outputDir
,
s
"$outputName.$name.kreport"
)
centrifugeKreport
.
onlyUnique
=
unique
add
(
centrifugeKreport
)
val
krakenReportJSON
=
new
KrakenReportToJson
(
this
)
krakenReportJSON
.
inputReport
=
centrifugeKreport
.
output
krakenReportJSON
.
output
=
new
File
(
outputDir
,
s
"$outputName.krkn.json"
)
krakenReportJSON
.
output
=
new
File
(
outputDir
,
s
"$outputName.
$name.
krkn.json"
)
krakenReportJSON
.
skipNames
=
config
(
"skipNames"
,
default
=
false
)
add
(
krakenReportJSON
)
addSummarizable
(
krakenReportJSON
,
"centrifuge_report"
)
addSummaryJobs
()
addSummarizable
(
krakenReportJSON
,
s
"${name}_report"
)
}
/** Location of summary file */
...
...
gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala
View file @
1caad853
...
...
@@ -46,8 +46,11 @@ object GearsReport extends MultisampleReportBuilder {
ReportPage
(
(
if
(
centrifugeExecuted
)
List
(
"Centriguge analysis"
->
ReportPage
(
List
(),
List
(
"Krona plot"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
)),
Map
(
"summaryStatsTag"
->
"centrifuge_report"
,
"summaryModuleTag"
->
"gearscentrifuge"
)))
"Unique Krona plot"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
,
Map
(
"summaryStatsTag"
->
"centrifuge_unique_report"
)
),
"All Krona plot"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
,
Map
(
"summaryStatsTag"
->
"centrifuge_report"
)
)),
Map
(
"summaryModuleTag"
->
"gearscentrifuge"
)))
else
Nil
)
:::
(
if
(
krakenExecuted
)
List
(
"Kraken analysis"
->
ReportPage
(
List
(),
List
(
"Krona plot"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/gears/krakenKrona.ssp"
)),
Map
()))
...
...
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