Skip to content
GitLab
Menu
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
884091eb
Commit
884091eb
authored
May 30, 2016
by
Peter van 't Hof
Browse files
Changed custom adapters feeding
parent
d4934ea6
Changes
2
Hide whitespace changes
Inline
Side-by-side
flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Cutadapt.scala
View file @
884091eb
...
...
@@ -29,7 +29,15 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
class
Cutadapt
(
root
:
Configurable
,
fastqc
:
Fastqc
)
extends
nl
.
lumc
.
sasc
.
biopet
.
extensions
.
Cutadapt
(
root
)
{
val
ignoreFastqcAdapters
:
Boolean
=
config
(
"ignore_fastqc_adapters"
,
default
=
false
)
val
customAdaptersConfig
:
Map
[
String
,
Any
]
=
config
(
"custom_adapters"
,
default
=
Map
.
empty
)
val
customAdaptersEnd
:
Map
[
String
,
Any
]
=
config
(
"custom_adapters_end"
,
default
=
Map
())
adapter
++=
customAdaptersEnd
.
values
.
map
(
_
.
toString
)
val
customAdaptersFront
:
Map
[
String
,
Any
]
=
config
(
"custom_adapters_front"
,
default
=
Map
())
front
++=
customAdaptersEnd
.
values
.
map
(
_
.
toString
)
val
customAdaptersAny
:
Map
[
String
,
Any
]
=
config
(
"custom_adapters_any"
,
default
=
Map
())
anywhere
++=
customAdaptersEnd
.
values
.
map
(
_
.
toString
)
/** Clipped adapter names from FastQC */
protected
def
seqToName
:
Map
[
String
,
String
]
=
{
...
...
@@ -42,7 +50,7 @@ class Cutadapt(root: Configurable, fastqc: Fastqc) extends nl.lumc.sasc.biopet.e
}
def
customAdapters
:
Set
[
AdapterSequence
]
=
{
customAdapters
Config
.
flatMap
(
adapter
=>
{
(
customAdapters
End
++
customAdaptersFront
++
customAdaptersAny
)
.
flatMap
(
adapter
=>
{
adapter
match
{
case
(
adapterName
:
String
,
sequence
:
String
)
=>
Some
(
AdapterSequence
(
adapterName
,
sequence
))
...
...
flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/QcCommand.scala
View file @
884091eb
...
...
@@ -103,13 +103,11 @@ class QcCommand(val root: Configurable, val fastqc: Fastqc) extends BiopetComman
clip
=
if
(!
flexiprep
.
skipClip
)
{
val
cutadapt
=
clip
.
getOrElse
(
new
Cutadapt
(
root
,
fastqc
))
val
foundAdapters
=
if
(!
cutadapt
.
ignoreFastqcAdapters
)
{
fastqc
.
foundAdapters
.
map
(
_
.
seq
)
++
cutadapt
.
customAdapters
.
map
(
_
.
seq
)
}
else
{
cutadapt
.
customAdapters
.
map
(
_
.
seq
)
}
val
foundAdapters
:
Set
[
String
]
=
if
(!
cutadapt
.
ignoreFastqcAdapters
)
{
fastqc
.
foundAdapters
.
map
(
_
.
seq
)
}
else
Set
()
if
(
foundAdapters
.
nonEmpty
)
{
if
(
foundAdapters
.
nonEmpty
||
cutadapt
.
adapter
.
nonEmpty
||
cutadapt
.
front
.
nonEmpty
||
cutadapt
.
anywhere
.
nonEmpty
)
{
cutadapt
.
fastqInput
=
seqtk
.
output
cutadapt
.
fastqOutput
=
new
File
(
output
.
getParentFile
,
input
.
getName
+
".cutadapt.fq"
)
cutadapt
.
statsOutput
=
new
File
(
flexiprep
.
outputDir
,
s
"${flexiprep.sampleId.getOrElse("
x
")}-${flexiprep.libId.getOrElse("
x
")}.$read.clip.stats"
)
...
...
Write
Preview
Supports
Markdown
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