Skip to content

How to get interaction matrix between taxa/modules (while BF > 100) #23

Description

@linlin0026

Hello, dear Professor. While studying mdsine2, I am confused about how to get the glv module's interaction with bf>100 between taxa/modules.
1)According to MDSINE2's and mdsine2_paper's GitHub, there is “Computation and visualization of forward-simulation of learned gLV model for each OTU.” after“MCMC inference using MDSINE2's model“, which is not shown in jupyter. Do we need to use md2.model.gLVDynamicsSingleClustering to get the interaction?
2)while in the fixed-clustering model, I also got the same problem with networkx version 2.6.1 not working when using the codes. And I wonder whether the output edges here are BF>100?

_mcmc = md2.BaseMCMC.load("fixed_clustering/mcmc.pkl")
md2.write_fixed_clustering_as_json(
    mcmc=mcmc,
    output_path="fixed_module_interactions.json"
)
(mdsine2_new) C:\Users\Lin\MDSINE2_Paper>conda list networkx
# packages in environment at D:\anaconda\envs\mdsine2_new:
#
# Name                    Version                   Build  Channel
networkx                  2.3                      pypi_0    pypi_
  1. Can mdsine2 directly print fixed_model/full model's interaction matrix (BF>100)? For the non-clustering method, I did not find a function like md2.write_fixed_clustering_as_json, so I used the following method. However, the values in this matrix are very close to 0, which makes me wonder if my thinking needs to be corrected.
_seed = 456
mcmc = chains[seed]
study = healthy
INTERACTIONS = mcmc.graph[STRNAMES.INTERACTIONS_OBJ]
INTERACTIONS_max = md2.summary(INTERACTIONS)['mean']_

Thanks for reading and helping; I'm sorry my questions seem superficial, as I'm just beginning my journey in learning Python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions