Skip to content

Conversation

rpetit3
Copy link
Member

@rpetit3 rpetit3 commented Jun 22, 2023

There has been a recent change to a header in a file parsed by ncbi-genome-download.

This patch incorporates an open PR to ncbi-genome-download: kblin/ncbi-genome-download#210 which is related to this issue kblin/ncbi-genome-download#209


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @bioconda/core in a comment.
Please use the following BiocondaBot commands:

Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
You can use this to test packages locally.

For members of the Bioconda project, the following command is also available:

@BiocondaBot please merge Upload built packages/containers and merge a PR.
Someone must approve a PR first!
This reduces CI build time by reusing built artifacts.

Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.

@rpetit3
Copy link
Member Author

rpetit3 commented Jun 22, 2023

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built on Azure are ready for inspection:

Arch Package Zip File
noarch ncbi-genome-download-0.3.1-pyh7cba7a3_1.tar.bz2 LinuxArtifacts

You may also use conda to install these after downloading and extracting the appropriate zip file. From the LinuxArtifacts or OSXArtifacts directories:

conda install -c ./packages <package name>

Docker image(s) built (images are in the LinuxArtifacts zip file above):

Package Tag Install with docker
ncbi-genome-download 0.3.1--pyh7cba7a3_1
showgzip -dc LinuxArtifacts/images/ncbi-genome-download:0.3.1--pyh7cba7a3_1.tar.gz | docker load

@rpetit3
Copy link
Member Author

rpetit3 commented Jun 22, 2023

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built on Azure are ready for inspection:

Arch Package Zip File
noarch ncbi-genome-download-0.3.1-pyh7cba7a3_1.tar.bz2 LinuxArtifacts

You may also use conda to install these after downloading and extracting the appropriate zip file. From the LinuxArtifacts or OSXArtifacts directories:

conda install -c ./packages <package name>

Docker image(s) built (images are in the LinuxArtifacts zip file above):

Package Tag Install with docker
ncbi-genome-download 0.3.1--pyh7cba7a3_1
showgzip -dc LinuxArtifacts/images/ncbi-genome-download:0.3.1--pyh7cba7a3_1.tar.gz | docker load

@rpetit3
Copy link
Member Author

rpetit3 commented Jun 23, 2023

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built on Azure are ready for inspection:

Arch Package Zip File
noarch ncbi-genome-download-0.3.1-pyh7cba7a3_1.tar.bz2 LinuxArtifacts

You may also use conda to install these after downloading and extracting the appropriate zip file. From the LinuxArtifacts or OSXArtifacts directories:

conda install -c ./packages <package name>

Docker image(s) built (images are in the LinuxArtifacts zip file above):

Package Tag Install with docker
ncbi-genome-download 0.3.1--pyh7cba7a3_1
showgzip -dc LinuxArtifacts/images/ncbi-genome-download:0.3.1--pyh7cba7a3_1.tar.gz | docker load

@rpetit3
Copy link
Member Author

rpetit3 commented Jun 23, 2023

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built on Azure are ready for inspection:

Arch Package Zip File
noarch ncbi-genome-download-0.3.1-pyh7cba7a3_1.tar.bz2 LinuxArtifacts

You may also use conda to install these after downloading and extracting the appropriate zip file. From the LinuxArtifacts or OSXArtifacts directories:

conda install -c ./packages <package name>

Docker image(s) built (images are in the LinuxArtifacts zip file above):

Package Tag Install with docker
ncbi-genome-download 0.3.1--pyh7cba7a3_1
showgzip -dc LinuxArtifacts/images/ncbi-genome-download:0.3.1--pyh7cba7a3_1.tar.gz | docker load

@rpetit3
Copy link
Member Author

rpetit3 commented Jun 23, 2023

Testing

Current version build (0)

mamba create -n temp-ngd -c conda-forge -c bioconda ncbi-genome-download
...
+ ncbi-genome-download     0.3.1  pyh5e36f6f_0        bioconda/noarch          Cached
...
mamba activate temp-ngd
ncbi-genome-download \
     -s genbank -A GCA_029448725.1 --formats fasta all \
      \
     --output-folder ./ \
     --flat-output
Traceback (most recent call last):
  File "/home/robert_petit/miniconda3/envs/temp-ngd/bin/ncbi-genome-download", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/robert_petit/miniconda3/envs/temp-ngd/lib/python3.11/site-packages/ncbi_genome_download/__main__.py", line 26, in main
    ret = args_download(args)
          ^^^^^^^^^^^^^^^^^^^
  File "/home/robert_petit/miniconda3/envs/temp-ngd/lib/python3.11/site-packages/ncbi_genome_download/core.py", line 178, in args_download
    return config_download(config)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/robert_petit/miniconda3/envs/temp-ngd/lib/python3.11/site-packages/ncbi_genome_download/core.py", line 197, in config_download
    download_candidates = select_candidates(config)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/robert_petit/miniconda3/envs/temp-ngd/lib/python3.11/site-packages/ncbi_genome_download/core.py", line 308, in select_candidates
    for entry in filter_entries(entries, config):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/robert_petit/miniconda3/envs/temp-ngd/lib/python3.11/site-packages/ncbi_genome_download/core.py", line 354, in filter_entries
    if not config.is_compatible_assembly_accession(entry['assembly_accession']):
                                                   ~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'assembly_accession'

With patched version

conda activate
mamba create -n temp-ngd-patch -c conda-forge -c bioconda appdirs python 'requests>=2.4.3' tqdm
conda activate temp-ngd-patch
wget  -O LinuxArtifacts.zip https://artprodsu6weu.artifacts.visualstudio.com/A27bcc0f9-b22c-4418-83d8-514809b37fb2/25074ded-3133-43ca-af80-895ab87b53cb/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2Jpb2NvbmRhL3Byb2plY3RJZC8yNTA3NGRlZC0zMTMzLTQzY2EtYWY4MC04OTVhYjg3YjUzY2IvYnVpbGRJZC8zNTM3Mi9hcnRpZmFjdE5hbWUvTGludXhBcnRpZmFjdHM1/content?format=zip
unzip LinuxArtifacts.zip
conda install LinuxArtifacts/packages/noarch/ncbi-genome-download-0.3.1-pyh7cba7a3_1.tar.bz2
conda env export | grep ncbi
  - ncbi-genome-download=0.3.1=pyh7cba7a3_1
  
ncbi-genome-download \
     -s genbank -A GCA_029448725.1 --formats fasta all \
      \
     --output-folder ./ \
     --flat-output

ls -lh GCA*
-rw-r--r-- 1 robert_petit robert_petit 639M Jun 23 01:17 GCA_029448725.1_ASM2944872v1_genomic.fna.gz

I think we are good here

@rpetit3
Copy link
Member Author

rpetit3 commented Jun 23, 2023

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Jun 23, 2023
@rpetit3
Copy link
Member Author

rpetit3 commented Jun 23, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please review & merge set to ask for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants