diff --git a/.gitpod.yml b/.gitpod.yml index 40f2723..6eb5c26 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -12,6 +12,7 @@ tasks: mkdir -p .vscode echo '{"python.pythonPath": "/home/gitpod/.conda/envs/bactopia-py/bin/python"}' > .vscode/settings.json pre-commit install --install-hooks + just install command: | vscode: @@ -26,5 +27,4 @@ vscode: - streetsidesoftware.code-spell-checker # Spelling checker for source code - ms-python.black-formatter # Support for Python Black formatter - njpwerner.autodocstring # Use type hints to auto create doc strings - - github.copilot # Load up Copilot - ms-python.python # Syntax and linting diff --git a/CHANGELOG.md b/CHANGELOG.md index 76c17b8..c73f647 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## 1.0.3 + +- Fixed `bactopia-search` using missing columns in the query +- dropped pysradb dependency + ## 1.0.2 - Added `bactopia-datasets` to download optional datasets outside of Nextflow diff --git a/bactopia/cli/search.py b/bactopia/cli/search.py index 284ecc6..147fe5b 100644 --- a/bactopia/cli/search.py +++ b/bactopia/cli/search.py @@ -5,12 +5,12 @@ import sys from pathlib import Path +import pandas as pd import requests import rich import rich.console import rich.traceback import rich_click as click -from pysradb import SRAweb from rich.logging import RichHandler import bactopia @@ -30,6 +30,7 @@ "--limit", "--accession-limit", "--biosample-subset", + "--include-empty", ], }, { @@ -55,83 +56,21 @@ }, ] } +ENA_URL = "https://www.ebi.ac.uk/ena/portal/api/search" -ENA_URL = "https://www.ebi.ac.uk/ena/portal/api/search" -FIELDS = [ - "study_accession", - "secondary_study_accession", - "sample_accession", - "secondary_sample_accession", - "experiment_accession", - "run_accession", - "submission_accession", - "tax_id", - "scientific_name", - "instrument_platform", - "instrument_model", - "library_name", - "library_layout", - "nominal_length", - "library_strategy", - "library_source", - "library_selection", - "read_count", - "base_count", - "center_name", - "first_public", - "last_updated", - "experiment_title", - "study_title", - "study_alias", - "experiment_alias", - "run_alias", - "fastq_bytes", - "fastq_md5", - "fastq_ftp", - "fastq_aspera", - "fastq_galaxy", - "submitted_bytes", - "submitted_md5", - "submitted_ftp", - "submitted_aspera", - "submitted_galaxy", - "submitted_format", - "sra_bytes", - "sra_md5", - "sra_ftp", - "sra_aspera", - "sra_galaxy", - "cram_index_ftp", - "cram_index_aspera", - "cram_index_galaxy", - "sample_alias", - "broker_name", - "sample_title", - "first_created", -] - - -def get_sra_metadata(query: str) -> list: - """Fetch metadata from SRA. +def get_ena_metadata(query: str, is_accession: bool, limit: int): + """Fetch metadata from ENA. + https://docs.google.com/document/d/1CwoY84MuZ3SdKYocqssumghBF88PWxUZ/edit#heading=h.ag0eqy2wfin5 + Args: - query (str): The accession to search for. + query (str): The query to search for. + is_accession (bool): If the query is an accession or not. + limit (int): The maximum number of records to return. + Returns: list: Records associated with the accession. """ - # - db = SRAweb() - df = db.search_sra( - query, detailed=True, sample_attribute=True, expand_sample_attributes=True - ) - if df is None: - return [False, []] - return [True, df.to_dict(orient="records")] - - -def get_ena_metadata(query, is_accession, limit=1000000): - """USE ENA's API to retrieve the latest results.""" - # ENA browser info: http://www.ebi.ac.uk/ena/about/browser data = { "dataPortal": "ena", "dccDataOnly": "false", @@ -139,7 +78,7 @@ def get_ena_metadata(query, is_accession, limit=1000000): "result": "read_run", "format": "tsv", "limit": limit, - "fields": ",".join(FIELDS), + "fields": "all", } if is_accession: @@ -154,6 +93,7 @@ def get_ena_metadata(query, is_accession, limit=1000000): ) headers = {"accept": "*/*", "Content-type": "application/x-www-form-urlencoded"} + r = requests.post(ENA_URL, headers=headers, data=data) if r.status_code == requests.codes.ok: data = [] @@ -170,8 +110,8 @@ def get_ena_metadata(query, is_accession, limit=1000000): return [False, [r.status_code, r.text]] -def get_metadata( - query: str, ena_query: str, is_accession: bool, limit: int = 1000000 +def get_run_info( + sra_query: str, ena_query: str, is_accession: bool, limit: int = 1000000 ) -> tuple: """Retrieve a list of samples available from ENA. @@ -179,7 +119,7 @@ def get_metadata( capture those samples not yet synced between ENA and SRA. Args: - query (str): The original query. + sra_query (str): A formatted query for SRA searches. ena_query (str): A formatted query for ENA searches. is_accession (bool): If the query is an accession or not. limit (int): The maximum number of records to return. @@ -187,20 +127,16 @@ def get_metadata( Returns: tuple: Records associated with the accession. """ + logging.debug("Querying ENA for metadata...") - success, ena_data = get_ena_metadata(ena_query, is_accession, limit) + success, ena_data = get_ena_metadata(ena_query, is_accession, limit=limit) if success: - return ena_data + return success, ena_data else: - logging.debug("Failed to get metadata from ENA. Trying SRA...") - success, sra_data = get_sra_metadata(query) - if not success: - logging.error("There was an issue querying ENA and SRA, exiting...") - logging.error(f"STATUS: {ena_data[0]}") - logging.error(f"TEXT: {ena_data[1]}") - sys.exit(1) - else: - return sra_data + logging.error("There was an issue querying ENA, exiting...") + logging.error(f"STATUS: {ena_data[0]}") + logging.error(f"TEXT: {ena_data[1]}") + sys.exit(1) def parse_accessions( @@ -231,14 +167,17 @@ def parse_accessions( "filtered": [], } for result in results: + instrument_key = ( + "instrument_platform" + if "instrument_platform" in result + else "instrument_model_desc" + ) if ( - result["instrument_platform"] == "ILLUMINA" - or result["instrument_platform"] == "OXFORD_NANOPORE" + result[instrument_key] == "ILLUMINA" + or result[instrument_key] == "OXFORD_NANOPORE" ): technology = ( - "ont" - if result["instrument_platform"] == "OXFORD_NANOPORE" - else "illumina" + "ont" if result[instrument_key] == "OXFORD_NANOPORE" else "illumina" ) passes = True reason = [] @@ -329,6 +268,8 @@ def parse_query(q, accession_limit, exact_taxon=False): else: queries.append(q) results = [] + bioproject_accessions = [] + biosample_accessions = [] experiment_accessions = [] run_accessions = [] @@ -336,40 +277,42 @@ def parse_query(q, accession_limit, exact_taxon=False): try: taxon_id = int(query) if exact_taxon: - results.append(["taxon", f"tax_eq({taxon_id})"]) + results.append( + ["taxon", f"tax_eq({taxon_id})", f"txid{taxon_id}[Organism:noexp]"] + ) else: - results.append(["taxon_tree", f"tax_tree({taxon_id})"]) + results.append( + [ + "taxon_tree", + f"tax_tree({taxon_id})", + f"txid{taxon_id}[Organism:exp]", + ] + ) except ValueError: # It is a accession or scientific name # Test Accession # Thanks! https://ena-docs.readthedocs.io/en/latest/submit/general-guide/accessions.html#accession-numbers if re.match(r"^PRJ[EDN][A-Z][0-9]+$|^[EDS]RP[0-9]{6,}$", query): - results.append( - [ - "bioproject", - f"(study_accession={query} OR secondary_study_accession={query})", - ] - ) + bioproject_accessions.append(query) elif re.match(r"^SAM[EDN][A-Z]?[0-9]+$|^[EDS]RS[0-9]{6,}$", query): - results.append( - [ - "biosample", - f"(sample_accession={query} OR secondary_sample_accession={query})", - ] - ) + biosample_accessions.append(query) elif re.match(r"^[EDS]RX[0-9]{6,}$", query): experiment_accessions.append(query) elif re.match(r"^[EDS]RR[0-9]{6,}$", query): run_accessions.append(query) else: # Assuming it is a scientific name - results.append(["taxon_name", f'tax_name("{query}")']) + results.append(["taxon_name", f'tax_name("{query}")', f"'{query}'"]) # Split the accessions into set number + for chunk in chunks(bioproject_accessions, accession_limit): + results.append(["bioproject_accession", ",".join(chunk), " OR ".join(chunk)]) + for chunk in chunks(biosample_accessions, accession_limit): + results.append(["biosample_accession", ",".join(chunk), " OR ".join(chunk)]) for chunk in chunks(experiment_accessions, accession_limit): - results.append(["experiment_accession", ",".join(chunk)]) + results.append(["experiment_accession", ",".join(chunk), " OR ".join(chunk)]) for chunk in chunks(run_accessions, accession_limit): - results.append(["run_accession", ",".join(chunk)]) + results.append(["run_accession", ",".join(chunk), " OR ".join(chunk)]) return results @@ -441,6 +384,11 @@ def parse_query(q, accession_limit, exact_taxon=False): show_default=True, help="Genome size to be used for all samples, and for calculating min coverage", ) +@click.option( + "--include-empty", + is_flag=True, + help="Include metadata columns that are empty for all rows", +) @click.option("--force", is_flag=True, help="Overwrite existing reports") @click.option("--verbose", is_flag=True, help="Increase the verbosity of output") @click.option("--silent", is_flag=True, help="Only critical errors will be printed") @@ -456,6 +404,7 @@ def search( min_read_length, min_coverage, genome_size, + include_empty, force, verbose, silent, @@ -478,7 +427,7 @@ def search( if min_coverage and genome_size: if min_base_count: - print( + logging.error( "--min_base_count cannot be used with --coverage/--genome_size. Exiting...", file=sys.stderr, ) @@ -486,7 +435,7 @@ def search( else: min_base_count = min_coverage * genome_size elif min_coverage or genome_size: - print( + logging.error( "--coverage and --genome_size must be used together. Exiting...", file=sys.stderr, ) @@ -494,7 +443,7 @@ def search( if biosample_subset > 0: if not is_biosample(query): - print( + logging.error( "--biosample_subset requires a single BioSample. Input query: {query} is not a BioSample. Exiting...", file=sys.stderr, ) @@ -519,10 +468,12 @@ def search( filtered_file = f"{outdir}/{prefix}-filtered.txt".replace("//", "/") summary_file = f"{outdir}/{prefix}-search.txt".replace("//", "/") genome_sizes = get_ncbi_genome_size() - for query_type, query in queries: + for query_type, ena_query, sra_query in queries: logging.info(f"Submitting query (type - {query_type})") is_accession = True if query_type.endswith("accession") else False - success, query_results = get_ena_metadata(query, is_accession, limit=limit) + success, query_results = get_run_info( + sra_query, ena_query, is_accession, limit=limit + ) results += query_results if success: query_accessions, query_filtered = parse_accessions( @@ -602,10 +553,13 @@ def search( # Output the results logging.info(f"Writing results to {metadata_file}") with open(metadata_file, "w") as output_fh: - output_fh.write(f"{results[0].keys()}\n") - for result in results: - if result: - output_fh.write(f"{result}\n") + df = pd.DataFrame.from_dict(results) + if not include_empty: + logging.debug(f"Removing empty columns from {metadata_file}") + df.replace("", float("NaN"), inplace=True) + df.dropna(inplace=True, how="all", axis=1) + df.replace(float("NaN"), "", inplace=True) + df.to_csv(output_fh, sep="\t", index=False) logging.info(f"Writing accessions to {accessions_file}") with open(accessions_file, "w") as output_fh: diff --git a/poetry.lock b/poetry.lock index 2637215..7d0968d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -298,99 +298,6 @@ pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib" plugins = ["setuptools"] requirements-deprecated-finder = ["pip-api", "pipreqs"] -[[package]] -name = "lxml" -version = "4.9.2" -description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" -files = [ - {file = "lxml-4.9.2-cp27-cp27m-macosx_10_15_x86_64.whl", hash = "sha256:76cf573e5a365e790396a5cc2b909812633409306c6531a6877c59061e42c4f2"}, - {file = "lxml-4.9.2-cp27-cp27m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b1f42b6921d0e81b1bcb5e395bc091a70f41c4d4e55ba99c6da2b31626c44892"}, - {file = "lxml-4.9.2-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:9f102706d0ca011de571de32c3247c6476b55bb6bc65a20f682f000b07a4852a"}, - {file = "lxml-4.9.2-cp27-cp27m-win32.whl", hash = "sha256:8d0b4612b66ff5d62d03bcaa043bb018f74dfea51184e53f067e6fdcba4bd8de"}, - {file = "lxml-4.9.2-cp27-cp27m-win_amd64.whl", hash = "sha256:4c8f293f14abc8fd3e8e01c5bd86e6ed0b6ef71936ded5bf10fe7a5efefbaca3"}, - {file = "lxml-4.9.2-cp27-cp27mu-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2899456259589aa38bfb018c364d6ae7b53c5c22d8e27d0ec7609c2a1ff78b50"}, - {file = "lxml-4.9.2-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6749649eecd6a9871cae297bffa4ee76f90b4504a2a2ab528d9ebe912b101975"}, - {file = "lxml-4.9.2-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:a08cff61517ee26cb56f1e949cca38caabe9ea9fbb4b1e10a805dc39844b7d5c"}, - {file = "lxml-4.9.2-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:85cabf64adec449132e55616e7ca3e1000ab449d1d0f9d7f83146ed5bdcb6d8a"}, - {file = "lxml-4.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:8340225bd5e7a701c0fa98284c849c9b9fc9238abf53a0ebd90900f25d39a4e4"}, - {file = "lxml-4.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:1ab8f1f932e8f82355e75dda5413a57612c6ea448069d4fb2e217e9a4bed13d4"}, - {file = "lxml-4.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:699a9af7dffaf67deeae27b2112aa06b41c370d5e7633e0ee0aea2e0b6c211f7"}, - {file = "lxml-4.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b9cc34af337a97d470040f99ba4282f6e6bac88407d021688a5d585e44a23184"}, - {file = "lxml-4.9.2-cp310-cp310-win32.whl", hash = "sha256:d02a5399126a53492415d4906ab0ad0375a5456cc05c3fc0fc4ca11771745cda"}, - {file = "lxml-4.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:a38486985ca49cfa574a507e7a2215c0c780fd1778bb6290c21193b7211702ab"}, - {file = "lxml-4.9.2-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:c83203addf554215463b59f6399835201999b5e48019dc17f182ed5ad87205c9"}, - {file = "lxml-4.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:2a87fa548561d2f4643c99cd13131acb607ddabb70682dcf1dff5f71f781a4bf"}, - {file = "lxml-4.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:d6b430a9938a5a5d85fc107d852262ddcd48602c120e3dbb02137c83d212b380"}, - {file = "lxml-4.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:3efea981d956a6f7173b4659849f55081867cf897e719f57383698af6f618a92"}, - {file = "lxml-4.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:df0623dcf9668ad0445e0558a21211d4e9a149ea8f5666917c8eeec515f0a6d1"}, - {file = "lxml-4.9.2-cp311-cp311-win32.whl", hash = "sha256:da248f93f0418a9e9d94b0080d7ebc407a9a5e6d0b57bb30db9b5cc28de1ad33"}, - {file = "lxml-4.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:3818b8e2c4b5148567e1b09ce739006acfaa44ce3156f8cbbc11062994b8e8dd"}, - {file = "lxml-4.9.2-cp35-cp35m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ca989b91cf3a3ba28930a9fc1e9aeafc2a395448641df1f387a2d394638943b0"}, - {file = "lxml-4.9.2-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:822068f85e12a6e292803e112ab876bc03ed1f03dddb80154c395f891ca6b31e"}, - {file = "lxml-4.9.2-cp35-cp35m-win32.whl", hash = "sha256:be7292c55101e22f2a3d4d8913944cbea71eea90792bf914add27454a13905df"}, - {file = "lxml-4.9.2-cp35-cp35m-win_amd64.whl", hash = "sha256:998c7c41910666d2976928c38ea96a70d1aa43be6fe502f21a651e17483a43c5"}, - {file = "lxml-4.9.2-cp36-cp36m-macosx_10_15_x86_64.whl", hash = "sha256:b26a29f0b7fc6f0897f043ca366142d2b609dc60756ee6e4e90b5f762c6adc53"}, - {file = "lxml-4.9.2-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:ab323679b8b3030000f2be63e22cdeea5b47ee0abd2d6a1dc0c8103ddaa56cd7"}, - {file = "lxml-4.9.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:689bb688a1db722485e4610a503e3e9210dcc20c520b45ac8f7533c837be76fe"}, - {file = "lxml-4.9.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:f49e52d174375a7def9915c9f06ec4e569d235ad428f70751765f48d5926678c"}, - {file = "lxml-4.9.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:36c3c175d34652a35475a73762b545f4527aec044910a651d2bf50de9c3352b1"}, - {file = "lxml-4.9.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a35f8b7fa99f90dd2f5dc5a9fa12332642f087a7641289ca6c40d6e1a2637d8e"}, - {file = "lxml-4.9.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:58bfa3aa19ca4c0f28c5dde0ff56c520fbac6f0daf4fac66ed4c8d2fb7f22e74"}, - {file = "lxml-4.9.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc718cd47b765e790eecb74d044cc8d37d58562f6c314ee9484df26276d36a38"}, - {file = "lxml-4.9.2-cp36-cp36m-win32.whl", hash = "sha256:d5bf6545cd27aaa8a13033ce56354ed9e25ab0e4ac3b5392b763d8d04b08e0c5"}, - {file = "lxml-4.9.2-cp36-cp36m-win_amd64.whl", hash = "sha256:3ab9fa9d6dc2a7f29d7affdf3edebf6ece6fb28a6d80b14c3b2fb9d39b9322c3"}, - {file = "lxml-4.9.2-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:05ca3f6abf5cf78fe053da9b1166e062ade3fa5d4f92b4ed688127ea7d7b1d03"}, - {file = "lxml-4.9.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:a5da296eb617d18e497bcf0a5c528f5d3b18dadb3619fbdadf4ed2356ef8d941"}, - {file = "lxml-4.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:04876580c050a8c5341d706dd464ff04fd597095cc8c023252566a8826505726"}, - {file = "lxml-4.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:c9ec3eaf616d67db0764b3bb983962b4f385a1f08304fd30c7283954e6a7869b"}, - {file = "lxml-4.9.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2a29ba94d065945944016b6b74e538bdb1751a1db6ffb80c9d3c2e40d6fa9894"}, - {file = "lxml-4.9.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a82d05da00a58b8e4c0008edbc8a4b6ec5a4bc1e2ee0fb6ed157cf634ed7fa45"}, - {file = "lxml-4.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:223f4232855ade399bd409331e6ca70fb5578efef22cf4069a6090acc0f53c0e"}, - {file = "lxml-4.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d17bc7c2ccf49c478c5bdd447594e82692c74222698cfc9b5daae7ae7e90743b"}, - {file = "lxml-4.9.2-cp37-cp37m-win32.whl", hash = "sha256:b64d891da92e232c36976c80ed7ebb383e3f148489796d8d31a5b6a677825efe"}, - {file = "lxml-4.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:a0a336d6d3e8b234a3aae3c674873d8f0e720b76bc1d9416866c41cd9500ffb9"}, - {file = "lxml-4.9.2-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:da4dd7c9c50c059aba52b3524f84d7de956f7fef88f0bafcf4ad7dde94a064e8"}, - {file = "lxml-4.9.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:821b7f59b99551c69c85a6039c65b75f5683bdc63270fec660f75da67469ca24"}, - {file = "lxml-4.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:e5168986b90a8d1f2f9dc1b841467c74221bd752537b99761a93d2d981e04889"}, - {file = "lxml-4.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:8e20cb5a47247e383cf4ff523205060991021233ebd6f924bca927fcf25cf86f"}, - {file = "lxml-4.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:13598ecfbd2e86ea7ae45ec28a2a54fb87ee9b9fdb0f6d343297d8e548392c03"}, - {file = "lxml-4.9.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:880bbbcbe2fca64e2f4d8e04db47bcdf504936fa2b33933efd945e1b429bea8c"}, - {file = "lxml-4.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:7d2278d59425777cfcb19735018d897ca8303abe67cc735f9f97177ceff8027f"}, - {file = "lxml-4.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5344a43228767f53a9df6e5b253f8cdca7dfc7b7aeae52551958192f56d98457"}, - {file = "lxml-4.9.2-cp38-cp38-win32.whl", hash = "sha256:925073b2fe14ab9b87e73f9a5fde6ce6392da430f3004d8b72cc86f746f5163b"}, - {file = "lxml-4.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:9b22c5c66f67ae00c0199f6055705bc3eb3fcb08d03d2ec4059a2b1b25ed48d7"}, - {file = "lxml-4.9.2-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:5f50a1c177e2fa3ee0667a5ab79fdc6b23086bc8b589d90b93b4bd17eb0e64d1"}, - {file = "lxml-4.9.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:090c6543d3696cbe15b4ac6e175e576bcc3f1ccfbba970061b7300b0c15a2140"}, - {file = "lxml-4.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:63da2ccc0857c311d764e7d3d90f429c252e83b52d1f8f1d1fe55be26827d1f4"}, - {file = "lxml-4.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:5b4545b8a40478183ac06c073e81a5ce4cf01bf1734962577cf2bb569a5b3bbf"}, - {file = "lxml-4.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2e430cd2824f05f2d4f687701144556646bae8f249fd60aa1e4c768ba7018947"}, - {file = "lxml-4.9.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6804daeb7ef69e7b36f76caddb85cccd63d0c56dedb47555d2fc969e2af6a1a5"}, - {file = "lxml-4.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a6e441a86553c310258aca15d1c05903aaf4965b23f3bc2d55f200804e005ee5"}, - {file = "lxml-4.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ca34efc80a29351897e18888c71c6aca4a359247c87e0b1c7ada14f0ab0c0fb2"}, - {file = "lxml-4.9.2-cp39-cp39-win32.whl", hash = "sha256:6b418afe5df18233fc6b6093deb82a32895b6bb0b1155c2cdb05203f583053f1"}, - {file = "lxml-4.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:f1496ea22ca2c830cbcbd473de8f114a320da308438ae65abad6bab7867fe38f"}, - {file = "lxml-4.9.2-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:b264171e3143d842ded311b7dccd46ff9ef34247129ff5bf5066123c55c2431c"}, - {file = "lxml-4.9.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:0dc313ef231edf866912e9d8f5a042ddab56c752619e92dfd3a2c277e6a7299a"}, - {file = "lxml-4.9.2-pp38-pypy38_pp73-macosx_10_15_x86_64.whl", hash = "sha256:16efd54337136e8cd72fb9485c368d91d77a47ee2d42b057564aae201257d419"}, - {file = "lxml-4.9.2-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:0f2b1e0d79180f344ff9f321327b005ca043a50ece8713de61d1cb383fb8ac05"}, - {file = "lxml-4.9.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:7b770ed79542ed52c519119473898198761d78beb24b107acf3ad65deae61f1f"}, - {file = "lxml-4.9.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:efa29c2fe6b4fdd32e8ef81c1528506895eca86e1d8c4657fda04c9b3786ddf9"}, - {file = "lxml-4.9.2-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7e91ee82f4199af8c43d8158024cbdff3d931df350252288f0d4ce656df7f3b5"}, - {file = "lxml-4.9.2-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:b23e19989c355ca854276178a0463951a653309fb8e57ce674497f2d9f208746"}, - {file = "lxml-4.9.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:01d36c05f4afb8f7c20fd9ed5badca32a2029b93b1750f571ccc0b142531caf7"}, - {file = "lxml-4.9.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7b515674acfdcadb0eb5d00d8a709868173acece5cb0be3dd165950cbfdf5409"}, - {file = "lxml-4.9.2.tar.gz", hash = "sha256:2455cfaeb7ac70338b3257f41e21f0724f4b5b0c0e7702da67ee6c3640835b67"}, -] - -[package.extras] -cssselect = ["cssselect (>=0.7)"] -html5 = ["html5lib"] -htmlsoup = ["BeautifulSoup4"] -source = ["Cython (>=0.29.7)"] - [[package]] name = "markdown-it-py" version = "2.1.0" @@ -646,26 +553,6 @@ files = [ {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, ] -[[package]] -name = "pysradb" -version = "1.4.2" -description = "A Python package for interacting with SRAdb and downloading datasets from SRA/ENA/GEO" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pysradb-1.4.2-py3-none-any.whl", hash = "sha256:3b43dba7a5a31ff319b5f8a6b525144f60bb03751676d3a30df3e129a528c601"}, - {file = "pysradb-1.4.2.tar.gz", hash = "sha256:d6137a2f2772d94e56f251bd2c1613357b3193f4cfe19b3f49406954a0bcc0cc"}, -] - -[package.dependencies] -lxml = ">=4.6.3" -pandas = ">=1.3.2" -requests = ">=2.26.0" -requests-ftp = ">=0.3.1" -tqdm = ">=4.62.1" -xmltodict = ">=0.12.0" - [[package]] name = "python-dateutil" version = "2.8.2" @@ -715,20 +602,6 @@ urllib3 = ">=1.21.1,<1.27" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] -[[package]] -name = "requests-ftp" -version = "0.3.1" -description = "FTP Transport Adapter for Requests." -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "requests-ftp-0.3.1.tar.gz", hash = "sha256:7504ceb5cba8a5c0135ed738596820a78c5f2be92d79b29f96ba99b183d8057a"}, -] - -[package.dependencies] -requests = "*" - [[package]] name = "rich" version = "13.3.1" @@ -792,27 +665,6 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -[[package]] -name = "tqdm" -version = "4.64.1" -description = "Fast, Extensible Progress Meter" -category = "main" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -files = [ - {file = "tqdm-4.64.1-py2.py3-none-any.whl", hash = "sha256:6fee160d6ffcd1b1c68c65f14c829c22832bc401726335ce92c52d395944a6a1"}, - {file = "tqdm-4.64.1.tar.gz", hash = "sha256:5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[package.extras] -dev = ["py-make (>=0.1.0)", "twine", "wheel"] -notebook = ["ipywidgets (>=6)"] -slack = ["slack-sdk"] -telegram = ["requests"] - [[package]] name = "typing-extensions" version = "4.5.0" @@ -854,19 +706,7 @@ files = [ {file = "verboselogs-1.7.tar.gz", hash = "sha256:e33ddedcdfdafcb3a174701150430b11b46ceb64c2a9a26198c76a156568e427"}, ] -[[package]] -name = "xmltodict" -version = "0.13.0" -description = "Makes working with XML feel like you are working with JSON" -category = "main" -optional = false -python-versions = ">=3.4" -files = [ - {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, - {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, -] - [metadata] lock-version = "2.0" python-versions = "^3.8.0" -content-hash = "07dea269e12636cfa2a1f5b09c9da041c98def1b2e947f51f05b0429fd9ac61e" +content-hash = "2a0e0f24f070056189e4bcbd89cb26bcb768ca2cb62e5290d97b878dfbe5e0bb" diff --git a/pyproject.toml b/pyproject.toml index b429e90..90340e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bactopia" -version = "1.0.2" +version = "1.0.3" description = "A Python package for working with Bactopia" authors = [ "Robert A. Petit III ", @@ -26,7 +26,6 @@ rich-click = "^1.6.1" executor = "^23.2" rich = "^13.3.1" pandas = "^1.5.3" -pysradb = "^1.4.2" [tool.poetry.group.dev.dependencies] black = "^23.1.0"