Skip to content

Commit

Permalink
refactor: use refactored antismash downloader module in `PODPDownload…
Browse files Browse the repository at this point in the history
…er` class (#138)

* create `podp_download_and_extract_antismash_data` function which uses `antismash_downloader` function

* rename `_resolve_genome_id_data` to `_resolve_refseq_access_id`

* rename `best_id` as `raw_genome_id`

* rename `resolved_id` as `resolved_refseq_id`

* add `download_and_extract_antismash_data` to the refactored `podp_download_and_extract_antismash_data`

* add tests for podp_antismash_downloader.py

* add/improve doc strings in podp_antismash_downloader.py

* add type hints in podp_antismash_downloader.py

* fix prospector errors in podp_antismash_downloader.py

---------

Co-authored-by: Cunliang Geng <c.geng@esciencecenter.nl>
  • Loading branch information
gcroci2 and CunliangGeng committed Jun 21, 2023
1 parent e9e2957 commit 1188038
Show file tree
Hide file tree
Showing 4 changed files with 800 additions and 202 deletions.
9 changes: 9 additions & 0 deletions src/nplinker/pairedomics/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
import logging
from .podp_antismash_downloader import download_antismash_data
from .podp_antismash_downloader import podp_download_and_extract_antismash_data

logging.getLogger(__name__).addHandler(logging.NullHandler())

__all__ = [
"download_antismash_data",
"podp_download_and_extract_antismash_data"
]
4 changes: 2 additions & 2 deletions src/nplinker/pairedomics/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from nplinker.metabolomics.gnps.gnps_extractor import GNPSExtractor
from nplinker.strain_collection import StrainCollection
from nplinker.strains import Strain
from . import download_antismash_data
from . import podp_download_and_extract_antismash_data
from .runbigscape import run_bigscape

logger = LogConfig.getLogger(__name__)
Expand Down Expand Up @@ -152,7 +152,7 @@ def get(self, do_bigscape, extra_bigscape_parameters, use_mibig,

self._download_metabolomics_zipfile(self.gnps_task_id)

download_antismash_data(self.project_json['genomes'],
podp_download_and_extract_antismash_data(self.project_json['genomes'],
self.project_download_cache,
self.project_file_cache)

Expand Down
Loading

0 comments on commit 1188038

Please sign in to comment.