Question: Retrieving Genbank Xml Through Efetchseq (Or Another Entrez Web Service?)
0
gravatar for edwardbeaty
6.2 years ago by
edwardbeaty0 wrote:

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 • 1.5k views
ADD COMMENTlink modified 6.2 years ago by Pierre Lindenbaum119k • written 6.2 years ago by edwardbeaty0

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

ADD REPLYlink written 6.2 years ago by Neilfws48k
1
gravatar for Pierre Lindenbaum
6.2 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum119k wrote:

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 COMMENTlink written 6.2 years ago by Pierre Lindenbaum119k

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 REPLYlink written 6.2 years ago by edwardbeaty0

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

ADD REPLYlink written 6.2 years ago by Pierre Lindenbaum119k
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: 1398 users visited in the last hour