Extracting Genbank Features With Biojava3 Or Java Library
1
2
Entering edit mode
11.9 years ago
Raygozak ★ 1.4k

Does anyone have experience extracting feature information from a genbank file in biojava3 or any other java api?

biojava genbank feature • 4.5k views
ADD COMMENT
0
Entering edit mode

Currently there doesn't seem to be a way of parsing genbank files with biojava3. The only mention of genbank in the whole project seems to be in the DataSource class and some tests that use it (looking at the git project). There is nothing that seems related in the API either. There is a thread in one of their mailing lists where until December 2012 it didn't seem to be an implementation available Lets hope this changes.

ADD REPLY
0
Entering edit mode
11.9 years ago
Pavel Senin ★ 1.9k

I am not sure how it works in BioJava 3.X, but I used to read genbank in with SeqIOTools in 1.8X http://www.biojava.org/docs/api1.8.2/org/biojava/bio/seq/io/SeqIOTools.html

Here are some examples: http://www.biojava.org/docs/api1.8.2/org/biojava/bio/seq/Sequence.html

 System.out.println("Length: " + myGenbank.length());
 System.out.println("Features: " + myGenbank.countFeatures());
 for(Iterator fi = myGenbank.features(); fi.hasNext(); ) {
   Feature f = (Feature) fi.next();
   System.out.println(f.getType() + "\t" + f.getLocation());
 }
ADD COMMENT

Login before adding your answer.

Traffic: 1916 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