Skip to content

Commit

Permalink
Fix #90 add support for contig ends with dnaapler all
Browse files Browse the repository at this point in the history
  • Loading branch information
gbouras13 committed Jan 12, 2025
1 parent 761deb4 commit 2464239
Show file tree
Hide file tree
Showing 8 changed files with 99,814 additions and 195 deletions.
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 1.0.1 (2024-11-22)

* Thanks to the inimitable @[rrwick](https://github.com/rrwick), v1.0.1 is a patch fixing a string-parsing bug.
* If your contig headers were integers, `dnaapler` did not rotate the found `BLAST/MMseqs2` hits. This was pre-existing (not introduced by v1.0.0).
* If your contig headers were integers, `dnaapler` did not rotate the found `BLAST/MMseqs2` hits. This was a pre-existing issue (not introduced by v1.0.0).

# 1.0.0 (2024-11-21)

Expand Down
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 = "1.0.1" # change VERSION too
version = "1.1.0" # change VERSION too
description = "Reorients assembled microbial sequences"
authors = ["George Bouras <[email protected]>"]
license = "MIT"
Expand Down
11 changes: 9 additions & 2 deletions src/dnaapler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
)
from dnaapler.utils.constants import DNAAPLER_DB
from dnaapler.utils.external_tools import ExternalTool
from dnaapler.utils.processing import rotate_input
from dnaapler.utils.util import (
begin_dnaapler,
check_duplicate_headers,
Expand Down Expand Up @@ -841,7 +842,7 @@ def bulk(
default="all",
type=click.STRING,
callback=validate_choice_db,
help="Lets you choose a subset of databases rather than all 3. Must be one of: 'all', 'dnaa', 'repa', terl', 'dnaa,repa', 'dnaa,terl' or 'repa,terl' ",
help="Lets you choose a subset of databases rather than all 4. Must be one of: 'all', 'dnaa', 'repa', terl', 'cog1474', 'dnaa,repa', 'dnaa,terl', 'repa,terl', 'dnaA,cog1474', 'cog1474,terl', 'cog1474,repa', 'dnaa,cog1474,repa', 'dnaa,cog1474,terl' or 'cog1474,repa,terl'",
show_default=True,
)
@click.option(
Expand Down Expand Up @@ -968,9 +969,14 @@ def all(
else:
custom_db = None

# rotate all replicons by half the length of the contig
# the rotated input for MMSeqs2 will have the original contigs + the rotated ones with suffix "rotated_"
rotated_input = os.path.join(output, "rotated_input.fasta")
rotate_input(input, rotated_input)

# runs bulk MMseqs2
run_bulk_MMseqs2(
ctx, input, output, prefix, gene, evalue, threads, custom_db=custom_db
ctx, rotated_input, output, prefix, gene, evalue, threads, custom_db=custom_db
)

# rerorients MMseqs2
Expand Down Expand Up @@ -998,6 +1004,7 @@ def all(
autocomplete,
seed_value,
custom_db=custom_db,
gene=gene,
)

# end dnaapler
Expand Down
2 changes: 1 addition & 1 deletion src/dnaapler/utils/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
1.1.0
Loading

0 comments on commit 2464239

Please sign in to comment.