Skip to content
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

Add self-correlation app and network visualization #1090

Merged
merged 13 commits into from
Jun 28, 2024

Conversation

asizemore
Copy link
Member

@asizemore asizemore commented May 14, 2024

Resolves #1038

Progress!
Screen Shot 2024-05-14 at 8 11 43 AM

To Do:

  • Clean up types. Bug here: Network response returning strings instead of NodeData plot.data#261 so types are as clean as they can be for now.
  • Clean up network sizing
  • Clean up how many loops over the nodes we do
  • Restrict to taxa only and change order of methods
  • show appropriate content when no nodes pass thresholds - bug, not sure why backend is sending undefined instead of empty.
  • Comment

To become later issues:

  1. Hide node labels by default and let user add them back
  2. Show any node label on hover

@asizemore asizemore requested review from bobular and dmfalke June 21, 2024 16:04
@asizemore asizemore marked this pull request as ready for review June 21, 2024 16:10
@bobular
Copy link
Member

bobular commented Jun 25, 2024

Hi @asizemore - probably not related to this ticket but I think the SparCC compute might either be very slow or stuck/broken?

image

Copy link
Member

@bobular bobular left a comment

Choose a reason for hiding this comment

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

I had a play (ablevins back end) and a skim through the code and all looks good!

I didn't think the duplicated types looked too bad. Maybe add a comment in there explaining how things could be tidied up with further back end work?

return [];
}
},
// makeGetNodeMenuActions(studyMetadata) {
Copy link
Member

Choose a reason for hiding this comment

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

Is there any reason to keep this huge commented region in?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed in a recent commit!

Copy link
Member

@dmfalke dmfalke left a comment

Choose a reason for hiding this comment

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

I made an initial pass, mostly looking at coding style. All looks great. I made a few suggestions. I will continue reviewing tomorrow.

const NodeData = type({
id: string,
const NetworkConfig = partial({
variables: any,
Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines 215 to 225
const correlationMethodSelectorText = useMemo(() => {
if (configuration.correlationMethod) {
return (
CORRELATION_METHODS.find(
(method) => method.value === configuration.correlationMethod
)?.displayName ?? 'Select a method'
);
} else {
return 'Select a method';
}
}, [configuration.correlationMethod]);
Copy link
Member

Choose a reason for hiding this comment

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

I would lose the useMemo here. The return value of the callback is a string, and the same string values will always be referentially equal. Also, the CORRELATION_METHODS array is small, so traversing it will not have a large impact on performance.

@dmfalke
Copy link
Member

dmfalke commented Jun 27, 2024

I've tested the code, and I think it looks great!

Any thoughts on a new icon, since the current one is bipartite?

image

@asizemore
Copy link
Member Author

Thank you both for taking a look! All changes incorporated in the recent commits. Since they were pretty straightforward, I'll go ahead and merge!

@asizemore
Copy link
Member Author

I think the SparCC compute might either be very slow or stuck/broken?

Yes! It's super slow. Danielle is hoping to find time to see if she can speed it up.

Any thoughts on a new icon, since the current one is bipartite?

No big thoughts yet, but I'll give a new icon a go later today or next week! But definitely yes, you're right, we do need a new icon!

@asizemore asizemore merged commit 8493062 into main Jun 28, 2024
1 check passed
@asizemore asizemore deleted the feature-1038-network-viz branch June 28, 2024 12:18
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.

Add network visualization and self-correlation app
3 participants