Skip to content

Comments

Update code to use networkx objects (incomplete)#1

Open
willu47 wants to merge 5 commits intoscripts_developmentfrom
will_review
Open

Update code to use networkx objects (incomplete)#1
willu47 wants to merge 5 commits intoscripts_developmentfrom
will_review

Conversation

@willu47
Copy link

@willu47 willu47 commented Oct 9, 2020

Hi @AgnesBelt - I've had a look at your code and simplified it. I removed use of the pandas DataFrames as it was making the code very complicated. Everything you need is provided by networkx, but understanding the data structure of the networkx Graph isn't that easy.

I believe It is now working, and adds labels from the list of input_edges to the relevant nodes. I've left the output and emission edges an exercise for you to complete!

I'll add some comments below in the text, and you can ask questions below too.

I suggest you pull down this branch and then push your commits to the same branch. Then we can track progress and I can help if needed here too.

# Write out the graph to a new file
nx.write_graphml(RES, 'glucoseRES_modified,noDUMMY,v4_202010.graphml')

# %%
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line here allows you to run the file from the command line and pass in a variable e.g.

python GLUCOSE_VisualizingRES.py glucoseRES_modified,noDUMMY,v2_202010.graphml

I'd recommend using shorter file names (because it's easier to type shorter names).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants