Giter Site home page Giter Site logo

sparsembclust's Introduction

Sparse tree-based clustering of microbiome data

R and Matlab code to implement the methods in "Sparse tree-based clustering of microbiome data to characterize microbiome heterogeneity in pancreatic cancer" by Yushu Shi, Liangliang Zhang, Kim-Anh Do, Robert Jenq and Christine B. Peterson

Authors

Yushu Shi ([email protected])

File organization

The mixture of finite mixture of Dirichlet multinomial (MFMDM) model without tree information can be implemented using the R package BayesianMicrobiome. The mixture of finite mixture of Dirichlet tree multinomial (MFMDTM) model with tree information can be implemented using the Matlab code provided in MFMDTMmatlab folder. Here we included one simulated dataset from the scenario 5 of the paper.

Code

  • MFMDTM.m. This is the main function. If you want to have a hierarchical Beta prior on the feature selection parameter w, please specify MFMDTM(0), otherwise, specify MFMDTM(w), where w is the guess of the proportion of features being informative. Here, we recommend using w=0.5 when no further information is known about the data.

  • treefunc.m. Run MCMC iteration for the model without a hierarchical Beta prior on the feature selection parameter.

  • treefuncHier.m. Run MCMC iteration for the model with a hierarchical Beta prior on the feature selection parameter.

  • treefunc.m. Select features for the model without a hierarchical Beta prior on the feature selection parameter.

  • treefuncHier.m. Select features for the model with a hierachical Beta prior on the feature selection parameter.

  • treelikelihood.m. Calculate likelihood ratio change in add-delete-swap algorithm.

  • treeassign.m. Assign observations to clusters.

  • simplesplitmerge.m. Perform simple random split-merge algorithm.

  • launchsplitmerge.m. Perform restricted Gibbs sampling split-merge algorithm.

  • ll2vs1.m. Help function for restricted Gibbs sampling split-merge algorithm.

  • drchrnd.m. Function for generating samples from Dirichlet distribution.

  • logPoissonK.m. Return log Poisson density function used in the MFM model.

  • logV.m. Calculate constant terms used in the MFM model.

Output Files

  • crec.mat. MCMC samples of the observation assignment through iterations.
  • gammarec.mat. MCMC samples of the feature selection through iterations.

Input Files

  • phylotreestructure.mat. A binary matrix showing the topology of the phylogentic tree. Rows correspond to all parent nodes, while columns correspond to children nodes. If there is a linkage between a parent node and a child node, the corresponding entry is one.

  • scenario_5. 30 simulated observations for scenario 5. Each entry of the matrix shows how many sequence counts passing from a parent node to its child node.

Acknowledgements

The code provided here is associated with the following publication/webpage:

  • Yushu Shi, Liangliang Zhang, Kim-Anh Do, Robert Jenq and Christine B. Peterson (2022). Sparse tree-based clustering of microbiome data to characterize microbiome heterogeneity in pancreatic cancer.

  • Code for generating samples from Dirichlet distribution https://searchcode.com/codesearch/view/2391565/

sparsembclust's People

Contributors

yushushi avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

cbpeterson

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.