[gt-users] get feature by ID
Brent Pedersen
bpederse at gmail.com
Tue Feb 10 06:36:37 CET 2009
hi again,
one thing that i dont know how to do in genometools via the bindings
is to get at a FeatureNode
from its ID. i've been doing this by using a python dictionary, but
then instead of simply using FeatureIndex.add_gff3file(), i have to
use a stream and iterate over it in python to fill the dictionary. is
there somethign like this in the C code that's just not exposed in the
API?
on a sort of related note, one feature that would be nice is something
to remove this boilerplate:
genome_stream = FeatureStream(genome_stream, feature_index)
feature = genome_stream.next_tree()
while feature:
feature = genome_stream.next_tree()
maybe with something like:
FeatureStream(genome_stream, feature_index).iterate_all()
that doesnt apply to the problem of make a name => feature hash, but
is nice for filling a feature_index and doing an intron_stream.
thanks,
-brent
More information about the gt-users
mailing list