Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for fuzzy match of assembly summary header #210

Closed
wants to merge 1 commit into from

Conversation

chasemc
Copy link

@chasemc chasemc commented Jun 12, 2023

fixes #209

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@SolMiele
Copy link

Hello, I got the same error as #209, is it fixed?

@chasemc
Copy link
Author

chasemc commented Jun 12, 2023

@SolMiele Did you try installing this pull request?
e.g.

pip uninstall ncbi-genome-download
pip install git+https://github.com/chasemc/ncbi-genome-download@4c5c24e27aa8123c7995890046b17b815da3571b

Note: I haven't fully tested it but it did work with ncbi-genome-download -s refseq --assembly-accessions GCF_000525635.1 bacteria

@andrewjpage
Copy link

It works for me and downloaded 40,000 bacterial genomes from genbank and refseq

@1185307269
Copy link

Hello! I tried this :

pip uninstall ncbi-genome-download

pip install git+https://github.com/chasemc/ncbi-genome-download@4c5c24e27aa8123c7995890046b17b815da3571b

and my command like this:

ncbi-genome-download --assembly-accessions "GCA_001951075.2" bacteria,archaea -l "complete" --section genbank --formats fasta --flat-output -o ./

but it does not work. So , what should I do ? Can you hepl me ? The same error as #209, is it fixed?

@nush320
Copy link

nush320 commented Jun 14, 2023

Hello, I tried the pip uninstall ncbi-genome-download pip install git+https://github.com/chasemc/ncbi-genome-download@4c5c24e27aa8123c7995890046b17b815da3571b

and then tried ncbi-genome-download --genera Streptomyces bacteria --dry-run | head

Seems to be working to some point but I also get an error message at the end. @ialbert Please see the following. Using NCBI-genome-download --genera Streptomyces bacteria --dry-run | head - capital letters for NCBI as in the handbook still says command not found.

Considering the following 2815 assemblies for download:
GCF_003208035.1 Streptomyces actuosus   ATCC 25421
GCF_016921115.1 Streptomyces actuosus   VRA1
GCF_000156475.1 Streptomyces albidoflavus       J1074
GCF_000359525.1 Streptomyces albidoflavus       J1074
GCF_000719495.1 Streptomyces albidoflavus       NRRL F-5621
GCF_000719435.1 Streptomyces albidoflavus       NRRL F-5618
GCF_000719955.1 Streptomyces albidoflavus       NRRL B-1271
GCF_000717375.1 Streptomyces albidoflavus       NRRL B-2307
GCF_001509565.1 Streptomyces albidoflavus       NRRL WC-3066
Traceback (most recent call last):
  File "/home/bstarnush/miniconda3/bin/ncbi-genome-download", line 8, in <module>
    sys.exit(main())
  File "/home/bstarnush/miniconda3/lib/python3.10/site-packages/ncbi_genome_download/__main__.py", line 26, in main
    ret = args_download(args)
  File "/home/bstarnush/miniconda3/lib/python3.10/site-packages/ncbi_genome_download/core.py", line 184, in args_download
    return config_download(config)
  File "/home/bstarnush/miniconda3/lib/python3.10/site-packages/ncbi_genome_download/core.py", line 212, in config_download
    print(entry['assembly_accession'], entry['organism_name'], get_strain(entry), sep="\t")
BrokenPipeError: [Errno 32] Broken pipe

@chasemc
Copy link
Author

chasemc commented Jun 14, 2023

The proposed fix should work, so it's likely that it's an issue with installing the PR.

Python is pretty notoriously difficult when dealing with package versions and I'm no expert pip's installation details but that's likely why it seems it's not working.

Change the my_directory variable below to point to a path on your computer

my_directory='/home/chase/Downloads/ncbi-genome-download'

python3 -m venv dl $my_directory
source $my_directory
pip install git+https://github.com/chasemc/ncbi-genome-download@4c5c24e27aa8123c7995890046b17b815da3571b 

Then $my_directory will have a bin directory containing ncbi-genome-download
Use the activated environment to run it or by using the path directly
e.g. $my_directory/bin/ncbi-genome-download

@chasemc
Copy link
Author

chasemc commented Jun 14, 2023

@nush320 that is a different issue related to implementation (without the pipe to head should work)
see https://docs.python.org/3/library/signal.html#note-on-sigpipe

@rpetit3
Copy link

rpetit3 commented Jun 26, 2023

@chasemc as a temporary solution I used your changes to patch the Bioconda recipe

@kblin
Copy link
Owner

kblin commented Jul 24, 2023

Thanks for this, I ended up solving it slightly different in bd46071. Should be fixed in 0.3.2

@kblin kblin closed this Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError: 'assembly_accession'
7 participants