Question: Trying to match Accession numbers to Taxonomy IDs
0
gravatar for New2programming
11 days ago by
liverpool university
New2programming0 wrote:

Currently writing a sequence alignment programme in javascript and i want to be able to match the genbank accession numbers to species names and for a list of 500+ accessions. Is there any easy way to do this rather than changing over to python?

ADD COMMENTlink modified 10 days ago by Pierre Lindenbaum99k • written 11 days ago by New2programming0

in javascript

context needed: is it a cmd-line program or is it a web-page ?

ADD REPLYlink modified 11 days ago • written 11 days ago by Pierre Lindenbaum99k

its on a webpage so i'm work in java then convert to html format

ADD REPLYlink written 10 days ago by New2programming0

in java ????? I hope you mean javascript ?!

ADD REPLYlink written 10 days ago by Pierre Lindenbaum99k

Java is to javascript as ham is to hamster, right? :-p

ADD REPLYlink written 10 days ago by WouterDeCoster22k

yup javascript! as the name suggests this is all new territory for me!

ADD REPLYlink written 2 days ago by New2programming0
2
gravatar for Sej Modha
10 days ago by
Sej Modha2.0k
Glasgow, UK
Sej Modha2.0k wrote:

A simplified version of the above example with the edirect unix eutils would be:

esearch -db nuccore -query FJ070571|elink -target taxonomy |efetch -format uid
ADD COMMENTlink written 10 days ago by Sej Modha2.0k
1
gravatar for Pierre Lindenbaum
10 days ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum99k wrote:

Here is a javascript code using CORS / XML / XPATH / NCBI-ESummary . Tested with firefox.

ADD COMMENTlink written 10 days ago by Pierre Lindenbaum99k
0
gravatar for erwan.scaon
10 days ago by
erwan.scaon210
Limoges - CBRS
erwan.scaon210 wrote:

This may be a starting point for you : Using efetch + xtract (I guess you can call it inside your javascript code ?)

An example with this Pinus taeda nucleotide sequence : https://www.ncbi.nlm.nih.gov/nuccore/FJ070571

an='FJ070571';
efetch -db nuccore \
       -id $an \
       -format xml \
       | xtract -pattern Bioseq-set_seq-set \
                -division Seq-entry \
                -group Bioseq \
                -if Textseq-id_accession -equals $an \
                -element Textseq-id_accession \
                -branch Bioseq_descr \
                -block Org-ref_db \
                -element Object-id_id;

Output = 3352, which is the taxonomy ID for Pinus taeda (https://www.ncbi.nlm.nih.gov/taxonomy/?term=3352)

Ps : This command was not thoroughly tested, thus the efetch parsing might need some polishing to be successful for all possibles cases.

ADD COMMENTlink modified 10 days ago • written 10 days ago by erwan.scaon210
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1283 users visited in the last hour