[gt-users] gt_node_stream_pull() (was: get feature by ID)

Brent Pedersen bpederse at gmail.com
Thu Feb 12 00:52:40 CET 2009


cool.
patch for python bindings and tests attached.
(also includes python unittests for iterators that i must not have
included in last patch).

-b


On Wed, Feb 11, 2009 at 3:27 PM, Gordon Gremme <gremme at gmail.com> wrote:
>>>> 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.
>>>
>>> This is a nice idea and should be implementable without many problems as
>>> a general method in the GenomeStream class.
>>
>> Yes, this would also simplify all the while loops which can be found
>> in the tools.
>> I'll implement this shortly on the C-side.
>
> I just committed a method gt_node_stream_pull() which simplifies many
> calls to gt_node_stream_next().
> In fact, most calls to gt_node_stream_next() in the tools could be
> simplified by calls to gt_node_stream_pull().
> Please see the API documentation and the implementation of
> gt_node_stream_pull() for details.
>
> Any takers for the corresponding bindings?
>
> Gordon
> _______________________________________________
> gt-users mailing list
> gt-users at genometools.org
> http://genometools.org/mailman/listinfo/gt-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gt_pull_python.diff
Type: text/x-diff
Size: 4517 bytes
Desc: not available
Url : http://genometools.org/pipermail/gt-users/attachments/20090211/b8ecd5f8/attachment.bin 


More information about the gt-users mailing list