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
Rayan CHIKHI
serratus-batch-dl
Commits
513c10bd
Commit
513c10bd
authored
Jun 19, 2020
by
Rayan CHIKHI
Browse files
updated unpaired support
parent
a4df611f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/batch_processor.py
View file @
513c10bd
...
...
@@ -22,12 +22,19 @@ def fastp(accession,folder,sdb,extra_args=""):
if
fname
[
-
8
:]
==
'_1.fastq'
:
# If first of pair is found, add both
fname2
=
fname
[:
-
8
]
+
'_2.fastq'
assert
fname2
in
fastq_files
,
'Unpaired _1 file: '
+
fname
pe_fastq_files
.
append
((
fname
,
fname2
))
if
fname2
not
in
fastq_files
:
print
(
'Unpaired _1 file: '
+
fname
)
sdb_log
(
sdb
,
accession
,
'read_unpaired1'
,
'True'
)
se_fastq_files
.
append
(
fname
)
else
:
pe_fastq_files
.
append
((
fname
,
fname2
))
elif
fname
[
-
8
:]
==
'_2.fastq'
:
# If second of pair is found, test for presence of first, but do nothing
fname1
=
fname
[:
-
8
]
+
'_1.fastq'
assert
fname1
in
fastq_files
,
'Unpaired _2 file: '
+
fname
if
fname1
not
in
fastq_files
:
print
(
'Unpaired _2 file: '
+
fname
)
sdb_log
(
sdb
,
accession
,
'read_unpaired2'
,
'True'
)
se_fastq_files
.
append
(
fname
)
else
:
se_fastq_files
.
append
(
fname
)
...
...
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