Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PTV
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Véronique LEGRAND
PTV
Commits
9d746b0d
Commit
9d746b0d
authored
1 week ago
by
Veronique Legrand
Browse files
Options
Downloads
Patches
Plain Diff
work in progress: testing the impact of underlying buffer size when reading gzip fasta files
parent
8ac42f86
No related branches found
No related tags found
No related merge requests found
Pipeline
#153219
failed with stage
in 1 minute and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
phagetermvirome/IData_handling.py
+3
-2
3 additions, 2 deletions
phagetermvirome/IData_handling.py
with
3 additions
and
2 deletions
phagetermvirome/IData_handling.py
+
3
−
2
View file @
9d746b0d
...
...
@@ -286,14 +286,15 @@ class ReadGetter:
def
totReads
(
filin
):
"""
Verify and retrieve the number of reads in the fastq file before alignment
"""
start_t
=
time
.
perf_counter_ns
()
bufsize
=
102400
if
filin
.
endswith
(
'
.gz
'
):
print
(
io
.
DEFAULT_BUFFER_SIZE
)
filein
=
gzip
.
open
(
filin
,
'
rb
'
)
else
:
filein
=
open
(
filin
,
'
r
'
)
line
=
0
while
filein
.
readline
():
with
io
.
BufferedReader
(
filein
,
buffer_size
=
bufsize
)
as
buffered_f
:
#while filein.readline():
line
+=
1
seq
=
float
(
round
(
line
/
4
))
filein
.
close
()
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment