-
Notifications
You must be signed in to change notification settings - Fork 1
/
cli.sh
60 lines (44 loc) · 2.52 KB
/
cli.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
49
50
51
52
53
54
55
56
57
58
59
60
# Install bionode, Stream utilities and JSON prettifier
npm install bionode tool-stream json -g
# Alternative, modular install:
# The first argument for bionode is the module name, so to use ```bionode ncbi```
# you can alternatively just install the ```bionode-ncbi``` module and use it
# with the command ```bionode-ncbi``` (notice the dash).
# Example using all-in-one bionode module
npm install bionode -g
bionode ncbi download assembly Guillardia theta
bionode fasta 503988/GCA_000315625.1_Guith1_genomic.fna.gz > guith1.json
# Same as previous using only bionode-ncbi module
npm install bionode-ncbi -g
bionode-ncbi download assembly Guillardia theta
# bionode fasta (no dash) would fail because we didn't install bionode.
# bionode-fasta (with dash) would also fail because we didn't install bionode-fasta.
# See all NCBI urls for Guillardia theta assembly datasets
bionode ncbi urls assembly Guillardia theta | json
# Get url of Guillardia theta assembly
bionode ncbi urls assembly | tool-stream extractProperty protein.faa
# Download Guillardia theta assembly
bionode ncbi download assembly protein.faa Guillardia theta
# See all NCBI urls for Guillardia theta Sequence Read Archive (SRA) datasets
bionode ncbi urls sra Guillardia theta
# Download all Guilardia theta SRA and extract to FASTQ files
bionode ncbi download sra Guillardia theta | bionode sra fastq-dump
# Slightly shorter version since fastq-dump is default command
bionode ncbi download sra Guillardia theta | bionode sra
# Get one SRA description for Solenopsis invicta
bionode ncbi search sra Solenopsis invicta --limit 1 | json
# Extract UID for Solenopsis invicta SRA descriptions
bionode ncbi search sra Solenopsis invicta | tool-stream extractProperty uid
# Extract Titles for Solenopsis invicta SRA descriptions
bionode ncbi search sra Solenopsis invicta | tool-stream extractProperty expxml.Summary.Title
# Link SRA UIDs to papers
bionode ncbi search sra Solenopsis invicta | tool-stream extractProperty uid | bionode ncbi link sra pubmed
# Get UIDs for papers related to SRA search
bionode ncbi search sra Solenopsis invicta | tool-stream extractProperty uid | bionode ncbi link sra pubmed | tool-stream extractProperty destUID
# Get descriptions for papers related to SRA search
bionode ncbi search sra Solenopsis invicta | tool-stream extractProperty uid | bionode ncbi link sra pubmed | tool-stream extractProperty destUID | bionode ncbi search pubmed
# Save search in Dat
npm install dat -g
dat init
bionode ncbi search biosample Solenopsis invicta | dat import --json
dat listen