[Biopython-dev] First impressions of Pathway

Cayte katel at worldpath.net
Wed Nov 14 22:29:46 EST 2001


   First we should thank all Tarjei for his work.  It looks like a great
start.  The next step, I think would be to create some examples and see how
it plays.

Quibbles:
   I'd prefer more neutral  nomenclature than parent-child because they bias
the reader toward a tree structure.

   df_search seems to assume a connected graph ( at least it looks like it
would konk out early with a disconnected graph )..  All assumptions should
be documented.

  The following line needs a description of what each tuple contains?  Since
python is typeless it requires more documentation at the interfaces.

    catalysts   -- list of tuples of catalysts involved in the same reaction
                     step


  In MultiNetwork.remove_node the sense of the filter is reversed from what
I'd expect if you want to remove dangling edges.   My understanding is that
filter returns items that make the condition true?

           self.__adjacency_list[node] = filter(lambda x,node=node: x[0] is
node,

self.__adjacency_list[node].list())

In the following sequence, node may be redefined before it is used.  It
looks to me that you intend to use the initial definition.



        for node in self.__adjacency_list.keys():
            self.__adjacency_list[node] = filter(lambda x,node=node: x[0] is
node,

self.__adjacency_list[node].list())
        # remove all refering pairs in label map
        for label in self.__label_map.keys():
            self.__label_map[label] = filter(lambda x,node=node: x[0] is
node or x[1] is node,
                                             self.__label_map[label].list())




Cayte




More information about the Biopython-dev mailing list