<!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>Object Format Conversion • scCustomize</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 href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" 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="Object Format Conversion">
<meta property="og:description" content="scCustomize">
<!-- 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-article">
      <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">scCustomize</a>
        <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">2.1.2</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
<li>
  <a href="../index.html">Getting Started</a>
</li>
<li>
  <a href="../articles/Installation.html">Install</a>
</li>
<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
    Vignettes
     
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu" role="menu">
<li class="dropdown-header">Plotting Vignettes</li>
    <li>
      <a href="../articles/Gene_Expression_Plotting.html">Plotting #1: General Analysis Plots</a>
    </li>
    <li>
      <a href="../articles/QC_Plots.html">Plotting #2: QC Plots</a>
    </li>
    <li>
      <a href="../articles/Sequencing_QC_Plots.html">Plotting #3: Sequencing QC Plots/Analysis</a>
    </li>
    <li>
      <a href="../articles/Iterative_Plotting.html">Plotting #4: Iterative Plotting Functions</a>
    </li>
    <li>
      <a href="../articles/Color_Palettes.html">Customized Color Palettes &amp; Themes</a>
    </li>
    <li class="divider">
    </li>
<li class="dropdown-header">Helpers &amp; Utilities</li>
    <li>
      <a href="../articles/Helpers_and_Utilities.html">General Helpers &amp; Utilities</a>
    </li>
    <li>
      <a href="../articles/Read_and_Write_Functions.html">Read &amp; Write Data Functions</a>
    </li>
    <li>
      <a href="../articles/Object_Conversion.html">Object/Assay Format Conversion</a>
    </li>
    <li>
      <a href="../articles/Markers_and_Cluster_Annotation.html">Marker Identification &amp; Cluster Annotation Helpers</a>
    </li>
    <li>
      <a href="../articles/Statistics.html">Statistics Functions</a>
    </li>
    <li>
      <a href="../articles/Update_Gene_Symbols.html">Updating Gene Symbols</a>
    </li>
    <li>
      <a href="../articles/Misc_Functions.html">Misc Functions</a>
    </li>
    <li class="divider">
    </li>
<li class="dropdown-header">Other Package Interactivity/Functions</li>
    <li>
      <a href="../articles/LIGER_Functions.html">LIGER Plotting &amp; Functionality</a>
    </li>
    <li>
      <a href="../articles/Cell_Bender_Functions.html">Cell Bender Functionality &amp; Plotting</a>
    </li>
  </ul>
</li>
<li>
  <a href="../news/index.html">News/Changelog</a>
</li>
<li>
  <a href="../reference/index.html">Reference</a>
</li>
<li>
  <a href="../articles/FAQ.html">FAQ</a>
</li>
      </ul>
<ul class="nav navbar-nav navbar-right">
<li>
  <a href="https://github.com/samuel-marsh/scCustomize/" class="external-link">
    <span class="fab fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
</div>
<!--/.nav-collapse -->
  </div>
<!--/.container -->
</div>
<!--/.navbar -->

      

      </header><script src="Object_Conversion_files/kePrint-0.0.1/kePrint.js"></script><link href="Object_Conversion_files/lightable-0.0.1/lightable.css" rel="stylesheet">
<div class="row">
  <div class="col-md-9 contents">
    <div class="page-header toc-ignore">
      <h1 data-toc-skip>Object Format Conversion</h1>
            
            <h4 data-toc-skip class="date">Compiled: February 28,
2024</h4>
      
      <small class="dont-index">Source: <a href="https://github.com/samuel-marsh/scCustomize/blob/HEAD/vignettes/articles/Object_Conversion.Rmd" class="external-link"><code>vignettes/articles/Object_Conversion.Rmd</code></a></small>
      <div class="hidden name"><code>Object_Conversion.Rmd</code></div>

    </div>

    
    
