Giter VIP home page Giter VIP logo

swcam's Introduction

swCAM: Unsupervised Sample-wise Deconvolution

We report a sample-wise Convex Analysis of Mixtures (swCAM) method that can estimate subtype proportions and subtype-specific expressions in individual samples from bulk tissue transcriptomes. We extend our previous CAM framework (https://github.com/Lululuella/debCAM) to include a new term accounting for between-sample variations and formulate swCAM as a nuclear-norm and l_(2,1)-norm regularized low-rank matrix factorization problem. We determine hyperparameter value using a cross-validation scheme with random entry exclusion and obtain swCAM solution using an efficient alternating direction method of multipliers. The swCAM is implemented in open-source R scripts.

Overview of swCAM

Usage

To use swCAM, please download all .R files. Then, please follow the instructions in 'script-swCAM-cv.R' for hyperparameter (lambda) setting. Please follow the instructions in 'script-swCAM.R'.

Quick Start

After download the files, please source the needed function.

source("sCAMfastNonNeg.R")

For the matrix for the sample-wise deconvolution (X), please prepare the proportion matrix (A) and source matrix (S) with our debCAM package (https://github.com/Lululuella/debCAM) or any other method.

Then, we can use function "sCAMfastNonNeg" for sample-wise deconvolution.

lambda <- 5 # just an example

rsCAM <- sCAMfastNonNeg(X, A, S, lambda = lambda)
Swest <- rsCAM$S # sample-wise expression

Example

Please see "Figure6.R" as an example demonstrated in our paper. Please download all the files to fully replicate the example. For more details, please refer to our paper or the vignette.

Citing

If you have used this tool please cite:

Chen, L., Lin, C. H., Wu, C. T., Clarke, R., Yu, G., Van Eyk, J. E., ... & Wang, Y. (2021). Sample-wise unsupervised deconvolution of complex tissues. bioRxiv, 2021-01. 04.425315.

https://doi.org/10.1101/2021.01.04.425315

Algorithm overview

The objective function of swCAM for sample-specific deconvolution problem and its reformulation by ADMM. (For convenient illustration, T matrix in all figures are the transposed version of those in the text and equations.)

Objective function

The cross-validation strategy for model parameter tuning. A part of entries is randomly removed before applying swCAM. The removed entries are reconstructed by estimated T matrix and compared to observed expressions for computing RMSE to decide the optimal hyperparameter lambda.

CV strategy

swcam's People

Contributors

chiungtingwu avatar lululuella avatar

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.