Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
734801f6
Commit
734801f6
authored
9 years ago
by
Sander van der Zeeuw
Browse files
Options
Downloads
Patches
Plain Diff
add DNA base check (testing still needed)
parent
843b569a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/CheckFastqPairs.scala
+17
-2
17 additions, 2 deletions
...ain/scala/nl/lumc/sasc/biopet/tools/CheckFastqPairs.scala
with
17 additions
and
2 deletions
public/biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/CheckFastqPairs.scala
+
17
−
2
View file @
734801f6
...
...
@@ -55,15 +55,30 @@ object CheckFastqPairs extends ToolCommand {
//Getting R2 record, None if it's single end
val
recordR2
=
readFq2
.
map
(
_
.
next
())
//Here we check if the readnames of both files are concordant
//Here we check if the readnames of both files are concordant
, and if the sequence content are correct DNA/RNA sequences
recordR2
match
{
case
Some
(
recordR2
)
=>
// Paired End
val
readHeader
=
recordR1
.
getReadHeader
val
readHeader2
=
recordR2
.
getReadHeader
val
readSeq
=
recordR1
.
getReadString
val
readSeq2
=
recordR2
.
getReadString
val
id1
=
readHeader
.
takeWhile
(
_
!=
' '
)
val
id2
=
readHeader2
.
takeWhile
(
_
!=
' '
)
if
(
counter
%
1
e5
==
0
)
logger
.
info
(
counter
+
" reads processed"
)
if
(
counter
%
1
e4
==
0
)
logger
.
info
(
counter
+
" reads processed"
)
val
allowedBases
=
"""([actgnACTGN+]+)"""
.
r
val
validBases
:
Boolean
=
readSeq
match
{
case
allowedBases
(
m
)
=>
true
case
_
=>
throw
new
IllegalStateException
(
s
"Non IUPAC symbols identified '${(counter*4)-3}'"
)
}
val
validBases2
:
Boolean
=
readSeq2
match
{
case
allowedBases
(
m
)
=>
true
case
_
=>
throw
new
IllegalStateException
(
s
"Non IUPAC symbols identified '${(counter*4)-3}'"
)
}
if
(
id1
==
id2
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment