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
e8b4bef1
Commit
e8b4bef1
authored
Mar 07, 2016
by
Peter van 't Hof
Browse files
Loosed the encoding checks
parent
8c75f931
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ValidateFastq.scala
View file @
e8b4bef1
...
...
@@ -69,7 +69,7 @@ object ValidateFastq extends ToolCommand {
checkMate
(
recordR1
,
recordR2
)
case
_
=>
// Single end
}
if
(
counter
%
1
e5
==
0
)
logger
.
info
(
counter
+
" reads processed"
)
if
(
counter
%
1
e5
==
0
)
logger
.
info
(
counter
+
(
if
(
recordR2
.
isDefined
)
" pairs"
else
" reads
"
)
+
"
processed"
)
lastRecordR1
=
Some
(
recordR1
)
lastRecordR2
=
recordR2
}
...
...
@@ -78,7 +78,10 @@ object ValidateFastq extends ToolCommand {
if
(
readFq2
.
map
(
_
.
hasNext
)
==
Some
(
true
))
throw
new
IllegalStateException
(
"R2 contains more reads then R1"
)
logger
.
info
(
s
"Possible quality encodings found: ${getPossibleEncodings.mkString("
,
")}"
)
getPossibleEncodings
match
{
case
l
if
l
.
nonEmpty
=>
logger
.
info
(
s
"Possible quality encodings found: ${l.mkString("
,
")}"
)
case
_
=>
logger
.
warn
(
s
"No possible quality encodings found"
)
}
logger
.
info
(
s
"Done processing ${counter} fastq records, no errors found"
)
}
catch
{
...
...
@@ -122,13 +125,13 @@ object ValidateFastq extends ToolCommand {
val
buffer
:
ListBuffer
[
String
]
=
ListBuffer
()
(
minQual
,
maxQual
)
match
{
case
(
Some
(
min
),
Some
(
max
))
=>
if
(
min
<
'!'
||
max
>
'~'
)
throw
new
IllegalStateException
(
s
"Quality is out of ascii range 33-126. minQual: '$min', maxQual: '$max'"
)
if
(
min
>=
'!'
&&
max
<=
'I'
)
buffer
+=
"Sanger"
if
(
min
>=
';'
&&
max
<=
'h'
)
buffer
+=
"Solexa"
if
(
min
>=
'@'
&&
max
<=
'h'
)
buffer
+=
"Illumina 1.3+"
if
(
min
>=
'C'
&&
max
<=
'h'
)
buffer
+=
"Illumina 1.5+"
if
(
min
>=
'!'
&&
max
<=
'J'
)
buffer
+=
"Illumina 1.8+"
if
(
buffer
.
isEmpty
)
throw
new
IllegalStateException
(
s
"No possible quality encoding found. minQual: '$min', maxQual: '$max'"
)
case
_
=>
}
buffer
.
toList
...
...
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