Commit 55bb9e74 authored by Jun Zhao's avatar Jun Zhao
Browse files

documentation update

parent 8ed543ee
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -130,9 +130,9 @@ Feature selection using stochastic gates. arXiv preprint arXiv:1810.04247, 2018.
    
    </div>

    <pre class="usage"><span class='fu'>STGmarkerFinder</span>(<span class='no'>X</span>, <span class='no'>cell.idx</span>, <span class='no'>da.region.label</span>, <span class='kw'>da.regions.to.run</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  <span class='kw'>lambda</span> <span class='kw'>=</span> <span class='fl'>1.2</span>, <span class='kw'>n.runs</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>return.model</span> <span class='kw'>=</span> <span class='no'>F</span>,
  <span class='kw'>python.use</span> <span class='kw'>=</span> <span class='st'>"/usr/bin/python"</span>, <span class='kw'>GPU</span> <span class='kw'>=</span> <span class='st'>""</span>)</pre>
    <pre class="usage"><span class='fu'>STGmarkerFinder</span>(<span class='no'>X</span>, <span class='no'>da.regions</span>, <span class='kw'>da.regions.to.run</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>lambda</span> <span class='kw'>=</span> <span class='fl'>1.2</span>,
  <span class='kw'>n.runs</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>return.model</span> <span class='kw'>=</span> <span class='no'>F</span>, <span class='kw'>python.use</span> <span class='kw'>=</span> <span class='st'>"/usr/bin/python"</span>,
  <span class='kw'>GPU</span> <span class='kw'>=</span> <span class='st'>""</span>)</pre>
    
    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
    <table class="ref-arguments">
@@ -143,12 +143,8 @@ Feature selection using stochastic gates. arXiv preprint arXiv:1810.04247, 2018.
rownames must be gene names</p></td>
    </tr>
    <tr>
      <th>cell.idx</th>
      <td><p>result "da.cell.idx" from the output of function getDAcells</p></td>
    </tr>
    <tr>
      <th>da.region.label</th>
      <td><p>result "cluster.res" from the output of function getDAregion</p></td>
      <th>da.regions</th>
      <td><p>output from the function getDAregion()</p></td>
    </tr>
    <tr>
      <th>da.regions.to.run</th>
+44 −16
Original line number Diff line number Diff line
@@ -38,6 +38,11 @@

<meta property="og:title" content="DA-seq Step 1 &amp; Step 2: select DA cells — getDAcells" />

<meta property="og:description" content="Step 1: compute a multiscale score measure for each cell of its k-nearest-neighborhood for
multiple values of k.
Step 2: train a logistic regression classifier based on the multiscale score measure and retain cells
that may reside in DA regions." />




@@ -120,12 +125,17 @@

    <div class="ref-description">
    
    <p>Step 1: compute a multiscale score measure for each cell of its k-nearest-neighborhood for
multiple values of k.
Step 2: train a logistic regression classifier based on the multiscale score measure and retain cells
that may reside in DA regions.</p>
    
    </div>

    <pre class="usage"><span class='fu'>getDAcells</span>(<span class='no'>X</span>, <span class='no'>cell.labels</span>, <span class='no'>labels.1</span>, <span class='no'>labels.2</span>, <span class='kw'>k.vector</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  <span class='kw'>k.folds</span> <span class='kw'>=</span> <span class='fl'>10</span>, <span class='kw'>n.runs</span> <span class='kw'>=</span> <span class='fl'>10</span>, <span class='kw'>es.patience</span> <span class='kw'>=</span> <span class='fl'>10</span>, <span class='kw'>k.smooth</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  <span class='kw'>save.knn</span> <span class='kw'>=</span> <span class='no'>F</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>k.folds</span> <span class='kw'>=</span> <span class='fl'>10</span>, <span class='kw'>n.runs</span> <span class='kw'>=</span> <span class='fl'>10</span>,
  <span class='kw'>pred.thres</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.05</span>, <span class='fl'>0.95</span>), <span class='kw'>do.plot</span> <span class='kw'>=</span> <span class='no'>T</span>, <span class='kw'>plot.embedding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  <span class='kw'>size</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>python.use</span> <span class='kw'>=</span> <span class='st'>"/usr/bin/python"</span>, <span class='kw'>GPU</span> <span class='kw'>=</span> <span class='st'>""</span>)</pre>
  <span class='kw'>size</span> <span class='kw'>=</span> <span class='fl'>0.5</span>)</pre>
    
    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
    <table class="ref-arguments">
