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
6ae2579a
Commit
6ae2579a
authored
Feb 03, 2015
by
bow
Browse files
Refactor FastQC encoding retrieval
parent
1b221835
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Fastqc.scala
View file @
6ae2579a
...
...
@@ -66,9 +66,20 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r
else
fqModules
}
protected
case
class
Sequence
(
name
:
String
,
seq
:
String
)
def
getFoundAdapters
:
List
[
Sequence
]
=
{
def
getSeqs
(
file
:
File
)
=
{
/**
* Retrieves the FASTQ file encoding as computed by FastQC.
*
* @return encoding name
* @throws NoSuchElementException when the "Basic Statistics" key does not exist in the mapping or
* when a line starting with "Encoding" does not exist.
*/
@throws
(
classOf
[
NoSuchElementException
])
lazy
val
encoding
:
String
=
qcModules
(
"Basic Statistics"
)
.
dropWhile
(!
_
.
startsWith
(
"Encoding"
))
.
head
.
stripPrefix
(
"Encoding\t"
)
if
(
file
!=
null
)
{
(
for
(
line
<-
Source
.
fromFile
(
file
).
getLines
();
if
line
.
startsWith
(
"#"
);
...
...
public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/SeqtkSeq.scala
View file @
6ae2579a
...
...
@@ -25,7 +25,7 @@ class SeqtkSeq(root: Configurable) extends nl.lumc.sasc.biopet.extensions.seqtk.
override
def
beforeCmd
{
super
.
beforeCmd
if
(
fastqc
!=
null
&&
Q
==
None
)
{
val
encoding
=
fastqc
.
getE
ncoding
val
encoding
=
fastqc
.
e
ncoding
Q
=
encoding
match
{
case
null
=>
None
case
s
if
(
s
.
contains
(
"Sanger / Illumina 1.9"
))
=>
None
...
...
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