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
f73038d3
Commit
f73038d3
authored
Jan 14, 2015
by
Peter van 't Hof
Browse files
Added getFoundAdapters method
parent
06536548
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Fastqc.scala
View file @
f73038d3
...
...
@@ -13,11 +13,6 @@
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
nl.lumc.sasc.biopet.pipelines.flexiprep
...
...
@@ -52,6 +47,30 @@ class Fastqc(root: Configurable) extends nl.lumc.sasc.biopet.extensions.Fastqc(r
return
null
// Could be default Sanger with a warning in the log
}
protected
case
class
Sequence
(
name
:
String
,
seq
:
String
)
def
getFoundAdapters
:
List
[
Sequence
]
=
{
def
getSeqs
(
file
:
File
)
=
{
if
(
file
!=
null
)
{
(
for
(
line
<-
Source
.
fromFile
(
file
).
getLines
()
if
line
.
startsWith
(
"#"
);
values
=
line
.
split
(
"\t"
)
if
values
.
size
>=
2
)
yield
Sequence
(
values
(
0
),
values
(
1
))).
toList
}
else
Nil
}
val
seqs
=
getSeqs
(
adapters
)
:::
getSeqs
(
contaminants
)
val
block
=
getDataBlock
(
"Overrepresented sequences"
)
if
(
block
==
null
)
return
Nil
val
found
=
for
(
line
<-
block
if
!
line
.
startsWith
(
"#"
);
values
=
line
.
split
(
"\t"
)
if
values
.
size
>=
4
)
yield
values
(
3
)
seqs
.
filter
(
x
=>
found
.
exists
(
_
.
startsWith
(
x
.
name
)))
}
def
getSummary
:
Json
=
{
val
subfixs
=
Map
(
"plot_duplication_levels"
->
"Images/duplication_levels.png"
,
"plot_kmer_profiles"
->
"Images/kmer_profiles.png"
,
...
...
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