Now I have another problem, on the same code. Apparently, the iterator on 'transcripts' extracts multiple copies of same features, if the gene has more than one transcript. I just can't figure why. I adjusted my code in order to skip redundancies, but is there a more elegant way?
Thank you,
dr Alberto Ambesi.
On Friday, July 4, 2003, at 06:23 PM, Thomas Down wrote:
Once upon a time, Alberto Ambesi wrote:I can successfully extract Location and Strand features from a transcript, but I can't find a way to get the chromosome ID where the gene is located. I am using the following code:
SequenceDB chromosomes =ens.getChromosomes(); FeatureHolder transcripts = chromosomes.filter( new FeatureFilter.ByAnnotation(Ensembl.TRANSCRIPT_GENEID, ensID) ); iter= transcripts.features(); while (iter.hasNext()) { StrandedFeature feat = (StrandedFeature)iter.next(); System.out.println("Strand: \t" + feat.getStrand().toString()); System.out.println("Location: \t" + feat.getLocation()); }
All BioJava Features `know' their sequence. In this case, you should just be able to use:
feat.getSequence().getName()
Hope this helps,
Thomas.
_______________________________________________ Biojava-l mailing list - [EMAIL PROTECTED] http://biojava.org/mailman/listinfo/biojava-l