https://github.com/randel/MIND
Raw File
Tip revision: 5a71540597e4b12da8925ff45e3e8087160d6c17 authored by Jiebiao Wang on 03 May 2023, 19:36:18 UTC
Update MIND.md
Tip revision: 5a71540
index.html
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Using Tissue Expression to Estimate Sample-/Subject- And Cell-Type-Specific Gene Expression via Deconvolution • MIND</title>
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css">
<script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script><meta property="og:title" content="Using Tissue Expression to Estimate Sample-/Subject- And Cell-Type-Specific Gene Expression via Deconvolution">
<meta property="og:description" content="Methods to glean more insights from bulk gene expression: MIND and bMIND. MIND borrows information across multiple measurements of the same tissue per subject, such as multiple regions of the brain, using an empirical Bayes approach to estimate subject- and cell-type-specific (CTS) gene expression via deconvolution. The bMIND algorithm provides Bayesian estimates of sample-level CTS expression for each bulk sample.">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#toc">
    

    <div class="container template-home">
      <header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">
        <a class="navbar-link" href="index.html">MIND</a>
        <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.3.3</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
<li>
  <a href="reference/index.html">Reference</a>
</li>
      </ul>
<ul class="nav navbar-nav navbar-right">
<li>
  <a href="https://github.com/randel/MIND/" class="external-link">
    <span class="fab fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
</div>
<!--/.nav-collapse -->
  </div>
<!--/.container -->
</div>
<!--/.navbar -->

      

      </header><div class="row">
  <div class="contents col-md-9">
<div class="section level1">
<div class="page-header"><h1 id="bmind-bayesian-estimation-of-cell-type-specific-cts-gene-expression-and-cts-differential-expression-analysis">bMIND: Bayesian estimation of cell-type-specific (CTS) gene expression and CTS differential expression analysis<a class="anchor" aria-label="anchor" href="#bmind-bayesian-estimation-of-cell-type-specific-cts-gene-expression-and-cts-differential-expression-analysis"></a>
</h1></div>
<p><img src="reference/figures/bMIND.png"></p>
<p><code>bMIND</code> is a Bayesian deconvolution method to integrate bulk and scRNA-seq data. With a prior derived from scRNA-seq data, we estimate cell-type-specific (CTS) expression from bulk tissue expression via MCMC.</p>
<div class="section level2">
<h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a>
</h2>
<p>Installation requires the <code>devtools</code> package.</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">devtools</span><span class="fu">::</span><span class="fu"><a href="https://devtools.r-lib.org/reference/remote-reexports.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">'randel/MIND'</span><span class="op">)</span></code></pre></div>
</div>
<div class="section level2">
<h2 id="example">Example<a class="anchor" aria-label="anchor" href="#example"></a>
</h2>
<!-- end list -->
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/randel/MIND" class="external-link">MIND</a></span><span class="op">)</span>
<span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">example</span><span class="op">)</span>
<span class="va">bulk</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/t.html" class="external-link">t</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/na.fail.html" class="external-link">na.omit</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/apply.html" class="external-link">apply</a></span><span class="op">(</span><span class="va">example</span><span class="op">$</span><span class="va">X</span>, <span class="fl">1</span>, <span class="va">as.vector</span><span class="op">)</span><span class="op">)</span><span class="op">)</span>
<span class="va">frac</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/na.fail.html" class="external-link">na.omit</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/apply.html" class="external-link">apply</a></span><span class="op">(</span><span class="va">example</span><span class="op">$</span><span class="va">W</span>, <span class="fl">3</span>, <span class="va">as.vector</span><span class="op">)</span><span class="op">)</span>
<span class="fu"><a href="https://rdrr.io/r/base/colnames.html" class="external-link">colnames</a></span><span class="op">(</span><span class="va">bulk</span><span class="op">)</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/colnames.html" class="external-link">rownames</a></span><span class="op">(</span><span class="va">frac</span><span class="op">)</span> <span class="op">=</span> <span class="fl">1</span><span class="op">:</span><span class="fu"><a href="https://rdrr.io/r/base/nrow.html" class="external-link">nrow</a></span><span class="op">(</span><span class="va">frac</span><span class="op">)</span>
<span class="va">y</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Binomial.html" class="external-link">rbinom</a></span><span class="op">(</span>n <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/nrow.html" class="external-link">nrow</a></span><span class="op">(</span><span class="va">frac</span><span class="op">)</span>, size <span class="op">=</span> <span class="fl">1</span>, prob <span class="op">=</span> <span class="fl">0.5</span><span class="op">)</span>
<span class="va">covariate</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span>c1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">y</span><span class="op">)</span><span class="op">)</span>, c2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">y</span><span class="op">)</span><span class="op">)</span><span class="op">)</span>

<span class="co"># CTS-DE (np = TRUE: use non-informative prior)</span>
<span class="va">deconv</span> <span class="op">=</span> <span class="fu"><a href="reference/bmind_de.html">bmind_de</a></span><span class="op">(</span><span class="va">bulk</span>, <span class="va">frac</span>, y <span class="op">=</span> <span class="va">y</span>, covariate <span class="op">=</span> <span class="va">covariate</span>, covariate_bulk <span class="op">=</span> <span class="st">'c1'</span>, covariate_cts <span class="op">=</span> <span class="st">'c2'</span>, np <span class="op">=</span> <span class="cn">T</span><span class="op">)</span>
 
<span class="co"># estimate CTS expression</span>
<span class="va">deconv2</span> <span class="op">=</span> <span class="fu"><a href="reference/bMIND.html">bMIND</a></span><span class="op">(</span><span class="va">bulk</span>, <span class="va">frac</span><span class="op">)</span></code></pre></div>
</div>
<div class="section level2">
<h2 id="tutorials">Tutorials<a class="anchor" aria-label="anchor" href="#tutorials"></a>
</h2>
<p><strong>For detailes, please see the <a href="https://randel.github.io/MIND/" class="external-link">tutorial</a>.</strong> It covers how to get prior distributions using multi-sample scRNA-seq data.</p>
<p>The cell type fraction can be pre-estimated using 1) non-negative least squares (NNLS), which requires a signature matrix derived from reference samples of single-cell RNA-seq data; 2) Bisque, which requires raw single-cell data.</p>
</div>
<div class="section level2">
<h2 id="reference">Reference<a class="anchor" aria-label="anchor" href="#reference"></a>
</h2>
<p><strong>bMIND</strong>: Wang, Jiebiao, Kathryn Roeder, and Bernie Devlin. “Bayesian estimation of cell type-specific gene expression with prior derived from single-cell data.” <a href="https://genome.cshlp.org/content/31/10/1807.full.pdf" class="external-link"><em>Genome Research</em></a> (2021) 31: 1807-1818.</p>
<p>MIND (frequentist method): see <a href="https://github.com/randel/MIND/blob/master/MIND.md" class="external-link uri">https://github.com/randel/MIND/blob/master/MIND.md</a></p>
</div>
<div class="section level2">
<h2 id="common-errors">Common errors<a class="anchor" aria-label="anchor" href="#common-errors"></a>
</h2>
<p>If you see strange error, first check the dimnames and each cell type should have an average fraction &gt; 5%. The Bayesian software does not allow dots in the bulk sample name. Try <code>colnames(bulk) = rownames(frac) = paste0('s', 1:nrow(frac))</code></p>
<p>Also remember to remove any dot/space in the first cell type name, e.g., <code>colnames(frac) = paste0('c', 1:ncol(frac))</code></p>
</div>
</div>
  </div>

  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
    <div class="links">
<h2 data-toc-skip>Links</h2>
<ul class="list-unstyled">
<li><a href="https://github.com/randel/MIND/" class="external-link">Browse source code</a></li>
<li><a href="https://github.com/randel/MIND/issues" class="external-link">Report a bug</a></li>
</ul>
</div>

<div class="license">
<h2 data-toc-skip>License</h2>
<ul class="list-unstyled">
<li>GPL</li>
</ul>
</div>


<div class="citation">
<h2 data-toc-skip>Citation</h2>
<ul class="list-unstyled">
<li><a href="authors.html#citation">Citing MIND</a></li>
</ul>
</div>

<div class="developers">
<h2 data-toc-skip>Developers</h2>
<ul class="list-unstyled">
<li>Jiebiao Wang <br><small class="roles"> Maintainer </small>  </li>
</ul>
</div>



  </div>
</div>


      <footer><div class="copyright">
  <p></p>
<p>Developed by Jiebiao Wang.</p>
</div>

<div class="pkgdown">
  <p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
</div>

      </footer>
</div>

  


  

  </body>
</html>
back to top