stoufferlab / pymfinder

A Python package with which to find network motifs in complex networks and to analyze a growing list of network-motif related stuff.
MIT License
16 stars 7 forks source link

Added nodes with a zero motif-role profile #3

Closed bernibra closed 8 years ago

bernibra commented 8 years ago

motif_roles() returned a dictionary of the different motif-role profiles. However, it excluded species that were not part of any motif (i.e. species with a motif-role profile of zeros). I made a small change in order to fix that!

stouffer commented 8 years ago

Something about this seems strange to me. How certain you are that it works properly? Can you add a test to make sure?

stouffer commented 8 years ago

If you liked my suggested alternative, let me know and/or submit a new pull request.

bernibra commented 8 years ago

I liked your suggested alternative although It's effectively doing the same (instead of going through all keys of the dictionary "roles" I changed it to go through all possible species). But your solution might be more elegant ;)

See you tomorrow,

Bernat

On 28 February 2016 at 21:13, Daniel B. Stouffer notifications@github.com wrote:

If you liked my suggested alternative, let me know and/or submit a new pull request.

— Reply to this email directly or view it on GitHub https://github.com/stoufferlab/pymfinder/pull/3#issuecomment-189818201.

PhD studentSchool of Biological Sciences

University of CanterburyChristchurch, New Zealand

stouffer commented 8 years ago

Another reason I opted for the other solution was because I wasn't sure if nodes were always labeled from 1 to N and using the network like I have guarantees that we'll never get roles assigned to nodes that never actually appear.