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
bec64eda
Commit
bec64eda
authored
2 years ago
by
Veronique Legrand
Browse files
Options
Downloads
Patches
Plain Diff
added gzip format support for genome
parent
293c946d
No related branches found
No related tags found
No related merge requests found
Pipeline
#109541
failed with stage
Stage:
in 3 minutes and 33 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_modules/IData_handling.py
+2
-1
2 additions, 1 deletion
_modules/IData_handling.py
_modules/main_utils.py
+2
-1
2 additions, 1 deletion
_modules/main_utils.py
with
4 additions
and
2 deletions
_modules/IData_handling.py
+
2
−
1
View file @
bec64eda
...
@@ -304,7 +304,8 @@ def genomeFastaRecovery(filin, limit_reference, edge, host_test = 0):
...
@@ -304,7 +304,8 @@ def genomeFastaRecovery(filin, limit_reference, edge, host_test = 0):
if
filin
==
""
:
if
filin
==
""
:
return
""
,
""
,
""
return
""
,
""
,
""
infile
=
open
(
filin
,
'
r
'
)
#infile = open(filin, 'r')
infile
=
gzip
.
open
(
filin
,
"
rt
"
)
if
filin
.
endswith
(
"
.gz
"
)
else
open
(
filin
,
'
r
'
)
name
=
[]
name
=
[]
genome
=
[]
genome
=
[]
genome_line
=
""
genome_line
=
""
...
...
This diff is collapsed.
Click to expand it.
_modules/main_utils.py
+
2
−
1
View file @
bec64eda
...
@@ -11,6 +11,7 @@ from __future__ import print_function
...
@@ -11,6 +11,7 @@ from __future__ import print_function
from
time
import
gmtime
,
strftime
from
time
import
gmtime
,
strftime
import
sys
import
sys
import
gzip
from
optparse
import
OptionParser
,
OptionGroup
from
optparse
import
OptionParser
,
OptionGroup
from
_modules.utilities
import
checkReportTitle
,
changeCase
from
_modules.utilities
import
checkReportTitle
,
changeCase
from
_modules.IData_handling
import
totReads
,
genomeFastaRecovery
from
_modules.IData_handling
import
totReads
,
genomeFastaRecovery
...
@@ -47,7 +48,7 @@ usage = """\n\nUsage: %prog -f reads.fastq -r phage_sequence.fasta [--report_tit
...
@@ -47,7 +48,7 @@ usage = """\n\nUsage: %prog -f reads.fastq -r phage_sequence.fasta [--report_tit
def
checkFastaFile
(
filin
):
def
checkFastaFile
(
filin
):
"""
Check sequence Fasta file given by user
"""
"""
Check sequence Fasta file given by user
"""
first_line
=
1
first_line
=
1
infil
=
open
(
filin
,
'
r
'
)
infil
=
gzip
.
open
(
filin
,
"
rt
"
)
if
filin
.
endswith
(
"
.gz
"
)
else
open
(
filin
,
'
r
'
)
try
:
try
:
for
line
in
infil
:
for
line
in
infil
:
# Test '>'
# Test '>'
...
...
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