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

View Connectome with nilearn #144

Closed
wingedRuslan opened this issue Jul 23, 2019 · 5 comments
Closed

View Connectome with nilearn #144

wingedRuslan opened this issue Jul 23, 2019 · 5 comments

Comments

@wingedRuslan
Copy link
Collaborator

Hi there,

while creating a function to view connectome with nilearn (3d - interactively), I realized that we can not make pretty plots as long as all edge weights of thresholded graph = 1.

image

Even if we plot a threshold graph at cost 2 (G02), we get quite "messy" Graph, because of so many connections.

Nilearn has a property to handle the number of plotted edges - edge_threshold, but it can only be applied if edges have different weights.

edge_threshold : str, number or None, optional (default=None)
If None, no thresholding.
If it is a number only connections of amplitude greater
than threshold will be shown.
If it is a string it must finish with a percent sign,
e.g. "25.3%", and only connections of amplitude above the
given percentile will be shown.

In out case all edges have weights = 1.

Right now I do not know how to reduce the number of plotted edges...

@Islast
Copy link
Collaborator

Islast commented Jul 25, 2019

This is a big find! I'm sorry I was in the meeting yesterday to discuss it with you.
We could create a copy of the graph and take threshold of the edge_weight attribute in that and then dispose of it when the plotting is done. This is clunky for sure, but since we usually only decide to plot one or two networks in this way, hopefully wouldn't be cripplingly time consuming.

The alternative is to take the nilearn method apart and rewrite it in such a way that accepts a different way of specifying which edges exist. Having taken a look at these methods myself, this looks like quite a challenge. perhaps we should communicate more with nilearn. I'm sure they would be interested to hear about the problems we're having

@KirstieJane
Copy link
Member

Sorry for not keeping this up to date @Islast.

I recommended that @wingedRuslan just pass the original graph (G) before it is thresholded for the plotting. Should work fine I think!

@Islast
Copy link
Collaborator

Islast commented Jul 25, 2019

Smart!

@KirstieJane
Copy link
Member

I think we can close this, right? Addressed in #145

@wingedRuslan
Copy link
Collaborator Author

@KirstieJane, yeah, that's right!

Closing the issue, addressed in #145

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

No branches or pull requests

3 participants