@@ -150,6 +160,10 @@
      <th>k.vector</th>
      <td><p>vector, k values to create the score vector</p></td>
    </tr>
    <tr>
      <th>alpha</th>
      <td><p>numeric, elasticnet mixing parameter passed to glmnet(), default 0 (Ridge)</p></td>
    </tr>
    <tr>
      <th>k.folds</th>
      <td><p>integer, number of data splits used in the neural network, default 10</p></td>
@@ -159,24 +173,38 @@
      <td><p>integer, number of times to run the neural network to get the predictions, default 10</p></td>
    </tr>
    <tr>
      <th>es.patience</th>
      <td><p>integer, patience parameter used in the EarlyStopping procedure, default 10</p></td>
      <th>pred.thres</th>
      <td><p>length-2 vector, top and bottom threshold on the predictions from the
logistic classification, default c(0.05,0.95)</p></td>
    </tr>
    <tr>
      <th>do.plot</th>
      <td><p>a logical value to indicate whether to return ggplot objects showing the results,
default True</p></td>
    </tr>
    <tr>
      <th>k.smooth</th>
      <td><p>integer, number of nearest neighbors used to smooth the prediction scores,
default 1<!-- % of cells} --></p>
<p>pred.threslength-2 vector, top and bottom threshold on the predictions from the
logistic classification, default c(0.05,0.95)</p>
<p>do.plota logical value to indicate whether to return ggplot objects showing the results,
default True</p>
<p>plot.embeddingsize N-by-2 matrix, 2D embedding for the cells</p>
<p>sizecell size to use in the plot, default 0.5</p>
<p>python.usecharacter string, the Python to use, default "/usr/bin/python"</p>
<p>GPUwhich GPU to use, default '', using CPU</p></td>
      <th>plot.embedding</th>
      <td><p>size N-by-2 matrix, 2D embedding for the cells</p></td>
    </tr>
    <tr>
      <th>size</th>
      <td><p>cell size to use in the plot, default 0.5</p></td>
    </tr>
    </table>
    
    <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>

    <p>a list of results</p><dl'>
  <dt>da.ratio</dt><dd><p>score vector for each cell</p></dd>
  <dt>da.pred</dt><dd><p>(mean) prediction from the neural network</p></dd>
  <dt>da.up</dt><dd><p>index for DA cells more abundant in condition of labels.2</p></dd>
  <dt>da.down</dt><dd><p>index for DA cells more abundant in condition of labels.1</p></dd>
  <dt>pred.plot</dt><dd><p>ggplot object showing the predictions of logistic regression on plot.embedding</p></dd>
  <dt>da.cells.plot</dt><dd><p>ggplot object highlighting cells of da.cell.idx on plot.embedding</p></dd>

</dl>

    

  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+20 −6
Original line number Diff line number Diff line
@@ -128,8 +128,10 @@ coherent DA regions.</p>
    
    </div>

    <pre class="usage"><span class='fu'>getDAregion</span>(<span class='no'>X</span>, <span class='no'>da.cells</span>, <span class='kw'>resolution</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='no'>cell.labels</span>, <span class='no'>labels.1</span>,
  <span class='no'>labels.2</span>, <span class='kw'>do.plot</span> <span class='kw'>=</span> <span class='no'>T</span>, <span class='kw'>plot.embedding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>size</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='no'>...</span>)</pre>
    <pre class="usage"><span class='fu'>getDAregion</span>(<span class='no'>X</span>, <span class='no'>da.cells</span>, <span class='no'>cell.labels</span>, <span class='no'>labels.1</span>, <span class='no'>labels.2</span>,
  <span class='kw'>prune.SNN</span> <span class='kw'>=</span> <span class='fl'>1</span>/<span class='fl'>15</span>, <span class='kw'>resolution</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='kw'>group.singletons</span> <span class='kw'>=</span> <span class='no'>F</span>,
  <span class='kw'>min.cell</span> <span class='kw'>=</span> <span class='fl'>10</span>, <span class='kw'>do.plot</span> <span class='kw'>=</span> <span class='no'>T</span>, <span class='kw'>plot.embedding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>size</span> <span class='kw'>=</span> <span class='fl'>0.5</span>,
  <span class='no'>...</span>)</pre>
    
    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
    <table class="ref-arguments">
@@ -142,10 +144,6 @@ coherent DA regions.</p>
      <th>da.cells</th>
      <td><p>output from getDAcells() or updateDAcells()</p></td>
    </tr>
    <tr>
      <th>resolution</th>
      <td><p>parameter for Seurat function FindClusters(), default 0.05</p></td>
    </tr>
    <tr>
      <th>cell.labels</th>
      <td><p>size N vector, labels for each input cell</p></td>
@@ -158,6 +156,22 @@ coherent DA regions.</p>
      <th>labels.2</th>
      <td><p>vector, label name(s) that represent condition 2</p></td>
    </tr>
    <tr>
      <th>prune.SNN</th>
      <td><p>parameter for Seurat function FindNeighbors(), default 1/15</p></td>
    </tr>
    <tr>
      <th>resolution</th>
      <td><p>parameter for Seurat function FindClusters(), default 0.05</p></td>
    </tr>
    <tr>
      <th>group.singletons</th>
      <td><p>parameter for Seurat function FindClusters(), default True</p></td>
    </tr>
    <tr>
      <th>min.cell</th>
      <td><p>integer, number of cells below which a DA region will be removed as outliers, default 10</p></td>
    </tr>
    <tr>
      <th>do.plot</th>
      <td><p>a logical value to indicate whether to return ggplot objects showing the results, default True</p></td>
+8 −2
Original line number Diff line number Diff line
@@ -185,9 +185,9 @@
      </tr><tr>
        
        <td>
          <p><code><a href="getDAregion.old.html">getDAregion.old()</a></code> </p>
          <p><code><a href="plotCellLabel.html">plotCellLabel()</a></code> </p>
        </td>
        <td><p>DA-seq Step 3: get DA regions</p></td>
        <td><p>Plot cell labels</p></td>
      </tr><tr>
        
        <td>
@@ -196,6 +196,12 @@
        <td><p>Plot a score for each cell</p></td>
      </tr><tr>
        
        <td>
          <p><code><a href="plotDAsite.html">plotDAsite()</a></code> </p>
        </td>
        <td><p>Plot da site</p></td>
      </tr><tr>
        
        <td>
          <p><code><a href="runSTG.html">runSTG()</a></code> </p>
        </td>
+188 −0
Original line number Diff line number Diff line
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
  <head>
  <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>Plot cell labels — plotCellLabel • DAseq</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="Plot cell labels — plotCellLabel" />

<meta property="og:description" content="Produce a ggplot object with cells on 2D embedding, colored by given labels of each cell." />





<!-- 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-reference-topic">
      <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">DAseq</a>
        <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.0.1</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li>
  <a href="../index.html">
    <span class="fas fa fas fa-home fa-lg"></span>
     
  </a>
</li>
<li>
  <a href="../reference/index.html">Reference</a>
</li>
<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
    Articles
     
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu" role="menu">
    <li>
      <a href="../articles/tutorial.html">DAseq Tutorial</a>
    </li>
  </ul>
</li>
      </ul>
      
      <ul class="nav navbar-nav navbar-right">
        
      </ul>
      
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      

      </header>

<div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>Plot cell labels</h1>
    
    <div class="hidden name"><code>plotCellLabel.Rd</code></div>
    </div>

    <div class="ref-description">
    
    <p>Produce a ggplot object with cells on 2D embedding, colored by given labels of each cell.</p>
    
    </div>

    <pre class="usage"><span class='fu'>plotCellLabel</span>(<span class='no'>X</span>, <span class='no'>label</span>, <span class='kw'>cell.col</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>size</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>do.label</span> <span class='kw'>=</span> <span class='no'>T</span>)</pre>
    
    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
    <table class="ref-arguments">
    <colgroup><col class="name" /><col class="desc" /></colgroup>
    <tr>
      <th>X</th>
      <td><p>matrix, 2D embedding of each cell for the plot</p></td>
    </tr>
    <tr>
      <th>label</th>
      <td><p>vector, label for each cell</p></td>
    </tr>
    <tr>
      <th>cell.col</th>
      <td><p>string vector, color bar to use for cell labels, default ggplot default</p></td>
    </tr>
    <tr>
      <th>size</th>
      <td><p>numeric, dot size for each cell, default 0.5</p></td>
    </tr>
    <tr>
      <th>do.label</th>
      <td><p>a logical value indicating whether to add text to mark each cell label</p></td>
    </tr>
    </table>
    
    <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>

    <p>a ggplot object</p>
    

  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
    <nav id="toc" data-toggle="toc" class="sticky-top">
      <h2 data-toc-skip>Contents</h2>
    </nav>
  </div>
</div>


      <footer>
      <div class="copyright">
  <p>Developed by Jun Zhao.</p>
</div>

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

      </footer>
   </div>

  


  </body>
</html>

Loading