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
b9b1a0b0
Commit
b9b1a0b0
authored
Dec 07, 2016
by
Peter van 't Hof
Browse files
Fixing dependency error
parent
38b152be
Changes
2
Hide whitespace changes
Inline
Side-by-side
flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Flexiprep.scala
View file @
b9b1a0b0
...
...
@@ -14,12 +14,12 @@
*/
package
nl.lumc.sasc.biopet.pipelines.flexiprep
import
nl.lumc.sasc.biopet.core.summary.
{
Summarizable
,
SummaryQScript
}
import
nl.lumc.sasc.biopet.core.
{
BiopetFifoPipe
,
PipelineCommand
,
SampleLibraryTag
}
import
nl.lumc.sasc.biopet.extensions.
{
Gzip
,
Zcat
}
import
nl.lumc.sasc.biopet.core.summary.
{
Summarizable
,
SummaryQScript
}
import
nl.lumc.sasc.biopet.core.
{
BiopetFifoPipe
,
PipelineCommand
,
SampleLibraryTag
}
import
nl.lumc.sasc.biopet.extensions.
{
Gzip
,
Zcat
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.IoUtils._
import
nl.lumc.sasc.biopet.extensions.tools.
{
FastqSync
,
SeqStat
,
ValidateFastq
}
import
nl.lumc.sasc.biopet.extensions.tools.
{
FastqSync
,
SeqStat
,
ValidateFastq
}
import
nl.lumc.sasc.biopet.utils.Logging
import
org.broadinstitute.gatk.queue.QScript
...
...
@@ -179,9 +179,8 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
var
R1
=
R1_in
var
R2
=
R2_in
val
qcCmdR1
=
new
QcCommand
(
this
,
fastqcR1
)
val
qcCmdR1
=
new
QcCommand
(
this
,
fastqcR1
,
"R1"
)
qcCmdR1
.
input
=
R1_in
qcCmdR1
.
read
=
"R1"
qcCmdR1
.
output
=
if
(
paired
)
new
File
(
outDir
,
fastqR1Qc
.
getName
.
stripSuffix
(
".gz"
))
else
fastqR1Qc
qcCmdR1
.
deps
:+=
fastqcR1
.
output
...
...
@@ -189,10 +188,9 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
addSummarizable
(
qcCmdR1
,
"qc_command_R1"
)
if
(
paired
)
{
val
qcCmdR2
=
new
QcCommand
(
this
,
fastqcR2
)
val
qcCmdR2
=
new
QcCommand
(
this
,
fastqcR2
,
"R2"
)
qcCmdR2
.
input
=
R2_in
.
get
qcCmdR2
.
output
=
new
File
(
outDir
,
fastqR2Qc
.
get
.
getName
.
stripSuffix
(
".gz"
))
qcCmdR2
.
read
=
"R2"
addSummarizable
(
qcCmdR2
,
"qc_command_R2"
)
qcCmdR1
.
compress
=
false
...
...
flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/QcCommand.scala
View file @
b9b1a0b0
...
...
@@ -26,7 +26,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Output, Input }
/**
* Created by pjvan_thof on 9/22/15.
*/
class
QcCommand
(
val
root
:
Configurable
,
val
fastqc
:
Fastqc
)
extends
BiopetCommandLineFunction
with
Summarizable
{
class
QcCommand
(
val
root
:
Configurable
,
val
fastqc
:
Fastqc
,
val
read
:
String
)
extends
BiopetCommandLineFunction
with
Summarizable
{
val
flexiprep
=
root
match
{
case
f
:
Flexiprep
=>
f
...
...
@@ -41,14 +41,21 @@ class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetComman
var
compress
=
true
var
read
:
String
=
_
override
def
defaultCoreMemory
=
2.0
override
def
defaultThreads
=
3
val
seqtk
=
new
SeqtkSeq
(
root
)
var
clip
:
Option
[
Cutadapt
]
=
if
(!
flexiprep
.
skipClip
)
Some
(
new
Cutadapt
(
root
,
fastqc
))
else
None
var
trim
:
Option
[
Sickle
]
=
None
var
trim
:
Option
[
Sickle
]
=
if
(!
flexiprep
.
skipTrim
)
{
val
sickle
=
new
Sickle
(
root
)
sickle
.
outputStats
=
new
File
(
flexiprep
.
outputDir
,
s
"${flexiprep.sampleId.getOrElse("
x
")}-${flexiprep.libId.getOrElse("
x
")}.$read.trim.stats"
)
sickle
.
inputR1
=
clip
match
{
case
Some
(
c
)
=>
c
.
fastqOutput
case
_
=>
seqtk
.
output
}
Some
(
sickle
)
}
else
None
lazy
val
outputCommand
:
BiopetCommandLineFunction
=
if
(
compress
)
{
val
gzip
=
Gzip
(
root
)
gzip
.
output
=
output
...
...
@@ -121,17 +128,10 @@ class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetComman
}
else
None
}
else
None
trim
=
if
(!
flexiprep
.
skipTrim
)
{
val
sickle
=
new
Sickle
(
root
)
sickle
.
outputStats
=
new
File
(
flexiprep
.
outputDir
,
s
"${flexiprep.sampleId.getOrElse("
x
")}-${flexiprep.libId.getOrElse("
x
")}.$read.trim.stats"
)
sickle
.
inputR1
=
clip
match
{
case
Some
(
c
)
=>
c
.
fastqOutput
case
_
=>
seqtk
.
output
}
sickle
.
outputR1
=
new
File
(
output
.
getParentFile
,
input
.
getName
+
".sickle.fq"
)
addPipeJob
(
sickle
)
Some
(
sickle
)
}
else
None
trim
.
foreach
{
t
=>
t
.
outputR1
=
new
File
(
output
.
getParentFile
,
input
.
getName
+
".sickle.fq"
)
addPipeJob
(
t
)
}
val
outputFile
=
(
clip
,
trim
)
match
{
case
(
_
,
Some
(
t
))
=>
t
.
outputR1
...
...
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