Skip to content

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

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

cgsze
Copy link

@cgsze cgsze commented Nov 11, 2024

No description provided.

# algorithm parameters have format { algo : { hashcode : { parameter combos } } }

filepath = nw_name.split("/")
filename = filepath[1].split("-")
Copy link
Collaborator

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"

Copy link
Collaborator

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

@agitter
Copy link
Collaborator

agitter commented Nov 18, 2024

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.

cur_nw_info.append(params)

# Prepare column names
col_names = ["Name", "Number of nodes", "Number of undirected edges", "Number of connected components"]
Copy link
Collaborator

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.

Copy link
Collaborator

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?

Copy link
Collaborator

@ntalluri ntalluri Mar 31, 2025

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:
Copy link
Collaborator

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.

@@ -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")
Copy link
Collaborator

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

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.

3 participants