Skip to content

Commit

Permalink
add dnaa,repa,cog1474 option for hybracter
Browse files Browse the repository at this point in the history
  • Loading branch information
gbouras13 committed Sep 16, 2024
1 parent 8484a4d commit 73042f7
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dnaapler"
version = "0.8.0" # change VERSION too
version = "0.8.1" # change VERSION too
description = "Reorients assembled microbial sequences"
authors = ["George Bouras <[email protected]>"]
license = "MIT"
Expand Down
12 changes: 12 additions & 0 deletions src/dnaapler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,18 @@ def all(
gene = "repA,terL"
elif db == "cog1474":
gene = "cog1474"
elif db == "dnaA,cog1474":
gene = "dnaA,cog1474"
elif db == "cog1474,terl":
gene = "cog1474,terL"
elif db == "repa,cog1474":
gene = "repA,cog1474"
elif db == "dnaa,repa,cog1474":
gene = "dnaa,repa,cog1474"
elif db == "dnaa,terl,cog1474":
gene = "dnaa,terl,cog1474"
elif db == "repa,terl,cog1474":
gene = "repa,terl,cog1474"

# custom
if custom_db != "":
Expand Down
2 changes: 1 addition & 1 deletion src/dnaapler/utils/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0
0.8.1
2 changes: 1 addition & 1 deletion src/dnaapler/utils/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def validate_choice_db(ctx, param, value):
"""
checks the click.Choice option for the mode flag in bulk subcommand
"""
choices = ["all", "dnaa", "repa", "terl", "dnaa,repa", "dnaa,terl", "repa,terl"]
choices = ["all", "dnaa", "repa", "terl", "dnaa,repa", "dnaa,terl", "repa,terl", "cog1474", "dnaA,cog1474", "cog1474,terl", "repa,cog1474", "dnaa,repa,cog1474", "dnaa,terl,cog1474", "repa,terl,cog1474"]
if value not in choices:
raise click.BadParameter(f"Invalid choice. Choose from {', '.join(choices)}")
return value
Expand Down
9 changes: 9 additions & 0 deletions tests/test_overall.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ def test_all_dnaa_repa(tmp_dir):
cmd = f"dnaapler all -i {input_fasta} -o {tmp_dir} -t 1 -f --db dnaa,repa"
exec_command(cmd)

"""
this one is for hybracter
"""
def test_all_dnaa_repa_cog1474(tmp_dir):
"""test all dnaa repa cog1474 - for hybracter"""
input_fasta: Path = f"{overall_test_data}/all_test.fasta"
cmd = f"dnaapler all -i {input_fasta} -o {tmp_dir} -t 1 -f --db dnaa,repa,cog1474"
exec_command(cmd)


def test_all_dnaa_terl(tmp_dir):
"""test all dnaa terl"""
Expand Down

0 comments on commit 73042f7

Please sign in to comment.