-
Notifications
You must be signed in to change notification settings - Fork 2
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
Parallelize cggnn
workflow
#248
Conversation
Will be converted to a mergeable PR once I can get home and push that commit I left on my computer. That's needed for all tests to pass since bokeh was moved from a pip That said, this PR in its current state has a working
|
Something to note: I originally had the |
Interesting error from
|
The I am getting a different error (which may indicate accidental omission of some test data artifact?). During plotting testing: File "/usr/local/lib/python3.11/dist-packages/spatialprofilingtoolbox/cggnn/scripts/plot_interactives.py", line 39, in <module>
plot_interactives(graphs_data, feature_names, args.output_directory, args.merge_rois)
File "/usr/local/lib/python3.11/dist-packages/spatialprofilingtoolbox/cggnn/interactives.py", line 47, in plot_interactives
graphs = [_convert_dgl_to_networkx(graph, feature_names) for graph in dgl_graphs]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/spatialprofilingtoolbox/cggnn/interactives.py", line 47, in <listcomp>
graphs = [_convert_dgl_to_networkx(graph, feature_names) for graph in dgl_graphs]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/spatialprofilingtoolbox/cggnn/interactives.py", line 122, in _convert_dgl_to_networkx
raise ValueError(
ValueError: Importance scores not yet found. Calculate them and place them in graph.ndata[importance] first. |
I know how to fix that one. I updated the test data artifacts for the new cg-gnn/spatialprofilingtoolbox object type split, but forgot to run a trained model on them to produce importance scores. Should be a quick fix. |
After rebuilding the data loaded images and replacing the graphs.bin and graph_info.pkl, all tests pass. |
I modified the documentation in several places for style conformity. |
These changes finalize the transfer of responsibilities from the
cg-gnn
pip package to SPT and refactors the Nextflowcggnn
workflow to create graphs in parallel from every specimen, in the process giving Nextflow more control and insight into thecggnn
run process. In addition, thecggnn
workflow now also saves multiple model points, the graphs created, and other metadata that could be reused.