[Biojava-dev] Genbank Feature extraction question.
Richard Holland
holland at ebi.ac.uk
Wed Jan 30 08:53:29 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello.
If you are using the BioJavaX parsers as opposed to the older deprecated
ones, then yes, the information is there.
Your parser will be returning instances of RichSequence (there will be a
nextRichSequence or getRichSequence method depending on the way in which
you are using the parser and/or iterator).
Features on a RichSequence are all instances of RichFeature.
Locations for RichFeatures are all instances of RichLocation.
If you cast appropriately (or locate and find the getRich* equivalents
of the get* methods you already using on the non-Rich interfaces) then
you will find that RichLocation does have a getStrand method which will
give you the information you need.
cheers,
Richard
michael walsh wrote:
> BioJava,
>
> I am writing a program that extracts features from a Genbank file using
> BioJava The program needs to extract the feature locations from the file.
> This is easy enough to do but the location information returned by the
> program does not specify whether or not the location is on the complementary
> strand of DNA.
>
> This is some of my code:
> FeatureHolder fltrHold = seq.filter(codeFltr);//codeFltr is a filter that
> retrieves coding features only.
> //iterate over the Features in fh
> for (Iterator i = fltrHold.features(); i.hasNext(); ){
> Feature f = (Feature)i.next();
> System.out.println(f.getLocation().toString());
>
> An example of the output of the print command is:
> join:[32775..32948,31801..32052]
>
> However, the entry in the Genbank file reads:
> complement(join(31801..32052,32775..32948))
>
> Is there any way to get my program to output the fact that a features
> location is on the complementary strand of DNA?
>
> Any help that anyone can give me would be greatly appreciated.
>
> Sincerely,
>
> M Walsh
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>
- --
Richard Holland (BioMart)
EMBL EBI, Wellcome Trust Genome Campus,
Hinxton, Cambridgeshire CB10 1SD, UK
Tel. +44 (0)1223 494416
http://www.biomart.org/
http://www.biojava.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHoDsJ4C5LeMEKA/QRAhIsAJ4lzIn0bBMjYIaZqNMz0gUm3c1vHgCePGW4
jYPFCjw1pBlMMp94mgRQOsc=
=OoGL
-----END PGP SIGNATURE-----
More information about the biojava-dev
mailing list