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
genotoul-bioinfo
jflow
Commits
3931e572
Commit
3931e572
authored
Apr 27, 2017
by
cnoirot
Browse files
Debug when fasta file is large file cannot load wholefile
parent
77b80492
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflows/formats.py
View file @
3931e572
...
...
@@ -37,12 +37,12 @@ def fastq(ifile):
def
fasta
(
ifile
):
try
:
reader
=
seqio
.
FastaReader
(
ifile
,
wholefile
=
True
)
reader
=
seqio
.
FastaReader
(
ifile
)
nb_seq
=
0
for
id
,
desc
,
seq
,
qualities
in
reader
:
nb_seq
+=
1
# only check the first
10
sequences
if
nb_seq
==
10
:
break
# only check the first
3
sequences
if
nb_seq
==
3
:
break
except
:
raise
jflow
.
exceptions
.
InvalidFormatError
(
"The provided file '"
+
ifile
+
"' is not a fasta file!"
)
...
...
Write
Preview
Markdown
is supported
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