Skip to content

Commit

Permalink
discard support of DeepSig
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwengers committed Nov 11, 2024
1 parent ac7e00f commit 97245fa
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 148 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ RUN apk update && apk add wget tar bash \
&& cp /root/.bashrc /opt/conda/bashrc

COPY environment.yml /tmp/
RUN echo -e '\n - deepsig>=1.2.5' >> /tmp/environment.yml

SHELL ["bash", "-l" ,"-c"]

Expand Down
87 changes: 0 additions & 87 deletions bakta/features/signal_peptides.py

This file was deleted.

1 change: 0 additions & 1 deletion bakta/json_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ def main():
fh_out.write(f"CDSs: {len(cdss)}\n")
fh_out.write(f"pseudogenes: {len([cds for cds in cdss if 'pseudogene' in cds])}\n")
fh_out.write(f"hypotheticals: {len([cds for cds in cdss if 'hypothetical' in cds])}\n")
fh_out.write(f"signal peptides: {len([cds for cds in cdss if bc.FEATURE_SIGNAL_PEPTIDE in cds])}\n")
fh_out.write(f"sORFs: {len([feat for feat in features if feat['type'] == bc.FEATURE_SORF])}\n")
fh_out.write(f"gaps: {len([feat for feat in features if feat['type'] == bc.FEATURE_GAP])}\n")
fh_out.write(f"oriCs: {len([feat for feat in features if feat['type'] == bc.FEATURE_ORIC])}\n")
Expand Down
15 changes: 0 additions & 15 deletions bakta/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
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 sig_peptides
import bakta.features.s_orf as s_orf
import bakta.features.gaps as gaps
import bakta.features.ori as ori
Expand Down Expand Up @@ -310,10 +309,6 @@ def main():
user_hmm_found = exp_aa_hmms.search(cdss, cfg.user_hmms)
print(f'\t\tuser HMM sequences: {len(user_hmm_found)}')

if(cfg.gram != bc.GRAM_UNKNOWN):
sig_peptides_found = sig_peptides.search(cdss, cds_aa_path)
print(f'\tsignal peptides: {len(sig_peptides_found)}')

print('\tcombine annotations and mark hypotheticals...')
log.debug('combine CDS annotations')
for cds in cdss:
Expand Down Expand Up @@ -408,14 +403,6 @@ def main():
anno.combine_annotation(feat) # combine IPS and PSC annotations
data['features'].extend(sorfs_filtered)
print(f'\tfiltered sORFs: {len(sorfs_filtered)}')

if(cfg.gram != bc.GRAM_UNKNOWN and len(sorfs_filtered) > 0):
sorf_aa_path = cfg.tmp_path.joinpath('sorfs.faa')
with sorf_aa_path.open(mode='wt') as fh:
for sorf in sorfs_filtered:
fh.write(f">{sorf['aa_hexdigest']}-{sorf['sequence']}-{sorf['start']}\n{sorf['aa']}\n")
sig_peptides_found = sig_peptides.search(sorfs_filtered, sorf_aa_path)
print(f"\tsignal peptides: {len(sig_peptides_found)}")

