Skip to content

Commit

Permalink
Add signal-peptides method to CDS annotation. #32
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna-Rehm committed May 5, 2021
1 parent 94f01f3 commit 1f355da
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bakta/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import bakta.features.crispr as crispr
import bakta.features.orf as orf
import bakta.features.cds as feat_cds
import bakta.features.signal_peptides as feat_signal_peptide
import bakta.features.s_orf as s_orf
import bakta.features.gaps as gaps
import bakta.features.ori as ori
Expand Down Expand Up @@ -261,12 +262,15 @@ def main():
with cds_fasta_path.open(mode='w') as fh:
for cds in genome['features'][bc.FEATURE_CDS]:
fh.write(f">{cds['aa_hexdigest']}-{cds['contig']}-{cds['start']}\n{cds['sequence']}\n")
log.debug('conduct expert system: amrfinder')
expert_amr_found = exp_amr.search(genome['features'][bc.FEATURE_CDS], cds_fasta_path)
print(f'\t\tamrfinder: {len(expert_amr_found)}')
log.debug('conduct expert system: aa seqs')
expert_aa_found = exp_aa_seq.search(genome['features'][bc.FEATURE_CDS], cds_fasta_path)
print(f'\t\tprotein sequences: {len(expert_aa_found)}')
# log.debug('conduct expert system: amrfinder')
# expert_amr_found = exp_amr.search(genome['features'][bc.FEATURE_CDS], cds_fasta_path)
# print(f'\t\tamrfinder: {len(expert_amr_found)}')
# log.debug('conduct expert system: aa seqs')
# expert_aa_found = exp_aa_seq.search(genome['features'][bc.FEATURE_CDS], cds_fasta_path)
# print(f'\t\tprotein sequences: {len(expert_aa_found)}')

genome['features']['bc.FEATURE_SIGNAL_PEPTIDE'] = feat_signal_peptide.execute_deepsig(genome['features'][bc.FEATURE_CDS], cds_fasta_path)
print(f"\tsignal peptides predicted: {len(genome['features']['bc.FEATURE_SIGNAL_PEPTIDE'])}")

print('\tmark hypotheticals and combine annotations...')
log.debug('combine CDS annotations')
Expand Down

0 comments on commit 1f355da

Please sign in to comment.