Following is a piece of code I used to retrieve the gene information in the
feature table of GeneBank flat file. Seems "location" is the only
inforamtion stored in Feature class. Is there a way to retrieve other
detailed informaiton like "/note", "/locus_tag" etc?

Thanks


        public static void main (String [] args) {
                BufferedReader br = new BufferedReader(new 
FileReader("GenBankFilePath"));
                SequenceIterator stream = SeqIOTools.readGenbank(br);
                Sequence seq = stream.nextSequence();
                printGenes(seq.features());
        }

        public static void printGenes(Iterator features) {
                while(features.hasNext()) {
                Feature f = (Feature) features.next();
                    if (f.getType().equalsIgnoreCase("gene")) {
                System.out.print(f.getType() + " at " +
f.getLocation().toString());
                                printGenes(f.features());
              }
                }
        }

_______________________________________________
Biojava-l mailing list  -  [EMAIL PROTECTED]
http://biojava.org/mailman/listinfo/biojava-l

Reply via email to