Skip to content

Commit

Permalink
Add CLI option to disable translation of stop codons (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
zclaas authored Jan 23, 2024
1 parent 21bd144 commit 6c8919a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pyrodigal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ def argument_parser(
type=int,
default=60,
)
parser.add_argument(
"--no-stop-codon",
required=False,
action="store_false",
help="Disables translation of stop codons into star characters (*) for complete genes.",
default=True,
)
return parser


Expand Down Expand Up @@ -266,9 +273,9 @@ def process(sequence):
# if asked, write nucleotide sequences of genes
if nuc_file is not None:
preds.write_genes(nuc_file, seq_id)
# if asked, write amino acide sequences of proteins
# if asked, write amino acid sequences of proteins
if prot_file is not None:
preds.write_translations(prot_file, seq_id)
preds.write_translations(prot_file, seq_id, include_stop=args.no_stop_codon)
# if asked, write scores
if scores_file is not None:
preds.write_scores(scores_file, seq_id)
Expand Down

0 comments on commit 6c8919a

Please sign in to comment.