-
Notifications
You must be signed in to change notification settings - Fork 5
Examples
Jordi Burguet-Castell edited this page Jan 9, 2018
·
1 revision
- Fetch information for SNP with id 3000, as in the example at https://www.ncbi.nlm.nih.gov/projects/SNP/SNPeutils.htm:
for line in equery(tool='fetch', db='snp', id='3000'):
print(line)
- Get a summary of nucleotides related to accession numbers
NC_010611.1
andEU477409.1
:
for line in on_search(db='nucleotide',
term='NC_010611.1[accn] OR EU477409.1[accn]',
tool='summary'):
print(line)
- Download all chimpanzee mRNA sequences in FASTA format (our version of the sample application 3):
with open('chimp.fna', 'w') as fout:
for line in on_search(db='nucleotide',
term='chimpanzee[orgn] AND biomol mrna[prop]',
tool='fetch', rettype='fasta'):
fout.write(line + '\n')