[Biojava-l] Retrieve sequence from NCBI

Roy Park RPark@lexgen.com
Fri, 28 Jun 2002 14:28:04 -0500


The following code should help you sort it out.

	BufferedReader br = new BufferedReader(new
FileReader(genbankFileName));
	SequenceIterator seqIter = SeqIOTools.readGenbank(br);
	while (seqIter.hasNext()) {
		Sequence thisSeq = seqIter.nextSequence();
		String thisAccession = thisSeq.getName();
		Annotation thisAnnot = thisSeq.getAnnotation();
		ArrayList (or String) value = thisAnnot.getProperty("XX");
		.
		.
		.
	}

The key is the org.biojava.bio.seq.io.SeqIOTools class.  :)

Roy


-----Original Message-----
From: mbarenbo@gmu.edu [mailto:mbarenbo@gmu.edu]
Sent: Friday, June 28, 2002 2:02 PM
To: biojava-l@biojava.org
Subject: [Biojava-l] Retrieve sequence from NCBI


Could you suggest me how I can retrieve GenBank file from NCBI using 
Java or BioJava classes?  Thank you.

Max

_______________________________________________
Biojava-l mailing list  -  Biojava-l@biojava.org
http://biojava.org/mailman/listinfo/biojava-l


*************************************************************************** 
 The contents of this communication are intended only for the addressee and
may contain confidential and/or privileged material. If you are not the
intended recipient, please do not read, copy, use or disclose this
communication and notify the sender.  Opinions, conclusions and other
information in this communication that do not relate to the official
business of my company shall be understood as neither given nor endorsed by
it.  
***************************************************************************