-
Notifications
You must be signed in to change notification settings - Fork 1
/
complete-fungi-genomes.sh
48 lines (43 loc) · 2.02 KB
/
complete-fungi-genomes.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Install Node.js from http://nodejs.org
# Install bionode-ncbi and tool-stream
npm install bionode-ncbi tool-stream -g
# Download all *complete* genomes
bionode-ncbi search genome fungi[Organism]+AND+complete[Status] | \
tool-stream extractProperty assemblyid | \
bionode-ncbi download assembly -
# Alternative: get only the URLs to download with wget or other tool
bionode-ncbi search genome fungi[Organism]+AND+complete[Status] | \
tool-stream extractProperty assemblyid | \
bionode-ncbi urls assembly - | \
tool-stream extractProperty genomic.fna
# Tip: Have a look at one prettyfied JSON object, e.g., from URLs command
npm install json -g # install prettyfier
bionode-ncbi search genome fungi[Organism]+AND+complete[Status] -l2 | \
tool-stream extractProperty assemblyid | \
bionode-ncbi urls assembly - | \
json
# Example output from previous tip:
#{
# "uid": "205361",
# "report": {
# "txt": "http://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000743665.1_ASM74366v1/GCA_000743665.1_ASM74366v1_assembly_report.txt"
# },
# "stats": {
# "txt": "http://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000743665.1_ASM74366v1/GCA_000743665.1_ASM74366v1_assembly_stats.txt"
# },
# "genomic": {
# "fna": "http://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000743665.1_ASM74366v1/GCA_000743665.1_ASM74366v1_genomic.fna.gz",
# "gbff": "http://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000743665.1_ASM74366v1/GCA_000743665.1_ASM74366v1_genomic.gbff.gz",
# "gff": "http://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000743665.1_ASM74366v1/GCA_000743665.1_ASM74366v1_genomic.gff.gz"
# },
# "rm": {
# "out": "http://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000743665.1_ASM74366v1/GCA_000743665.1_ASM74366v1_rm.out.gz",
# "run": "http://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000743665.1_ASM74366v1/GCA_000743665.1_ASM74366v1_rm.run"
# },
# "README": {
# "txt": "http://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000743665.1_ASM74366v1/README.txt"
# },
# "md5checksums": {
# "txt": "http://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000743665.1_ASM74366v1/md5checksums.txt"
# }
#}