Retrieving Genbank Xml Through Efetchseq (Or Another Entrez Web Service?)
1
0
Entering edit mode
11.8 years ago

Hello! I have a question about using the Entrez Utility Web Service to retrieve records in genbank XML format.

I’m using C# to access the eFetchSeq service at http://eutils.ncbi.nlm.nih.gov/soap/v2.0/efetch_seq.wsdl like so:

 eFetchSeq.eUtilsServiceSoapClient serv = new eFetchSeq.eUtilsServiceSoapClient();
 eFetchSeq.eFetchRequest req = new eFetchSeq.eFetchRequest();
 req.db = "nuccore";
 req.id = "HV982480.1";
eFetchSeq.eFetchResult res = serv.run_eFetch(req);

…which is giving me the eFetchResult. However, I would like to dump the entire record and all its fields directly as an xml file in the genbank .gb format. Is there a way to do this from an eFetchResult? Or is there a different service I should use to retrieve my results in that format?

Thanks for your help.

entrez • 2.5k views
ADD COMMENT
0
Entering edit mode

"as an xml file in the genbank .gb format" does not make sense. The output file is either XML or Genbank format.

ADD REPLY
1
Entering edit mode
11.8 years ago

I don't see the retmode param in the XSD for efetch, so I'm not sure the following solution will run.

req.rettype = "gb";
req.retmode = "txt";

But you can always use REST based service instead of SOAP:

 curl -s "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=HV982480.1&retmode=txt&rettype=gb"

LOCUS       HV982480                  19 bp    DNA     linear   PAT 13-FEB-2013
DEFINITION  JP 2011201887-A/6577: iRNA CONJUGATES.
ACCESSION   HV982480
VERSION     HV982480.1  GI:449784475
KEYWORDS    JP 2011201887-A/6577.
SOURCE      Hepatitis C virus
  ORGANISM  Hepatitis C virus
            Viruses; ssRNA positive-strand viruses, no DNA stage; Flaviviridae;
            Hepacivirus.
REFERENCE   1  (bases 1 to 19)
  AUTHORS   Harborth,J., Manoharan,M. and Elbashir,S.
  TITLE     iRNA CONJUGATES
  JOURNAL   Patent: JP 2011201887-A 6577 13-OCT-2011;
            Alnylam Pharmaceuticals Inc
COMMENT     OS   Human hepatitis C virus
            PN   JP 2011201887-A/6577
            PD   13-OCT-2011
            PF   21-APR-2011 JP 2011095517
            PR   10-OCT-2003 US    60/510318,09-OCT-2003 US    60/510246, PR
            26-SEP-2003 US    60/506341,11-AUG-2003 US    60/494597, PR
ADD COMMENT
0
Entering edit mode

Thanks, I might try the REST service. I didn't see a "retmode" parameter either; also there wasn't an obvious way to pull the results from the eFetchResult object that gets returned.

ADD REPLY
0
Entering edit mode

You can always transform the XML to genbank using xslt but that would be excessive...

ADD REPLY

Login before adding your answer.

Traffic: 2665 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6