############################################################################
# gap annotation
Expand Down Expand Up @@ -526,7 +513,6 @@ def main():
print(f"\tCDSs: {len(cdss)}")
print(f"\t\thypotheticals: {len([cds for cds in cdss if 'hypothetical' in cds])}")
print(f"\t\tpseudogenes: {len([cds for cds in cdss if 'pseudogene' in cds])}")
print(f"\t\tsignal peptides: {len([cds for cds in cdss if bc.FEATURE_SIGNAL_PEPTIDE in cds])}")
print(f"\tsORFs: {len([feat for feat in features if feat['type'] == bc.FEATURE_SORF])}")
print(f"\tgaps: {len([feat for feat in features if feat['type'] == bc.FEATURE_GAP])}")
print(f"\toriCs/oriVs: {len([feat for feat in features if (feat['type'] == bc.FEATURE_ORIC or feat['type'] == bc.FEATURE_ORIV)])}")
Expand Down Expand Up @@ -619,7 +605,6 @@ def main():
fh_out.write(f"CDSs: {len(cdss)}\n")
fh_out.write(f"pseudogenes: {len([cds for cds in cdss if 'pseudogene' in cds])}\n")
fh_out.write(f"hypotheticals: {len([cds for cds in cdss if 'hypothetical' in cds])}\n")
fh_out.write(f"signal peptides: {len([cds for cds in cdss if bc.FEATURE_SIGNAL_PEPTIDE in cds])}\n")
fh_out.write(f"sORFs: {len([feat for feat in features if feat['type'] == bc.FEATURE_SORF])}\n")
fh_out.write(f"gaps: {len([feat for feat in features if feat['type'] == bc.FEATURE_GAP])}\n")
fh_out.write(f"oriCs: {len([feat for feat in features if feat['type'] == bc.FEATURE_ORIC])}\n")
Expand Down
3 changes: 0 additions & 3 deletions bakta/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def print_version(self):
DEPENDENCY_PYRODIGAL = (Version(3, 5, 0), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, 'Pyrodigal', (sys.executable, '-c', 'import pyrodigal; print(pyrodigal.__version__)'), ['--skip-cds'])
DEPENDENCY_PYHMMER = (Version(0, 10, 15), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, 'Pyhmmer', (sys.executable, '-c', 'import pyhmmer; print(pyhmmer.__version__)'), ['--skip-cds', '--skip-sorf'])
DEPENDENCY_DIAMOND = (Version(2, 1, 10), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, 'Diamond', ('diamond', 'help'), ['--skip-cds', '--skip-sorf'])
DEPENDENCY_DEEPSIG = (Version(1, 2, 5), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, 'DeepSig', ('deepsig', '--version'), ['--gram ?'])
DEPENDENCY_BLASTN = (Version(2, 14, 0), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, 'Blastn', ('blastn', '-version'), ['--skip-ori'])
DEPENDENCY_AMRFINDERPLUS = (Version(4, 0, 3), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, 'AMRFinderPlus', ('amrfinder', '--version'), ['--skip-cds'])
DEPENDENCY_PYCIRCLIZE = (Version(1, 7, 0), Version(VERSION_MAX_DIGIT, VERSION_MAX_DIGIT, VERSION_MAX_DIGIT), VERSION_REGEX, 'pyCirclize', (sys.executable, '-c', 'import pycirclize; print(pycirclize.__version__)'), ['--skip-plot'])
Expand Down Expand Up @@ -251,8 +250,6 @@ def test_dependencies():
if((cfg.skip_cds is not None and cfg.skip_cds is False) or (cfg.skip_sorf is not None and cfg.skip_sorf is False)):
test_dependency(DEPENDENCY_PYHMMER)
test_dependency(DEPENDENCY_DIAMOND)
if(cfg.gram is not None and cfg.gram != '?'):
test_dependency(DEPENDENCY_DEEPSIG)

if(cfg.skip_ori is not None and cfg.skip_ori is False):
test_dependency(DEPENDENCY_BLASTN)
Expand Down
13 changes: 0 additions & 13 deletions test/test_bakta.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,6 @@
from .conftest import FILES, FILES_IO, SKIP_PARAMETERS


def check_deepsig():
command = ('deepsig', '--version')
is_available = False
try:
# tool_output = str(sp.check_output(command, stderr=sp.STDOUT)) # stderr must be added in case the tool output is not piped into stdout
sp.check_output(command, stderr=sp.STDOUT) # stderr must be added in case the tool output is not piped into stdout
is_available = True
except:
print(f"WARNING: {command[0]} not found or not executable! Skip dependen test.")
return is_available


@pytest.mark.parametrize(
'db',
[
Expand All @@ -45,7 +33,6 @@ def test_bakta_mock_skipped_features(db, tmpdir):
assert Path.exists(tmpdir_path.joinpath(file))


@pytest.mark.skipif(check_deepsig() == False, reason=f'Skip on unavailable DeepSig')
def test_bakta_plasmid(tmpdir):
# full test on plasmid
proc = run(
Expand Down
28 changes: 0 additions & 28 deletions test/test_sig_peps.py

This file was deleted.

0 comments on commit 97245fa

Please sign in to comment.