Code Monkey home page Code Monkey logo

compsign's Introduction

logo

CompSign: An R package for differential abundance of compositional mutational signatures

Lena Morrill Gavarró 2024

Installation

You can install the package as follows:

library(devtools)
devtools::install_github("lm687/CompSign", build_vignettes = TRUE)

Vignette

Several examples of input data, how to run the models, and how to interpret the results are found in the vignette:

browseVignettes("CompSign")

This package as, applied to study the differences in mutational signatures between clonal and subclonal mutations in the PCAWG dataset. The github repository reproducing these results can be found here.

Brief summary of the package

We refer to the vignettes for a more in-depth explanation of models and the functioning of the package, but a minimal example is found here:

How to run the model

The function wrapper_run_TMB() is used to run all variations of the model.

Input dataset

The input dataset is the argument object, which is a list with the following structure:

  • x: covariate matrix (p x n)
  • z: matrix of random effects indicating which patient-specific subsample belongs to which patient (n x N)
  • Y (n x d)
  • d

Estimating the parameters

A minimal example is:

diagDM_no_small_sigs <- wrapper_run_TMB(object = simplified_object,
                                        model = "diagREDM", use_nlminb=T, smart_init_vals=F)

in which simplified_object is a list containing simplified_object$x, simplified_object$z, simplified_object$Y, simplified_object$d.

Variations of the model

The first row is the <model> argument in the function wrapper_run_TMB().

name of model (for user) description cpp file (no need to use)
diagREDMsinglelambda DM with independent RE and one lambda diagRE_dirichletmultinomial_single_lambda
diagRE_DM DM with independent RE and two lambdas diagRE_ME_dirichletmultinomial
diagRE_M M with independent RE diagRE_ME_multinomial
FEDMsinglelambda DM with no RE and one lambda FE_dirichletmultinomial_single_lambda
FE_DM DM with no RE and two lambdas FE_dirichletmultinomial
fullREDMsinglelambda DM with independent RE and two lambdas fullRE_dirichletmultinomial_single_lambda
fullRE_DMonefixedlambda DM assuming that there is no overdispersion in the first group (fixed lambda=1) fullRE_ME_dirichletmultinomial_onefixedlambda
fullRE_DM DM with correlated RE and two lambdas fullRE_ME_dirichletmultinomial
fullRE_M M with correlated RE fullRE_ME_multinomial
singleRE_DM DM with a single RE intercept and two lambdas singleRE_dirichlet_multinomial
diagDMpatientlambda DM with independent RE and one lambda for each patient diagREpatientlambda_ME_dirichletmultinomial
fullDMpatientlambda DM with correlated RE and one lambda for each patient fullREpatientlambda_ME_dirichletmultinomial

compsign's People

Contributors

lm687 avatar

Watchers

 avatar  avatar

compsign's Issues

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.