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
8eba8172
Commit
8eba8172
authored
4 years ago
by
Amandine PERRIN
Browse files
Options
Downloads
Patches
Plain Diff
warning if no species name nor output directory given
parent
e5d5ed50
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PanACoTA/subcommands/prepare.py
+3
-2
3 additions, 2 deletions
PanACoTA/subcommands/prepare.py
test/test_functional/test_prepare-parser.py
+3
-2
3 additions, 2 deletions
test/test_functional/test_prepare-parser.py
with
6 additions
and
4 deletions
PanACoTA/subcommands/prepare.py
+
3
−
2
View file @
8eba8172
...
...
@@ -476,8 +476,9 @@ def check_args(parser, args):
# WARNINGS
# User did not specify a species name
if
not
args
.
NCBI_species
:
print
(
colored
(
"
WARNING: you did not provide a species name (
'
-s species
'
option
'
).
"
if
not
args
.
NCBI_species
and
not
args
.
outdir
:
print
(
colored
(
"
WARNING: you did not provide a species name (
'
-s species
'
option
'
)
"
"
nor an output directory (
'
-o outdir
'
).
"
"
All files will be downloaded in a folder called with the NCBI species
"
f
"
taxid
{
args
.
NCBI_species_taxid
}
instead of the species name.
"
,
"
yellow
"
))
# If user wants to cut genomes, warn him to check that it is on purpose (because default is cut at each 5'N')
...
...
This diff is collapsed.
Click to expand it.
test/test_functional/test_prepare-parser.py
+
3
−
2
View file @
8eba8172
...
...
@@ -336,13 +336,14 @@ def test_parser_nospecies(capsys):
"""
parser
=
argparse
.
ArgumentParser
(
description
=
"
Prepare
"
,
add_help
=
False
)
prepare
.
build_parser
(
parser
)
options
=
prepare
.
parse
(
parser
,
"
-t 1234
-o outdir
"
.
split
())
options
=
prepare
.
parse
(
parser
,
"
-t 1234
"
.
split
())
assert
not
options
.
no_refseq
assert
not
options
.
only_mash
assert
options
.
NCBI_species_taxid
==
"
1234
"
assert
options
.
NCBI_species
==
""
out
,
err
=
capsys
.
readouterr
()
assert
(
"
WARNING: you did not provide a species name (
'
-s species
'
option
'
).
"
assert
(
"
WARNING: you did not provide a species name (
'
-s species
'
option
'
)
"
"
nor an output directory (
'
-o outdir
'
).
"
"
All files will be downloaded in a folder called with the NCBI species
"
"
taxid 1234 instead of the species name.
"
)
in
out
...
...
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