Skip to content

Commit

Permalink
Change sORF signal peptide fasta file creation. #32
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna-Rehm committed May 5, 2021
1 parent d1626a5 commit 7720775
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions bakta/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def main():
if(cfg.gram != '?'):
sig_peptides_found = signal_peptide.execute_deepsig(genome['features'][bc.FEATURE_CDS], cds_fasta_path)
print(f"\tsignal peptides: {len(sig_peptides_found)}")

print('\tmark hypotheticals and combine annotations...')
log.debug('combine CDS annotations')
for feat in genome['features'][bc.FEATURE_CDS]:
Expand Down Expand Up @@ -336,12 +336,11 @@ def main():
genome['features'][bc.FEATURE_SORF] = sorfs_filtered
print(f'\tfiltered sORFs: {len(sorfs_filtered)}')

s_orfs_fasta_path = cfg.tmp_path.joinpath('sorf.faa')
with s_orfs_fasta_path.open(mode='w') as fsorf:
for sorf in genome['features'][bc.FEATURE_SORF]:
fsorf.write(f">{sorf['aa_hexdigest']}-{sorf['contig']}-{sorf['start']}\n{sorf['sequence']}\n")

if(cfg.gram != '?'):
s_orfs_fasta_path = cfg.tmp_path.joinpath('sorf.faa')
with s_orfs_fasta_path.open(mode='w') as fsorf:
for sorf in genome['features'][bc.FEATURE_SORF]:
fsorf.write(f">{sorf['aa_hexdigest']}-{sorf['contig']}-{sorf['start']}\n{sorf['sequence']}\n")
sig_peptides_found = signal_peptide.execute_deepsig(genome['features'][bc.FEATURE_SORF], s_orfs_fasta_path)
print(f"\tsignal peptides: {len(sig_peptides_found)}")

Expand Down

0 comments on commit 7720775

Please sign in to comment.