[Biojava-l] RichSequence.IOTools
Kaur Jaanson
kjaanson at gmail.com
Wed Mar 28 22:50:28 UTC 2007
I used example from the cookbook to add the feature and created Sequence
with DNATools.createDNASequence(..). I wanted to get the reverse complement
strand, find regions with regexp, and mark them as features.
Code used for creating reverse strand Sequence object:
SymbolList rat_rev_list = DNATools.reverseComplement(rat_gene);
Sequence rat_rev = DNATools.createDNASequence(rat_rev_list.seqString(),
"rat_gene");
Code used for creating feature:
StrandedFeature.Template feat_temp = new StrandedFeature.Template();
// fill in the template
feat_temp.annotation = Annotation.EMPTY_ANNOTATION;
feat_temp.location = new RangeLocation(matcher.start(), matcher.end() - 1);
feat_temp.source = "myself_mapped";
feat_temp.strand = StrandedFeature.POSITIVE;
feat_temp.type = key;
try {
Feature feat = rat_rev.createFeature(feat_temp);
} catch (Exception ex) {
ex.printStackTrace();
return;
}
Thanks for clearing up namespace for me :).. got to look into it more.
Hopefully you can give me some leads for working with RichSequence &
RichFeature :)
Kaur Jaanson
More information about the Biojava-l
mailing list