Skip to content

Commit

Permalink
add all output
Browse files Browse the repository at this point in the history
  • Loading branch information
gbouras13 committed Oct 25, 2023
1 parent a93ce5a commit 2bd7dfb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# History

# 0.4.0 (2023-10-25)

* Implemented a modification to the logic for all cases where the top blastx hit alignment does not begin with a start codon. In this case, dnaapler will find the CDS according the pyrodigal that has the most overlap with the top hit alignment. Thanks @simone-pignotti for this suggestion [here](https://github.com/gbouras13/dnaapler/issues/44).
* Changes `dnaapler all` output FASTA to `_reoriented.fasta` instead of `_all_reoriented.fasta` for consistency with all other commands (except `dnaapler bulk`).
* Adds `-a` or `--autocomplete` option with `dnaapler all`.
* Adds `dnaapler largest` and `-a largest` as an option to orient your sequence beginning with the largest

# 0.3.2 (2023-09-20)

* Changes `Orffinder` to `Genefinder` to support `pyrodigal` v3.
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@ The full documentation for `dnaapler` can be found [here](https://dnaapler.readt

## Commands

* `dnaapler all`: Reorients multiple contigs to begin with any of dnaA, terL, repA.
- Practically, this should be the most useful command for most users.

* `dnaapler chromosome`: Reorients your sequence to begin with the dnaA chromosomal replication initiator gene
* `dnaapler plasmid`: Reorients your sequence to begin with the repA plasmid replication initiation gene
* `dnaapler phage`: Reorients your sequence to begin with the terL large terminase subunit gene
* `dnaapler custom`: Reorients your sequence to begin with a custom amino acid FASTA format gene that you specify
* `dnaapler mystery`: Reorients your sequence to begin with a random CDS
* `dnaapler mystery`: Reorients your sequence to begin with a random CDS
* `dnaapler nearest`: Reorients your sequence to begin with the first CDS (nearest to the start). Designed for fixing sequences where a CDS spans the breakpoint.
* `dnaapler bulk`: Reorients multiple contigs to begin with the desired start gene - either dnaA, terL, repA or a custom gene.
* `dnaapler all`: Reorients multiple contigs to begin with any of dnaA, terL, repA.


## Installation
Expand Down Expand Up @@ -118,17 +121,17 @@ Commands:
chromosome Reorients your genome to begin with the dnaA chromosomal...
citation Print the citation(s) for this tool
custom Reorients your genome with a custom database
largest Reorients your genome the begin with the largest CDS as...
mystery Reorients your genome with a random CDS
nearest Reorients your genome the begin with the first CDS as...
phage Reorients your genome to begin with the terL large...
plasmid Reorients your genome to begin with the repA replication...
```

```
Usage: dnaapler chromosome [OPTIONS]
Usage: dnaapler all [OPTIONS]
Reorients your genome to begin with the dnaA chromosomal replication
initiation gene
Reorients multiple contigs to begin with any of dnaA, repA or terL
Options:
-h, --help Show this message and exit.
Expand All @@ -139,9 +142,11 @@ Options:
-p, --prefix TEXT Prefix for output files [default: dnaapler]
-f, --force Force overwrites the output directory
-e, --evalue TEXT e value for blastx [default: 1e-10]
--ignore PATH Text file listing contigs (one per row) that are to
be ignored
-a, --autocomplete TEXT Choose an option to autocomplete reorientation if
BLAST based approach fails. Must be one of: none,
mystery or nearest [default: none]
mystery, largest, or nearest [default: none]
--seed_value INTEGER Random seed to ensure reproducibility. [default:
13]
```
Expand Down
4 changes: 2 additions & 2 deletions src/dnaapler/utils/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def all_process_blast_output_and_reorient(
autocomplete: str,
seed_value: int,
) -> None:
"""Processes the blast output,reorients and saves all contigs into os.path.join(output, f"{prefix}_all_reoriented.fasta")
"""Processes the blast output,reorients and saves all contigs into os.path.join(output, f"{prefix}_reoriented.fasta")
:param input: input file
:param blast_file: blast output file
Expand Down Expand Up @@ -81,7 +81,7 @@ def all_process_blast_output_and_reorient(
idents = []
identitys = []

reoriented_output_file = os.path.join(output, f"{prefix}_all_reoriented.fasta")
reoriented_output_file = os.path.join(output, f"{prefix}_reoriented.fasta")

# Read the FASTA file and extract the IDs
for record in SeqIO.parse(input, "fasta"):
Expand Down

0 comments on commit 2bd7dfb

Please sign in to comment.