-
Notifications
You must be signed in to change notification settings - Fork 20
Update summary.py to include parameter combinations #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
spras/analysis/summary.py
Outdated
# algorithm parameters have format { algo : { hashcode : { parameter combos } } } | ||
|
||
filepath = nw_name.split("/") | ||
filename = filepath[1].split("-") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work for outputs stored in subfolders within the main output folder?
example output/example/data#-algo-params-hashcode/pathway.txt"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can get the list of algorithm-params-hashcode from algorithms_with_params
in the Snakefile and then pass it to the function so you don't have to extract it
For the test cases, we discussed dropping the toy summarization example because it does not have corresponding algorithm-parameter combinations that generated those graphs. We will summarize only the example data and EGFR data that correspond to actual SPRAS runs. |
warning: in the working copy of 'test/analysis/input/example/data0-allpairs-params-BEH6YB2_pathway.txt', LF will be replaced by CRLF the next time Git touches it
spras/analysis/summary.py
Outdated
cur_nw_info.append(params) | ||
|
||
# Prepare column names | ||
col_names = ["Name", "Number of nodes", "Number of undirected edges", "Number of connected components"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the header be updated to “Number of edges" instead of "Number of undirected edges"?
Even though we’re treating all graphs as undirected (on line 43), directionality doesn’t seem to be considered in any of the statistics being calculated in summary.py at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the original intention of this header was to convey that even a directed or mixed graph would be parsed and summarized as an undirected graph here. I can see how that could instead be interpreted as only counting the undirected edges in a mixed graph though. Which do you think is more precise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking at the summary file and got confused on why we were only counting the undirected edges (then I looked through the code and realized we weren't doing that). So, I think renaming it to "Number of edges" is more intuitive and putting a comment above line 43 to say that "directed or mixed graph are parsed and summarized as an undirected graph"
graphspace: | ||
include: false | ||
# Create Cytoscape session file with all pathway graphs for each dataset | ||
cytoscape: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test for cytoscape might be failing because the include is set to false.
test/analysis/test_cytoscape.py
Outdated
@@ -6,17 +6,23 @@ | |||
import spras.config as config | |||
from spras.analysis.cytoscape import run_cytoscape | |||
|
|||
config.init_from_file("config/config.yaml") | |||
config.init_from_file("input/config.yaml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if using the config file in the input folder in analysis, make sure to set cytoscape include to true incase
No description provided.