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
26ff1d93
Commit
26ff1d93
authored
Jul 25, 2017
by
pjvan_thof
Browse files
Adding stringtie as expresion measure
parent
1a74faa7
Changes
4
Hide whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/stringtie/Stringtie.scala
View file @
26ff1d93
...
...
@@ -18,6 +18,9 @@ class Stringtie(val parent: Configurable)
@Input
(
required
=
true
)
var
inputBam
:
File
=
_
@Input
(
required
=
false
)
var
referenceGtf
:
Option
[
File
]
=
None
@Output
var
outputGtf
:
File
=
_
...
...
@@ -52,6 +55,7 @@ class Stringtie(val parent: Configurable)
def
versionRegex
:
Regex
=
".*"
.
r
def
cmdLine
:
String
=
required
(
executable
)
+
required
(
inputBam
)
+
conditional
(
v
,
"-v"
)
+
required
(
"-p"
,
threads
)
+
conditional
(
rf
,
"--rf"
)
+
...
...
@@ -70,6 +74,7 @@ class Stringtie(val parent: Configurable)
optional
(
"-b"
,
b
)
+
conditional
(
e
,
"-e"
)
+
optional
(
"-M"
,
M
)
+
optional
(
"-G"
,
referenceGtf
)
+
(
if
(
x
.
nonEmpty
)
optional
(
"-x"
,
x
.
mkString
(
","
))
else
""
)
+
(
if
(
outputAsStdout
)
""
else
required
(
"-o"
,
outputGtf
))
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/stringtie/StringtieMerge.scala
View file @
26ff1d93
...
...
@@ -16,12 +16,14 @@ class StringtieMerge(val parent: Configurable)
executable
=
config
(
"exe"
,
"stringtie"
)
@Input
(
required
=
true
)
var
inputBam
:
File
=
_
var
inputGtfs
:
List
[
File
]
=
Nil
@Input
(
required
=
false
)
var
referenceGtf
:
Option
[
File
]
=
None
@Output
var
outputGtf
:
File
=
_
var
v
:
Boolean
=
config
(
"v"
,
default
=
logger
.
isDebugEnabled
)
var
l
:
Option
[
String
]
=
None
var
f
:
Option
[
Double
]
=
config
(
"f"
)
...
...
@@ -38,6 +40,7 @@ class StringtieMerge(val parent: Configurable)
def
versionRegex
:
Regex
=
".*"
.
r
def
cmdLine
:
String
=
required
(
executable
)
+
required
(
"--merge"
)
conditional
(
v
,
"-v"
)
+
required
(
"-p"
,
threads
)
+
optional
(
"-l"
,
l
)
+
...
...
@@ -46,6 +49,8 @@ class StringtieMerge(val parent: Configurable)
optional
(
"-c"
,
c
)
+
optional
(
"-F"
,
F
)
+
conditional
(
i
,
"-i"
)
+
(
if
(
outputAsStdout
)
""
else
required
(
"-o"
,
outputGtf
))
optional
(
"-G"
,
referenceGtf
)
+
(
if
(
outputAsStdout
)
""
else
required
(
"-o"
,
outputGtf
))
+
repeat
(
inputGtfs
)
}
gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/Gentrap.scala
View file @
26ff1d93
...
...
@@ -148,6 +148,7 @@ class Gentrap(val parent: Configurable)
cufflinksBlind
.
foreach
(
validate
.
gtfFile
:+=
_
.
annotationGtf
)
cufflinksGuided
.
foreach
(
validate
.
gtfFile
:+=
_
.
annotationGtf
)
cufflinksStrict
.
foreach
(
validate
.
gtfFile
:+=
_
.
annotationGtf
)
stringtie
.
foreach
(
validate
.
gtfFile
:+=
_
.
annotationGtf
)
validate
.
jobOutputFile
=
new
File
(
outputDir
,
".validate.annotation.out"
)
add
(
validate
)
...
...
@@ -169,6 +170,11 @@ class Gentrap(val parent: Configurable)
Some
(
new
BaseCounts
(
this
))
else
None
lazy
val
stringtie
:
Option
[
Stringtie
]
=
if
(
expMeasures
().
contains
(
ExpMeasures
.
Stringtie
))
Some
(
new
Stringtie
(
this
))
else
None
lazy
val
cufflinksBlind
:
Option
[
CufflinksBlind
]
=
if
(
expMeasures
().
contains
(
ExpMeasures
.
CufflinksBlind
))
Some
(
new
CufflinksBlind
(
this
))
...
...
@@ -186,7 +192,7 @@ class Gentrap(val parent: Configurable)
def
executedMeasures
:
List
[
QScript
with
Measurement
]
=
(
fragmentsPerGene
::
baseCounts
::
cufflinksBlind
::
cufflinksGuided
::
cufflinksStrict
::
Nil
).
flatten
cufflinksGuided
::
cufflinksStrict
::
stringtie
::
Nil
).
flatten
/** Whether to do simple variant calling on RNA or not */
lazy
val
shivaVariantcalling
:
Option
[
ShivaVariantcalling
]
=
...
...
@@ -299,7 +305,7 @@ object Gentrap extends PipelineCommand {
/** Enumeration of available expression measures */
object
ExpMeasures
extends
Enumeration
{
val
FragmentsPerGene
,
BaseCounts
,
CufflinksStrict
,
CufflinksGuided
,
CufflinksBlind
=
Value
val
FragmentsPerGene
,
BaseCounts
,
CufflinksStrict
,
CufflinksGuided
,
CufflinksBlind
,
Stringtie
=
Value
}
/** Enumeration of available strandedness */
...
...
gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/measures/Stringtie.scala
0 → 100644
View file @
26ff1d93
/**
* Biopet is built on top of GATK Queue for building bioinformatic
* pipelines. It is mainly intended to support LUMC SHARK cluster which is running
* SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
* should also be able to execute Biopet tools and pipelines.
*
* Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
*
* Contact us at: sasc@lumc.nl
*
* A dual licensing mode is applied. The source code within this project is freely available for non-commercial use under an AGPL
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
package
nl.lumc.sasc.biopet.pipelines.gentrap.measures
import
nl.lumc.sasc.biopet.core.annotations.AnnotationGtf
import
nl.lumc.sasc.biopet.extensions.stringtie.
{
StringtieMerge
,
Stringtie
=>
StringtieTool
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
class
Stringtie
(
val
parent
:
Configurable
)
extends
QScript
with
Measurement
with
AnnotationGtf
{
def
mergeArgs
=
MergeArgs
(
idCols
=
List
(
1
),
valCol
=
2
,
fallback
=
"0"
)
/** Pipeline itself */
def
biopetScript
()
:
Unit
=
{
val
sampleGtfFiles
:
List
[
File
]
=
bamFiles
.
map
{
case
(
id
,
file
)
=>
val
sampleDir
=
new
File
(
outputDir
,
id
)
val
stringtie
=
new
StringtieTool
(
this
)
stringtie
.
inputBam
=
file
stringtie
.
l
=
Some
(
id
)
stringtie
.
referenceGtf
=
Some
(
annotationGtf
)
stringtie
.
outputGtf
=
new
File
(
sampleDir
,
s
"$id.gtf"
)
stringtie
.
geneAbundances
=
Some
(
new
File
(
sampleDir
,
s
"$id.gene_abund.tab"
))
stringtie
.
referenceCoverage
=
Some
(
new
File
(
sampleDir
,
s
"$id.cov_refs.gtf"
))
add
(
stringtie
)
stringtie
.
outputGtf
}.
toList
val
stringtieMerge
=
new
StringtieMerge
(
this
)
stringtieMerge
.
inputGtfs
=
sampleGtfFiles
stringtieMerge
.
referenceGtf
=
Some
(
annotationGtf
)
stringtieMerge
.
outputGtf
=
new
File
(
outputDir
,
"stringtie.merged.gtf"
)
add
(
stringtieMerge
)
addSummaryJobs
()
}
override
def
summaryFiles
:
Map
[
String
,
File
]
=
super
.
summaryFiles
++
Map
(
"annotation_gtf"
->
annotationGtf
)
}
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