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
c6a89d92
Commit
c6a89d92
authored
Dec 16, 2015
by
Peter van 't Hof
Browse files
Added closed reference method
parent
15cd85a4
Changes
4
Hide whitespace changes
Inline
Side-by-side
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Flash.scala
View file @
c6a89d92
...
...
@@ -2,15 +2,15 @@ package nl.lumc.sasc.biopet.extensions
import
java.io.File
import
nl.lumc.sasc.biopet.core.
{
Version
,
BiopetCommandLineFunction
}
import
nl.lumc.sasc.biopet.core.
{
Version
,
BiopetCommandLineFunction
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.Input
import
scala.util.matching.Regex
/**
* Created by pjvanthof on 16/12/15.
*/
* Created by pjvanthof on 16/12/15.
*/
class
Flash
(
val
root
:
Configurable
)
extends
BiopetCommandLineFunction
with
Version
{
executable
=
config
(
"exe"
,
default
=
"flash"
,
freeVar
=
false
)
...
...
@@ -47,7 +47,7 @@ class Flash(val root: Configurable) extends BiopetCommandLineFunction with Versi
var
compressProgArgs
:
Option
[
String
]
=
config
(
"compress_prog_args"
)
var
outputSuffix
:
Option
[
String
]
=
config
(
"output_suffix"
)
private
def
suffix
=
outputSuffix
.
getOrElse
(
"fastq"
)
+
(
if
(
compress
)
".gz"
else
""
)
private
def
suffix
=
outputSuffix
.
getOrElse
(
"fastq"
)
+
(
if
(
compress
)
".gz"
else
""
)
def
combinedFastq
=
new
File
(
outputDirectory
,
s
"$outputPrefix.extendedFrags.$suffix"
)
def
notCombinedR1
=
new
File
(
outputDirectory
,
s
"$outputPrefix.notCombined_1.$suffix"
)
...
...
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/qiime/PickClosedReferenceOtus.scala
View file @
c6a89d92
...
...
@@ -2,7 +2,7 @@ package nl.lumc.sasc.biopet.extensions.qiime
import
java.io.File
import
nl.lumc.sasc.biopet.core.
{
BiopetCommandLineFunction
,
Version
}
import
nl.lumc.sasc.biopet.core.
{
BiopetCommandLineFunction
,
Version
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.Input
...
...
@@ -36,6 +36,11 @@ class PickClosedReferenceOtus(val root: Configurable) extends BiopetCommandLineF
var
print_only
:
Boolean
=
config
(
"print_only"
,
default
=
false
)
var
suppress_taxonomy_assignment
:
Boolean
=
config
(
"suppress_taxonomy_assignment"
,
default
=
false
)
override
def
beforeGraph
()
:
Unit
=
{
super
.
beforeGraph
()
jobOutputFile
=
new
File
(
outputDir
,
"std.log"
)
}
def
cmdLine
=
executable
+
required
(
"-i"
,
inputFasta
)
+
required
(
"-o"
,
outputDir
)
+
...
...
public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsQiimeClosed.scala
0 → 100644
View file @
c6a89d92
package
nl.lumc.sasc.biopet.pipelines.gears
import
nl.lumc.sasc.biopet.core.
{
BiopetQScript
,
SampleLibraryTag
}
import
nl.lumc.sasc.biopet.extensions.Flash
import
nl.lumc.sasc.biopet.extensions.qiime._
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 12/4/15.
*/
class
GearsQiimeClosed
(
val
root
:
Configurable
)
extends
QScript
with
BiopetQScript
with
SampleLibraryTag
{
var
fastqR1
:
File
=
_
var
fastqR2
:
Option
[
File
]
=
None
override
def
defaults
=
Map
(
"splitlibrariesfastq"
->
Map
(
"barcode_type"
->
"not-barcoded"
)
)
def
init
()
=
{
require
(
fastqR1
!=
null
)
}
def
biopetScript
()
=
{
val
fastqFile
=
fastqR2
match
{
case
Some
(
r2
)
=>
val
flash
=
new
Flash
(
this
)
flash
.
outputDirectory
=
new
File
(
outputDir
,
"combine_reads_flash"
)
flash
.
fastqR1
=
fastqR1
flash
.
fastqR2
=
r2
add
(
flash
)
flash
.
combinedFastq
case
_
=>
fastqR1
}
val
splitLib
=
new
SplitLibrariesFastq
(
this
)
splitLib
.
input
:+=
fastqFile
splitLib
.
outputDir
=
new
File
(
outputDir
,
"split_libraries_fastq"
)
sampleId
.
foreach
(
splitLib
.
sample_ids
:+=
_
)
add
(
splitLib
)
val
closedReference
=
new
PickClosedReferenceOtus
(
this
)
closedReference
.
inputFasta
=
splitLib
.
outputSeqs
closedReference
.
outputDir
=
new
File
(
outputDir
,
"pick_closed_reference_otus"
)
add
(
closedReference
)
}
}
public/gears/src/main/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingle.scala
View file @
c6a89d92
...
...
@@ -43,6 +43,7 @@ class GearsSingle(val root: Configurable) extends QScript with SummaryQScript wi
var
gearsUseKraken
:
Boolean
=
config
(
"gears_use_kraken"
,
default
=
true
)
var
gearsUserQiimeRtax
:
Boolean
=
config
(
"gear_use_qiime_rtax"
,
default
=
false
)
var
gearsUserQiimeClosed
:
Boolean
=
config
(
"gear_use_qiime_closed"
,
default
=
false
)
/** Executed before running the script */
def
init
()
:
Unit
=
{
...
...
@@ -120,6 +121,16 @@ class GearsSingle(val root: Configurable) extends QScript with SummaryQScript wi
addAll
(
qiimeRatx
.
functions
)
}
if
(
gearsUserQiimeClosed
)
{
val
qiimeClosed
=
new
GearsQiimeClosed
(
this
)
qiimeClosed
.
outputDir
=
new
File
(
outputDir
,
"qiime_rtax"
)
qiimeClosed
.
fastqR1
=
flexiprep
.
fastqR1Qc
qiimeClosed
.
fastqR2
=
flexiprep
.
fastqR2Qc
qiimeClosed
.
init
()
qiimeClosed
.
biopetScript
()
addAll
(
qiimeClosed
.
functions
)
}
addSummaryJobs
()
}
...
...
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