<hr>
<style>
p.caption {
  font-size: 0.9em;
}
</style>
<div class="section level2">
<h2 id="converting-between-scrna-seq-package-formats">Converting between scRNA-seq package formats<a class="anchor" aria-label="anchor" href="#converting-between-scrna-seq-package-formats"></a>
</h2>
<p>While many packages are have some object converters they are not
always as feature complete as desired. scCustomize provides a few
straightforward converter functions.</p>
<p><strong><em>FYI: Object converters can be fragile and/or not very
flexible. I have tried to make these functions to avoid those issues.
However, if that proves too hard a task to maintain long-term I may move
them to separate package/deprecate them.</em></strong></p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># Load Packages</span></span>
<span><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://satijalab.org/seurat" class="external-link">Seurat</a></span><span class="op">)</span></span>
<span><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/welch-lab/liger" class="external-link">rliger</a></span><span class="op">)</span></span>
<span><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/samuel-marsh/scCustomize" class="external-link">scCustomize</a></span><span class="op">)</span></span>
<span><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/traversc/qs" class="external-link">qs</a></span><span class="op">)</span></span></code></pre></div>
<p>Load Seurat Object &amp; Add QC Data</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># read object</span></span>
<span><span class="va">pbmc</span> <span class="op">&lt;-</span> <span class="fu">pbmc3k.SeuratData</span><span class="fu">::</span><span class="va"><a href="https://rdrr.io/pkg/pbmc3k.SeuratData/man/pbmc3k.final.html" class="external-link">pbmc3k.final</a></span></span>
<span><span class="va">pbmc</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/SeuratObject/man/UpdateSeuratObject.html" class="external-link">UpdateSeuratObject</a></span><span class="op">(</span><span class="va">pbmc</span><span class="op">)</span></span>
<span></span>
<span><span class="va">pbmc</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/Add_Cell_QC_Metrics.html">Add_Cell_QC_Metrics</a></span><span class="op">(</span>seurat_object <span class="op">=</span> <span class="va">pbmc</span>, species <span class="op">=</span> <span class="st">"human"</span><span class="op">)</span></span></code></pre></div>
<p>We’ll also add some random meta data variables to pbmc data form use
in this vignette</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">pbmc</span><span class="op">$</span><span class="va">sample_id</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/sample.html" class="external-link">sample</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"sample1"</span>, <span class="st">"sample2"</span>, <span class="st">"sample3"</span>, <span class="st">"sample4"</span>, <span class="st">"sample5"</span>, <span class="st">"sample6"</span><span class="op">)</span>, size <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/nrow.html" class="external-link">ncol</a></span><span class="op">(</span><span class="va">pbmc</span><span class="op">)</span>,</span>
<span>    replace <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="section level3">
<h3 id="convert-seurat-objects-to-liger-objects">Convert Seurat Objects to LIGER Objects<a class="anchor" aria-label="anchor" href="#convert-seurat-objects-to-liger-objects"></a>
</h3>
<p>scCustomize contains the conversion function <code><a href="../reference/as.LIGER.html">as.LIGER()</a></code>.
This function has a few advantages over the conversion function
<code><a href="https://rdrr.io/pkg/rliger/man/seuratToLiger.html" class="external-link">rliger::seuratToLiger()</a></code>.</p>
<ul>
<li>
<code>as.liger</code> will <em>keep all meta data</em> and transfer
it to LIGER by default.<br>
</li>
<li>If a dimensionality reduction is transferred <code>as.liger</code>
will also store a reduction key for use with scCustomize LIGER plotting
functions to correctly set plot axes.<br>
</li>
<li>If converting a list of Seurat objects and keeping Seurat variable
genes then <code>as.liger</code> can either take union or intersection
of genes between objects.<br>
</li>
<li>
<code>as.liger</code> has additional internal checks to ensure
compatibility with both Seurat V3/4 &amp; V5 object structures.</li>
</ul>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">pbmc_liger</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/as.LIGER.html">as.LIGER</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">pbmc</span>, group.by <span class="op">=</span> <span class="st">"sample_id"</span><span class="op">)</span></span></code></pre></div>
<pre><code><span><span class="co">## <span style="color: #00BBBB;">•</span> Checking Seurat object validity</span></span>
<span><span class="co">## <span style="color: #00BBBB;">•</span> Creating LIGER object.</span></span>
<span><span class="co">## <span style="color: #00BBBB;">•</span> Normalizing data.</span></span></code></pre>
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">pbmc_liger</span></span></code></pre></div>
<pre><code><span><span class="co">## An object of class liger </span></span>
<span><span class="co">## with 6 datasets and</span></span>
<span><span class="co">##  2638 total cells.</span></span></code></pre>
<p>Confirm that information from meta.data slot was transferred to LIGER
object.</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></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>x <span class="op">=</span> <span class="va">pbmc_liger</span><span class="op">@</span><span class="va">cell.data</span><span class="op">)</span>, <span class="fl">10</span><span class="op">)</span></span></code></pre></div>
<pre><code><span><span class="co">##  [1] "nUMI"               "nGene"              "dataset"           </span></span>
<span><span class="co">##  [4] "orig.ident"         "seurat_annotations" "percent.mt"        </span></span>
<span><span class="co">##  [7] "RNA_snn_res.0.5"    "seurat_clusters"    "percent_mito"      </span></span>
<span><span class="co">## [10] "percent_ribo"</span></span></code></pre>
</div>
<div class="section level3">
<h3 id="convert-liger-objects-to-seurat-objects">Convert LIGER objects to Seurat Objects<a class="anchor" aria-label="anchor" href="#convert-liger-objects-to-seurat-objects"></a>
</h3>
<p>The liger/rliger package already contains a function
<code><a href="https://rdrr.io/pkg/rliger/man/seuratToLiger.html" class="external-link">rliger::seuratToLiger()</a></code> to convert LIGER objects to Seurat
Objects. However, during this transfer a few things have issues crop
up:</p>
<ul>
<li>All meta data except the “dataset” column from
liger_object@cell.data is lost.</li>
<li>Seurat dimensionality reduction is set to tSNE regardless of method
used in LIGER analysis</li>
<li>Seurat assay name not specified</li>
</ul>
<p>As of scCustomize v2.1.0 converting to Seurat objects from Liger can
be accomplished using <code>as.liger</code> function which functions
identically to previous function <code><a href="../reference/Liger_to_Seurat.html">Liger_to_Seurat()</a></code>.
<code><a href="../reference/Liger_to_Seurat.html">Liger_to_Seurat()</a></code> will continue to work until v2.2.0 at
which point it will be completely deprecated.</p>
<p>scCustomize contains modified version of this function which extends
the Seurat function <a href="https://github.com/samuel-marsh/scCustomize/blob/develop/docs/reference/as.Seurat.html" class="external-link"><code>as.Seurat()</code></a>
that solves these issues with some extra parameters:</p>
<ul>
<li>
<code>keep_meta</code> logical. Whether to keep meta data from the
@cell.data slot in LIGER object. Default is TRUE.</li>
<li>
<code>reduction_label</code> Name of dimensionality reduction
technique used (e.g., tSNE, UMAP, etc). Ensures dim names are set
correctly in Seurat object.</li>
<li>
<code>seurat_assay</code> Name of assay to use for data in Seurat
object. Default is “RNA”.<br>
</li>
<li>
<code>assay_type</code> Specify whether to create V3/4 vs V5 Seurat
assays.</li>
</ul>
<div class="sourceCode" id="cb10"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">new_seurat</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/SeuratObject/man/as.Seurat.html" class="external-link">as.Seurat</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">pbmc_liger</span>, reduction_label <span class="op">=</span> <span class="st">"UMAP"</span><span class="op">)</span></span></code></pre></div>
<pre><code><span><span class="co">## <span style="color: #00BB00;">Preparing &amp; merging matrices.</span></span></span>
<span><span class="co">## <span style="color: #00BB00;">Creating final sparse matrix.</span></span></span>
<span><span class="co">## Normalizing layer: counts</span></span></code></pre>
</div>
<div class="section level3">
<h3 id="convert-seurat-or-liger-objects-to-anndata-objects">Convert Seurat or LIGER objects to Anndata objects<a class="anchor" aria-label="anchor" href="#convert-seurat-or-liger-objects-to-anndata-objects"></a>
</h3>
<p>scCustomize also allows for the conversion of Seurat or LIGER objects
to python <a href="https://anndata.readthedocs.io/en/latest/" class="external-link">anndata</a> objects for
analysis in <a href="https://scanpy.readthedocs.io/en/stable/" class="external-link">scanpy</a> or other
compatible python packages via the function <code>as.anndata</code>.
These functions were inspired/modified/updated from <a href="https://github.com/cellgeni/sceasy" class="external-link">sceasy R package</a> (see
<code>as.anndata</code> documentation).</p>
<ul>
<li>
<code>as.anndata</code> works with Seurat V3/4, Seurat V5, and LIGER
objects.<br>
</li>
<li>
<code>as.anndata</code> requires users have <a href="https://CRAN.R-project.org/package=reticulate" class="external-link">reticulate R
package</a> and linked python installation with anndata installed.
<ul>
<li>See <a href="https://rstudio.github.io/reticulate/" class="external-link">reticulate
website</a> for more information on installation and setup of reticulate
in R.</li>
<li>See <a href="https://anndata.readthedocs.io/en/latest/" class="external-link">anndata
website</a> for more information on installation and use of anndata in
python.</li>
</ul>
</li>
</ul>
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/as.anndata.html">as.anndata</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">pbmc</span>, file_path <span class="op">=</span> <span class="st">"~/Desktop"</span>, file_name <span class="op">=</span> <span class="st">"pbmc_anndata.h5ad"</span><span class="op">)</span></span></code></pre></div>
<pre><code><span><span class="co">## <span style="color: #00BBBB;">•</span> Checking Seurat object validity &amp; Extracting Data</span></span>
<span><span class="co">## The following columns were removed as they contain identical values for all</span></span>
<span><span class="co">## rows:</span></span>
<span><span class="co">## <span style="color: #00BBBB;">ℹ</span> <span style="color: #00BB00;">orig.ident</span></span></span>
<span><span class="co">## <span style="color: #00BBBB;">•</span> Creating anndata object.</span></span>
<span><span class="co">## <span style="color: #00BBBB;">•</span> Writing anndata file: <span style="color: #0000BB;">"/Users/marsh_mbp/Desktop/pbmc_anndata.h5ad"</span></span></span></code></pre>
<pre><code><span><span class="co">## AnnData object with n_obs × n_vars = 2638 × 13714</span></span>
<span><span class="co">##     obs: 'nCount_RNA', 'nFeature_RNA', 'seurat_annotations', 'percent.mt', 'RNA_snn_res.0.5', 'seurat_clusters', 'percent_mito', 'percent_ribo', 'percent_mito_ribo', 'log10GenesPerUMI', 'percent_top50', 'percent_oxphos', 'percent_apop', 'percent_dna_repair', 'percent_ieg', 'S.Score', 'G2M.Score', 'Phase', 'sample_id'</span></span>
<span><span class="co">##     var: 'vst.mean', 'vst.variance', 'vst.variance.expected', 'vst.variance.standardized', 'vst.variable'</span></span>
<span><span class="co">##     obsm: 'X_pca', 'X_umap'</span></span>
<span><span class="co">##     layers: 'counts'</span></span></code></pre>
</div>
<div class="section level3">
<h3 id="convert-seurat-assay-type-within-an-object">Convert Seurat assay type within an object<a class="anchor" aria-label="anchor" href="#convert-seurat-assay-type-within-an-object"></a>
</h3>
<p>The release of Seurat V5+ has brought about two different types of
assay structure that can exist within a Seurat object. However, some
community tools that interact with Seurat objects have not been updated
to work with both assay formats. Therefore it becomes necessary to
change assay format for use with certain tools.</p>
<p>scCustomize provides <code><a href="../reference/Convert_Assay.html">Convert_Assay()</a></code> for easy method to
convert from Assay&gt;Assay5 (V3/4&gt;5) or Assay5&gt;Assay
(V5&gt;V3/4).</p>
<div class="section level4">
<h4 id="convert-v34-to-v5">Convert V3/4 to V5<a class="anchor" aria-label="anchor" href="#convert-v34-to-v5"></a>
</h4>
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># Convert to V5/Assay5 structure</span></span>
<span><span class="va">pbmc_V5</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/Convert_Assay.html">Convert_Assay</a></span><span class="op">(</span>seurat_object <span class="op">=</span> <span class="va">pbmc</span>, convert_to <span class="op">=</span> <span class="st">"V5"</span><span class="op">)</span></span>
<span></span>
<span><span class="va">pbmc_V5</span><span class="op">[[</span><span class="st">"RNA"</span><span class="op">]</span><span class="op">]</span></span></code></pre></div>
<pre><code><span><span class="co">## Assay (v5) data with 13714 features for 2638 cells</span></span>
<span><span class="co">## Top 10 variable features:</span></span>
<span><span class="co">##  PPBP, LYZ, S100A9, IGLL5, GNLY, FTL, PF4, FTH1, GNG11, S100A8 </span></span>
<span><span class="co">## Layers:</span></span>
<span><span class="co">##  data, counts, scale.data</span></span></code></pre>
</div>
<div class="section level4">
<h4 id="convert-v5-v34">Convert V5 &gt; V3/4<a class="anchor" aria-label="anchor" href="#convert-v5-v34"></a>
</h4>
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># Convert to V3/4/Assay structure</span></span>
<span><span class="va">pbmc_V3</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/Convert_Assay.html">Convert_Assay</a></span><span class="op">(</span>seurat_object <span class="op">=</span> <span class="va">pbmc_V5</span>, convert_to <span class="op">=</span> <span class="st">"V3"</span><span class="op">)</span></span>
<span></span>
<span><span class="va">pbmc_V3</span><span class="op">[[</span><span class="st">"RNA"</span><span class="op">]</span><span class="op">]</span></span></code></pre></div>
<pre><code><span><span class="co">## Assay data with 13714 features for 2638 cells</span></span>
<span><span class="co">## Top 10 variable features:</span></span>
<span><span class="co">##  PPBP, LYZ, S100A9, IGLL5, GNLY, FTL, PF4, FTH1, GNG11, S100A8</span></span></code></pre>
</div>
<div class="section level4">
<h4 id="accepted-values-for-convert_to">Accepted values for <code>convert_to</code><a class="anchor" aria-label="anchor" href="#accepted-values-for-convert_to"></a>
</h4>
<p><code>Convert_Assay</code> will accept a range of accepted values for
the <code>convert_to</code> parameter to specify desired format.</p>
<table class="table table table-bordered table-condensed table-responsive table-striped" style="margin-left: auto; margin-right: auto;">
<thead><tr>
<th style="text-align:left;">
V3_Assay_Options
</th>
<th style="text-align:left;">
V5_Assay5_Options
</th>
</tr></thead>
<tbody>
<tr>
<td style="text-align:left;">
Assay
</td>
<td style="text-align:left;">
Assay5
</td>
</tr>
<tr>
<td style="text-align:left;">
assay
</td>
<td style="text-align:left;">
assay5
</td>
</tr>
<tr>
<td style="text-align:left;">
V3
</td>
<td style="text-align:left;">
V5
</td>
</tr>
<tr>
<td style="text-align:left;">
v3
</td>
<td style="text-align:left;">
v5
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
  </div>

  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

        <nav id="toc" data-toggle="toc"><h2 data-toc-skip>Contents</h2>
    </nav>
</div>

</div>



      <footer><div class="copyright">
  <p></p>
<p>Developed by Samuel Marsh.</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.7.</p>
</div>

      </footer>
</div>

  


  

  </body>
</html>
