-
Notifications
You must be signed in to change notification settings - Fork 23
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
sf.define_domains() - ValueError: The number of observations cannot be determined on an empty distance matrix. #17
Comments
Hi Marvin, thank you for flagging this. First of all, beautiful network! :) Second, it might be worth trying to skip the |
Hi Anastasia, many thanks for your reply! Setting If you don't mind, I have additional questions regarding SAFE in the context of my analysis. Many variables appear to exhibit extensive enrichment across the network, with over 90% of the nodes being significant. Given that previous analyses using SAFE have concentrated on localized effects, I am unsure how to interpret this widespread enrichment. Would it be correct to conclude that if a variable is enriched across most of the network, the topology of the network very effectively captures the interindividual variance of that specific variable (as the graph is on participant-level)? Furthermore, it seems like every time I rerun the analysis script the results differ a little bit. I have defined the randomSeed in safe_default.ini. Do I have to set an additional random seed somehow? Again, thank you in advance! |
Hi Marvin, Here're my thoughts:
|
Hi Anastasia, many thanks for your insights. Much appreciated!
|
I had a look at |
Hi,
thanks for this great package! I am trying to use SAFE for the annotation of metadata on a low-dimensional graph representation of microbiome abundance information (similar to: https://genomebiology.biomedcentral.com/articles/10.1186/s13059-019-1871-4). For this I have used Mapper to obtain a graph representation of the microbiome information (nodes represent subject groups, edges represent overlapping subjects between the nodes). Now, I want to annotate this graph with node-level information on age, sex and other covariates with safepy. Loading the graph and annotation information works fine and I can also obtain the enrichment landscapes of individual covariates with
sf.plot_sample_attributes()
.However, if I want to plot a composite landscape I get an error I do not understand completely.
sf.define_top_attributes()
runs without an error.sf.define_domains()
results in the following error:Based on my understanding of the code, no top nodes were identified with
sf.define_top_attributes()
based on my data as the criterion of 1 connected component was not met (in my analysis the metadata variables have more than 1 connected components). What I am aiming for is a composite contour plot to investigate based on the enrichment landscapes whether the dominance of certain microbes is linked to specific covariates. Is it possible to change some of the default parameters to obtain composite maps for my use case? Do you think the annotation of subject-level networks with your package is valid in general or am I missing something?Your help would be highly appreciated. Many thanks in advance! You can find the corresponding jupyter notebook containing the code and the error via this link. :)
The text was updated successfully, but these errors were encountered: