-
Notifications
You must be signed in to change notification settings - Fork 19
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
Download the GFF file of the Cycas taitungensis mitochondrion #11
Comments
Hi, there's no ncbi "genome" or "assembly for Cycas taitungensis, but you can download the Genbank file and convert it to GFF, or just use togows.org to get it directly using the NCBI ID: bionode-ncbi search nuccore NC_010303.1 | json uid | while read id; do wget http://togows.org/entry/nucleotide/$id.gff; done |
Perfect! Thanks, Bruno. |
For future me, or someone else, here's my Makefile snippet: # Cycas taitungensis
NC_010303.1.json: %.json:
bionode-ncbi search nuccore $* >$@
%.uid: %.json
json uid <$< >$@
%.fa: %.uid
curl http://togows.org/entry/nucleotide/`<$<`.fasta |seqtk seq >$@
%.gb: %.uid
curl -o $@ http://togows.org/entry/nucleotide/`<$<`.gb
%.gff: %.uid
curl -o $@ http://togows.org/entry/nucleotide/`<$<`.gff |
|
Thanks @sjackman for your comments. I haven't closed this yet because it could be a nice thing to add to bionode. /cc @terfn |
@terfn recently added NCBI efetch to bionode, so soon something like this should work: echo -e "{'db': 'nuccore', 'term': 'NC_010303.1', 'rettype': 'fasta'}\n" | bionode-ncbi fetch - It currently doesn't because of the way CLI is parsing things, but in JavaScript the following works and gives a fasta: var ncbi = require('bionode-ncbi')
var fasta = require('bionode-fasta')
var json = require('JSONStream')
var opts = {
db: 'nuccore',
term: 'NC_010303.1',
rettype: 'fasta'
}
ncbi.fetch(opts)
.pipe(json.stringify()) // We shouldn't need this, bionode-fasta should accept objects
.pipe(fasta.write())
.on('data', function (data) {
console.log(data)
}) |
By the way fasta is the default rettype for nuccore and some other dbs so it's not necessary to specify it. Also it is possible to get the GenBank flat file format from nuccore using efetch by specifying
If the goal is to convert it to a GFF later @bmpvieira I'll take a look at making the CLI accept objects |
After #32 is merged, this should work: echo -e '{"term": "NC_010303.1", "rettype": "fasta"}' | bionode-ncbi fetch nuccore -s |
Nice. Thanks, Bruno! |
Hi. I'd like to download the annotation in GFF format of the Cycas taitungensis mitochondrion, NC_010303.1. I started with
bionode ncbi search genome cycas taitungensis
, but got nada back. Any suggestions?The text was updated successfully, but these errors were encountered: