Coder Social home page Coder Social logo

momf's Introduction

MOMF

Deconvolution analysis with the bulk RNA-seq data and single-cell RNA-seq data

Installation

### install devtools packages (devtools package)
install.packages("devtools")

### install MOMF package
devtools::install_github("sqsun/MOMF")

Example data

The example data (toy_example.Rdata) is a simulated data.

  • sc_counts: scRNA-seq gene expression matrix (#cells x #genes);
  • sc_cell_type: cell types for scRNA-seq data (#cells x 1);
  • bulk_counts: bulk RNA-seq gene expression matrix (#individuals x #genes).

Example Code

Two main functions momf.fit and momf.computeRef are used to do deconvoluation analysis.

### load MOMF package
> library(MOMF)

### load example data
> load("toy_example.RData")

### compute the cell type specific expression level as reference
> priorU <- momf.computeRef(sc_counts, sc_cell_type)

### create the gene list for MOMF 
> GList <- list(X1 = t(sc_counts), X2 = t(bulk_counts))

### run MOMF
> momf_res <- momf.fit(DataX = GList, DataPriorU=priorU, method="KL", rho=2, num_iter=100)

### output the cell type proportions
> cell_prop <- momf_res$cell.prop
> heatmap(cell_prop)

Citation

Xifang Sun, Shiquan Sun, and Sheng Yang. An efficient and flexible method for deconvoluting bulk RNAseq data with single-cell RNAseq data, 2019, DIO: 10.5281/zenodo.3373980.

Supports

Please reach out Xifang Sun or Sheng Yang (email: [email protected] or [email protected]) if you have any questions.

momf's People

Contributors

sqsun avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

momf's Issues

Release Version

We are currently working on putting MOMF on bioconda, but for that we would need you to create a release. Would that be possible?
Thank you very much in advance!

Error in momf.computeRef function

Hi,

momf.computeRef function returns error due to lack of names in weight vector. This implementation should solve it.

momf.computeRef <- function(sc_counts, cell_type){

   U <- sapply(unique(cell_type), function(ct){
          y = sc_count[ ,cell_type %in% ct, drop = FALSE]
          weight = sum(y)/sum(sc_count)
          rowSums(y)/sum(y)*weight
      })
	U <- 1000000 * U
	colnames(U) <- unique(cell_type)
	rownames(U) <- rownames(sc_count)
	# return estimated mean for each cell type
	return(U)
}

P.D: I would also be straight forward to implement this function in parelel.

Thanks

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.