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
1b673dfa
Commit
1b673dfa
authored
Oct 28, 2015
by
Wai Yi Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for the comments made in the ticket #241
parent
a464f561
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
56 deletions
+35
-56
public/biopet-tools-package/src/main/scala/nl/lumc/sasc/biopet/BiopetToolsExecutable.scala
...ain/scala/nl/lumc/sasc/biopet/BiopetToolsExecutable.scala
+2
-3
public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/KrakenReportToJson.scala
.../scala/nl/lumc/sasc/biopet/tools/KrakenReportToJson.scala
+23
-23
public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/Gears.scala
...ain/scala/nl/lumc/sasc/biopet/pipelines/gears/Gears.scala
+6
-8
public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala
...ala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala
+4
-22
No files found.
public/biopet-tools-package/src/main/scala/nl/lumc/sasc/biopet/BiopetToolsExecutable.scala
View file @
1b673dfa
...
...
@@ -15,7 +15,7 @@
*/
package
nl.lumc.sasc.biopet
import
nl.lumc.sasc.biopet.utils.
{
BiopetExecutable
,
MainCommand
}
import
nl.lumc.sasc.biopet.utils.
{
BiopetExecutable
,
MainCommand
}
object
BiopetToolsExecutable
extends
BiopetExecutable
{
...
...
@@ -44,6 +44,5 @@ object BiopetToolsExecutable extends BiopetExecutable {
nl
.
lumc
.
sasc
.
biopet
.
tools
.
SeqStat
,
nl
.
lumc
.
sasc
.
biopet
.
tools
.
VepNormalizer
,
nl
.
lumc
.
sasc
.
biopet
.
tools
.
AnnotateVcfWithBed
,
nl
.
lumc
.
sasc
.
biopet
.
tools
.
VcfWithVcf
,
nl
.
lumc
.
sasc
.
biopet
.
tools
.
KrakenReportToJson
)
nl
.
lumc
.
sasc
.
biopet
.
tools
.
VcfWithVcf
)
}
public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/KrakenReportToJson.scala
View file @
1b673dfa
...
...
@@ -19,7 +19,7 @@ package nl.lumc.sasc.biopet.tools
* Created by wyleung on 25-9-15.
*/
import
java.io.
{
File
,
PrintWriter
}
import
java.io.
{
File
,
PrintWriter
}
import
nl.lumc.sasc.biopet.utils.ConfigUtils._
import
nl.lumc.sasc.biopet.utils.ToolCommand
...
...
@@ -28,30 +28,30 @@ import scala.collection.mutable
import
scala.collection.mutable.ListBuffer
import
scala.io.Source
case
class
KrakenHit
(
taxonomyID
:
Long
,
taxonomyName
:
String
,
cladeCount
:
Long
,
cladeSize
:
Long
,
// size of parent - including itself
taxonRank
:
String
,
cladeLevel
:
Int
,
parentTaxonomyID
:
Long
,
children
:
ListBuffer
[
KrakenHit
])
{
def
toJSON
(
withChildren
:
Boolean
=
false
)
:
Map
[
String
,
Any
]
=
{
val
childJSON
=
if
(
withChildren
)
children
.
toList
.
map
(
entry
=>
entry
.
toJSON
(
withChildren
))
else
List
()
Map
(
"name"
->
taxonomyName
,
"taxid"
->
taxonomyID
,
"taxonrank"
->
taxonRank
,
"cladelevel"
->
cladeLevel
,
"count"
->
cladeCount
,
"size"
->
cladeSize
,
"children"
->
childJSON
)
}
object
KrakenReportToJson
extends
ToolCommand
{
}
case
class
KrakenHit
(
taxonomyID
:
Long
,
taxonomyName
:
String
,
cladeCount
:
Long
,
cladeSize
:
Long
,
// size of parent - including itself
taxonRank
:
String
,
cladeLevel
:
Int
,
parentTaxonomyID
:
Long
,
children
:
ListBuffer
[
KrakenHit
])
{
def
toJSON
(
withChildren
:
Boolean
=
false
)
:
Map
[
String
,
Any
]
=
{
val
childJSON
=
if
(
withChildren
)
children
.
toList
.
map
(
entry
=>
entry
.
toJSON
(
withChildren
))
else
List
()
Map
(
"name"
->
taxonomyName
,
"taxid"
->
taxonomyID
,
"taxonrank"
->
taxonRank
,
"cladelevel"
->
cladeLevel
,
"count"
->
cladeCount
,
"size"
->
cladeSize
,
"children"
->
childJSON
)
}
object
KrakenReportToJson
extends
ToolCommand
{
}
var
cladeIDs
:
mutable.ArrayBuffer
[
Long
]
=
mutable
.
ArrayBuffer
.
fill
(
32
)(
0
)
val
spacePattern
=
"^( +)"
.
r
...
...
public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/Gears.scala
View file @
1b673dfa
...
...
@@ -15,19 +15,19 @@
*/
package
nl.lumc.sasc.biopet.pipelines.gears
import
nl.lumc.sasc.biopet.core.PipelineCommand
import
nl.lumc.sasc.biopet.core.summary.SummaryQScript
import
nl.lumc.sasc.biopet.extensions.kraken.
{
Kraken
,
KrakenReport
}
import
nl.lumc.sasc.biopet.core.
{
PipelineCommand
,
SampleLibraryTag
}
import
nl.lumc.sasc.biopet.extensions.kraken.
{
Kraken
,
KrakenReport
}
import
nl.lumc.sasc.biopet.extensions.picard.SamToFastq
import
nl.lumc.sasc.biopet.extensions.sambamba.SambambaView
import
nl.lumc.sasc.biopet.extensions.tools.
{
FastqSync
,
KrakenReportToJson
}
import
nl.lumc.sasc.biopet.extensions.tools.
{
FastqSync
,
KrakenReportToJson
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.queue.QScript
/**
* Created by wyleung
*/
class
Gears
(
val
root
:
Configurable
)
extends
QScript
with
SummaryQScript
{
class
Gears
(
val
root
:
Configurable
)
extends
QScript
with
SummaryQScript
with
SampleLibraryTag
{
def
this
()
=
this
(
null
)
@Input
(
doc
=
"R1 reads in FastQ format"
,
shortName
=
"R1"
,
required
=
false
)
...
...
@@ -145,12 +145,10 @@ class Gears(val root: Configurable) extends QScript with SummaryQScript {
}
/** Location of summary file */
def
summaryFile
=
new
File
(
outputDir
,
"
gears.summary.json"
)
def
summaryFile
=
new
File
(
outputDir
,
sampleId
.
getOrElse
(
"x"
)
+
"-"
+
libId
.
getOrElse
(
"x"
)
+
".
gears.summary.json"
)
/** Pipeline settings shown in the summary file */
def
summarySettings
:
Map
[
String
,
Any
]
=
Map
.
empty
++
(
if
(
bamFile
.
isDefined
)
Map
(
"input_bam"
->
bamFile
.
get
)
else
Map
())
++
(
if
(
fastqR1
.
isDefined
)
Map
(
"input_R1"
->
fastqR1
.
get
)
else
Map
())
def
summarySettings
:
Map
[
String
,
Any
]
=
Map
.
empty
/** Statistics shown in the summary file */
def
summaryFiles
:
Map
[
String
,
File
]
=
Map
.
empty
++
...
...
public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsReport.scala
View file @
1b673dfa
package
nl.lumc.sasc.biopet.pipelines.gears
import
java.io.
{
PrintWriter
,
File
}
import
nl.lumc.sasc.biopet.core.report.MultisampleReportBuilder
import
nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import
nl.lumc.sasc.biopet.core.report.ReportPage
import
nl.lumc.sasc.biopet.core.report.ReportSection
import
nl.lumc.sasc.biopet.core.report._
import
nl.lumc.sasc.biopet.utils.config.Configurable
class
GearsReport
(
val
root
:
Configurable
)
extends
ReportBuilderExtension
{
val
builder
=
GearsReport
override
val
defaultCoreMemory
=
3.0
}
object
GearsReport
extends
Multisample
ReportBuilder
{
object
GearsReport
extends
ReportBuilder
{
// FIXME: Not yet finished
// TODO: Summary all: Add summary (sunflare plot)
// TODO: Sample specific: Add summary (sunflare plot)
// TODO: Add dusbin analysis (aggregated)
// TODO: Add dus
t
bin analysis (aggregated)
// TODO: Add alignment stats per sample for the dustbin analysis
def
indexPage
=
{
ReportPage
(
List
(
"Samples"
->
generateSamplesPage
(
pageArgs
)
)
++
List
()
++
Map
(
"Versions"
->
ReportPage
(
List
(),
List
((
"Executables"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/executables.ssp"
...
...
@@ -38,16 +30,6 @@ object GearsReport extends MultisampleReportBuilder {
)
}
def
samplePage
(
sampleId
:
String
,
args
:
Map
[
String
,
Any
])
=
{
ReportPage
(
List
(),
List
(
"Sunburst analysis"
->
ReportSection
(
"/nl/lumc/sasc/biopet/pipelines/gears/gearsSunburst.ssp"
)
),
args
)
}
def
libraryPage
(
sampleId
:
String
,
libId
:
String
,
args
:
Map
[
String
,
Any
])
=
{
ReportPage
(
List
(),
List
(),
args
)
}
def
reportName
=
"Gears :: Metagenomics Report"
}
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