Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
panacota
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
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
Amandine PERRIN
panacota
Commits
6e92ebde
Commit
6e92ebde
authored
3 years ago
by
Amandine PERRIN
Browse files
Options
Downloads
Patches
Plain Diff
change taxid to test difference between genbank and refseq
parent
770b32a3
No related branches found
No related tags found
No related merge requests found
Pipeline
#82240
failed
3 years ago
Stage: test
Stage: coverage
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_unit/test_prepare/test_download.py
+6
-5
6 additions, 5 deletions
test/test_unit/test_prepare/test_download.py
with
6 additions
and
5 deletions
test/test_unit/test_prepare/test_download.py
+
6
−
5
View file @
6e92ebde
...
@@ -693,8 +693,9 @@ def test_download_2taxid(caplog):
...
@@ -693,8 +693,9 @@ def test_download_2taxid(caplog):
def
test_download_refseq_vs_genbank
(
caplog
):
def
test_download_refseq_vs_genbank
(
caplog
):
"""
"""
Give a taxid of a subspecies, download strains from refseq, and then from genbank.
Give a taxid of a subspecies, download strains from refseq, and then from genbank.
Currently, no strains in refseq, and 2 in genbank.
Currently, no strains in refseq, and 8 in genbank.
39831 = Klebsiella pneumoniae subsp. rhinoscleromatis
#39831 = Klebsiella pneumoniae subsp. rhinoscleromatis
60 = Vitreoscilla sp.
Later, there can be some in refseq, but always at least 2 more in genbank
Later, there can be some in refseq, but always at least 2 more in genbank
"""
"""
caplog
.
set_level
(
logging
.
INFO
)
caplog
.
set_level
(
logging
.
INFO
)
...
@@ -702,7 +703,7 @@ def test_download_refseq_vs_genbank(caplog):
...
@@ -702,7 +703,7 @@ def test_download_refseq_vs_genbank(caplog):
section
=
"
refseq
"
section
=
"
refseq
"
NCBI_species
=
None
NCBI_species
=
None
NCBI_species_taxid
=
""
NCBI_species_taxid
=
""
NCBI_taxid
=
"
39831
"
NCBI_taxid
=
"
60
"
NCBI_strains
=
""
NCBI_strains
=
""
outdir
=
os
.
path
.
join
(
GENEPATH
,
"
test_download_refseq_genbank
"
)
outdir
=
os
.
path
.
join
(
GENEPATH
,
"
test_download_refseq_genbank
"
)
levels
=
""
levels
=
""
...
@@ -721,7 +722,7 @@ def test_download_refseq_vs_genbank(caplog):
...
@@ -721,7 +722,7 @@ def test_download_refseq_vs_genbank(caplog):
assert
not
os
.
path
.
isdir
(
ngd_outdir
)
assert
not
os
.
path
.
isdir
(
ngd_outdir
)
# Check logs
# Check logs
assert
(
"
From refseq: Downloading genomes with NCBI_taxid =
39831
"
)
in
caplog
.
text
assert
(
"
From refseq: Downloading genomes with NCBI_taxid =
60
"
)
in
caplog
.
text
assert
"
ERROR
"
in
caplog
.
text
assert
"
ERROR
"
in
caplog
.
text
assert
(
"
No strain correspond to your request. If you are sure there should have
"
assert
(
"
No strain correspond to your request. If you are sure there should have
"
"
some, check that you gave valid NCBI taxid and/or
"
"
some, check that you gave valid NCBI taxid and/or
"
...
@@ -745,7 +746,7 @@ def test_download_refseq_vs_genbank(caplog):
...
@@ -745,7 +746,7 @@ def test_download_refseq_vs_genbank(caplog):
assert
os
.
path
.
isdir
(
db_dir
)
assert
os
.
path
.
isdir
(
db_dir
)
assert
len
(
os
.
listdir
(
db_dir
))
==
nb_gen
assert
len
(
os
.
listdir
(
db_dir
))
==
nb_gen
# Check log giving only species taxid
# Check log giving only species taxid
assert
(
"
From genbank: Downloading genomes with NCBI_taxid =
39831
"
)
in
caplog
.
text
assert
(
"
From genbank: Downloading genomes with NCBI_taxid =
60
"
)
in
caplog
.
text
# Check that assembly summary file was donwloaded as expected
# Check that assembly summary file was donwloaded as expected
sum_file
=
os
.
path
.
join
(
outdir2
,
"
assembly_summary-refseq-genbank.txt
"
)
sum_file
=
os
.
path
.
join
(
outdir2
,
"
assembly_summary-refseq-genbank.txt
"
)
assert
os
.
path
.
isfile
(
sum_file
)
assert
os
.
path
.
isfile
(
sum_file
)
...
...
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