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
Amandine PERRIN
pipeline_annotation
Commits
6e92ebde
Commit
6e92ebde
authored
May 24, 2022
by
Amandine PERRIN
Browse files
change taxid to test difference between genbank and refseq
parent
770b32a3
Pipeline
#82240
failed with stages
in 6 minutes and 19 seconds
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
test/test_unit/test_prepare/test_download.py
View file @
6e92ebde
...
...
@@ -693,8 +693,9 @@ def test_download_2taxid(caplog):
def
test_download_refseq_vs_genbank
(
caplog
):
"""
Give a taxid of a subspecies, download strains from refseq, and then from genbank.
Currently, no strains in refseq, and 2 in genbank.
39831 = Klebsiella pneumoniae subsp. rhinoscleromatis
Currently, no strains in refseq, and 8 in genbank.
#39831 = Klebsiella pneumoniae subsp. rhinoscleromatis
60 = Vitreoscilla sp.
Later, there can be some in refseq, but always at least 2 more in genbank
"""
caplog
.
set_level
(
logging
.
INFO
)
...
...
@@ -702,7 +703,7 @@ def test_download_refseq_vs_genbank(caplog):
section
=
"refseq"
NCBI_species
=
None
NCBI_species_taxid
=
""
NCBI_taxid
=
"
39831
"
NCBI_taxid
=
"
60
"
NCBI_strains
=
""
outdir
=
os
.
path
.
join
(
GENEPATH
,
"test_download_refseq_genbank"
)
levels
=
""
...
...
@@ -721,7 +722,7 @@ def test_download_refseq_vs_genbank(caplog):
assert
not
os
.
path
.
isdir
(
ngd_outdir
)
# 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
(
"No strain correspond to your request. If you are sure there should have "
"some, check that you gave valid NCBI taxid and/or "
...
...
@@ -745,7 +746,7 @@ def test_download_refseq_vs_genbank(caplog):
assert
os
.
path
.
isdir
(
db_dir
)
assert
len
(
os
.
listdir
(
db_dir
))
==
nb_gen
# 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
sum_file
=
os
.
path
.
join
(
outdir2
,
"assembly_summary-refseq-genbank.txt"
)
assert
os
.
path
.
isfile
(
sum_file
)
...
...
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