[Biojava-l] Gene direction
    Martin Jones 
    martin.jones at ed.ac.uk
       
    Wed May  7 10:36:53 UTC 2008
    
    
  
Hi,
I've recently faced the same problem. Try this:
RichSequenceIterator seqs = RichSequence.IOTools.readGenbankDNA(in, null);
RichSequence mySeq = seqs.nextRichSequence();
for (Object o : mySeq.getFeatureSet()) {
                RichFeature f = (RichFeature) o;
                RichLocation l = (RichLocation) f.getLocation();
                System.out.println("strand is " + l.getStrand().getName());
}
I think that getStrand().getName() will return either "+" or "-".  If
you're looking at a genbank record for a single gene, you'll probably
have a single "gene" feature and a single "CDS" feature.
Martin
2008/5/7 Florian Schatz <mail at florianschatz.de>:
> Hello,
>
> is there any way to find out the direction of a gene, parsed from a Genbank
> file?
> e.g.: Genbank file:
> gene            185510..186463
> or
> gene            complement(203350..203505)
>
> I can not find something in the .getLocation() nor in the .getAnnotation()
> of a gene-Feature.
>
> Best,
> Florian
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>
>
-- 
------------------------
Martin Jones
School of Biological Sciences,
Ashworth Laboratories, King's Buildings
Edinburgh, EH9 3JT, UK
    
    
More information about the Biojava-l
mailing list