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
9cb010e9
Commit
9cb010e9
authored
May 17, 2016
by
Peter van 't Hof
Browse files
Add gtf to refflat
parent
f297526c
Changes
3
Hide whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Awk.scala
0 → 100644
View file @
9cb010e9
package
nl.lumc.sasc.biopet.extensions
import
java.io.File
import
nl.lumc.sasc.biopet.core.
{
BiopetCommandLineFunction
,
Version
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
scala.util.matching.Regex
/**
* Created by pjvan_thof on 17-5-16.
*/
class
Awk
(
val
root
:
Configurable
)
extends
BiopetCommandLineFunction
with
Version
{
executable
=
config
(
"exe"
,
default
=
"awk"
,
freeVar
=
false
)
def
versionCommand
:
String
=
executable
+
" --version"
def
versionRegex
:
Regex
=
"""(GNU Awk \d+\.\d+\.\d+)"""
.
r
@Input
(
required
=
false
)
var
input
:
File
=
_
@Output
var
output
:
File
=
_
var
command
:
String
=
_
def
cmdLine
=
executable
+
required
(
command
)
+
(
if
(
inputAsStdin
)
""
else
required
(
input
))
+
(
if
(
outputAsStsout
)
""
else
" > "
+
required
(
output
))
}
object
Awk
{
def
apply
(
root
:
Configurable
,
command
:
String
)
:
Awk
=
{
val
awk
=
new
Awk
(
root
)
awk
.
command
=
command
awk
}
}
\ No newline at end of file
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/GtfToGenePred.scala
0 → 100644
View file @
9cb010e9
package
nl.lumc.sasc.biopet.extensions
import
java.io.File
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
/**
* Created by pjvan_thof on 17-5-16.
*/
class
GtfToGenePred
(
val
root
:
Configurable
)
extends
BiopetCommandLineFunction
{
executable
=
config
(
"exe"
,
default
=
"gtfToGenePred"
,
freeVar
=
false
)
@Input
var
inputGtfs
:
List
[
File
]
=
Nil
@Output
var
outputGenePred
:
File
=
_
@Output
var
infoOut
:
Option
[
File
]
=
None
var
genePredExt
:
Boolean
=
config
(
"gene _pred _ext"
,
default
=
false
)
var
allErrors
:
Boolean
=
config
(
"all_errors"
,
default
=
false
)
var
impliedStopAfterCds
:
Boolean
=
config
(
"implied_stop_after_cds"
,
default
=
false
)
var
simple
:
Boolean
=
config
(
"simple"
,
default
=
false
)
var
geneNameAsName2
:
Boolean
=
config
(
"gene _name_as_name2"
,
default
=
false
)
def
cmdLine
=
executable
+
conditional
(
genePredExt
,
"-genePredExt"
)
+
conditional
(
allErrors
,
"-allErrors"
)
+
optional
(
"-infoOut"
,
infoOut
)
+
conditional
(
allErrors
,
"-allErrors"
)
+
conditional
(
impliedStopAfterCds
,
"-impliedStopAfterCds"
)
+
conditional
(
simple
,
"-simple"
)
+
conditional
(
geneNameAsName2
,
"-geneNameAsName2"
)
+
(
if
(
outputAsStsout
)
""
else
" > "
+
required
(
outputGenePred
))
}
generate-indexes/src/main/scala/nl/lumc/sasc/biopet/pipelines/generateindexes/GenerateIndexes.scala
View file @
9cb010e9
...
...
@@ -208,9 +208,12 @@ class GenerateIndexes(val root: Configurable) extends QScript with BiopetQScript
val
refFlatFile
:
Option
[
File
]
=
gtfFile
.
map
{
gtf
=>
val
refFlat
=
new
File
(
gtf
+
".refFlat"
)
//TODO: gtf to refFlat conversion
val
gtfToGenePred
=
new
GtfToGenePred
(
this
)
gtfToGenePred
.
inputGtfs
:+=
gtf
outputConfig
+=
"ribosome_refflat"
->
refFlat
add
(
gtfToGenePred
|
Awk
(
this
,
"""{ print $12"\t"$1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$7"\t"$8"\t"$9"\t"$10 }"""
)
>
refFlat
)
outputConfig
+=
"annotation_refflat"
->
refFlat
refFlat
}
...
...
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