brsynth / rptools

Suite of tools that work on rpSBML format
MIT License
7 stars 2 forks source link

get reactions number of a pathway #2

Closed oTelle closed 3 years ago

oTelle commented 3 years ago

Is it possible to calculate the reactions number of a pathway and put it in a key dictionary when using toDict method ?

breakthewall commented 3 years ago

Hi Olivier,

len(rpsbml.toDict['reactions'].keys()) gives you the number of reactions of the pathway represented by rpsbml object.

Is it what you look for?

Best, Joan

oTelle commented 3 years ago

Yes, I need this value but stored in a key computed with toDict(), in order to directly display it in a chart (the displayed data cannot be a function result). Or I could do insert it by myself in the program but I think it could be more time consuming when running.

breakthewall commented 3 years ago

Ok I see, since the 4.4.3 version toDict() integrates now nb_reactions key in [brsynth][pathway] sub-dictionary. Tell me if you have any issue.