Skip to content

Commit

Permalink
Build site.
Browse files Browse the repository at this point in the history
  • Loading branch information
davetang committed Feb 19, 2025
1 parent 1349d0c commit 61c73f8
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 16 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure/seurat_markers.Rmd/cd8_markers-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/figure/seurat_markers.Rmd/umap-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
162 changes: 146 additions & 16 deletions docs/seurat_markers.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@



<meta name="date" content="2025-01-16" />
<meta name="date" content="2025-02-19" />

<title>Finding Markers with Seurat</title>

Expand Down Expand Up @@ -359,7 +359,7 @@


<h1 class="title toc-ignore">Finding Markers with Seurat</h1>
<h4 class="date">2025-01-16</h4>
<h4 class="date">2025-02-19</h4>

</div>

Expand Down Expand Up @@ -388,7 +388,7 @@ <h4 class="date">2025-01-16</h4>
<div class="tab-content">
<div id="summary" class="tab-pane fade in active">
<p>
<strong>Last updated:</strong> 2025-01-16
<strong>Last updated:</strong> 2025-02-19
</p>
<p>
<strong>Checks:</strong> <span
Expand Down Expand Up @@ -519,15 +519,15 @@ <h4 class="date">2025-01-16</h4>
<div class="panel panel-default">
<div class="panel-heading">
<p class="panel-title">
<a data-toggle="collapse" data-parent="#workflowr-checks" href="#strongRepositoryversionstrongahrefhttpsgithubcomdavetangmusetree380f7f818fb7e6a72fad6ae2d2ff46dbad046f65targetblank380f7f8a">
<a data-toggle="collapse" data-parent="#workflowr-checks" href="#strongRepositoryversionstrongahrefhttpsgithubcomdavetangmusetree1349d0c450cfd2d04ac10b46d1d9aa3b33f157a4targetblank1349d0ca">
<span class="glyphicon glyphicon-ok text-success"
aria-hidden="true"></span> <strong>Repository version:</strong>
<a href="https://github.com/davetang/muse/tree/380f7f818fb7e6a72fad6ae2d2ff46dbad046f65" target="_blank">380f7f8</a>
<a href="https://github.com/davetang/muse/tree/1349d0c450cfd2d04ac10b46d1d9aa3b33f157a4" target="_blank">1349d0c</a>
</a>
</p>
</div>
<div
id="strongRepositoryversionstrongahrefhttpsgithubcomdavetangmusetree380f7f818fb7e6a72fad6ae2d2ff46dbad046f65targetblank380f7f8a"
id="strongRepositoryversionstrongahrefhttpsgithubcomdavetangmusetree1349d0c450cfd2d04ac10b46d1d9aa3b33f157a4targetblank1349d0ca"
class="panel-collapse collapse">
<div class="panel-body">
<p>
Expand All @@ -537,7 +537,7 @@ <h4 class="date">2025-01-16</h4>
</p>
<p>
The results in this page were generated with repository version
<a href="https://github.com/davetang/muse/tree/380f7f818fb7e6a72fad6ae2d2ff46dbad046f65" target="_blank">380f7f8</a>.
<a href="https://github.com/davetang/muse/tree/1349d0c450cfd2d04ac10b46d1d9aa3b33f157a4" target="_blank">1349d0c</a>.
See the <em>Past versions</em> tab to see a history of the changes made
to the R Markdown and HTML files.
</p>
Expand All @@ -552,12 +552,28 @@ <h4 class="date">2025-01-16</h4>
</p>
<pre><code>
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: data/pbmc3k.csv
Ignored: data/pbmc3k.csv.gz
Ignored: data/1M_neurons_filtered_gene_bc_matrices_h5.h5
Ignored: data/293t/
Ignored: data/293t_3t3_filtered_gene_bc_matrices.tar.gz
Ignored: data/293t_filtered_gene_bc_matrices.tar.gz
Ignored: data/5k_Human_Donor1_PBMC_3p_gem-x_5k_Human_Donor1_PBMC_3p_gem-x_count_sample_filtered_feature_bc_matrix.h5
Ignored: data/5k_Human_Donor2_PBMC_3p_gem-x_5k_Human_Donor2_PBMC_3p_gem-x_count_sample_filtered_feature_bc_matrix.h5
Ignored: data/5k_Human_Donor3_PBMC_3p_gem-x_5k_Human_Donor3_PBMC_3p_gem-x_count_sample_filtered_feature_bc_matrix.h5
Ignored: data/5k_Human_Donor4_PBMC_3p_gem-x_5k_Human_Donor4_PBMC_3p_gem-x_count_sample_filtered_feature_bc_matrix.h5
Ignored: data/Parent_SC3v3_Human_Glioblastoma_filtered_feature_bc_matrix.tar.gz
Ignored: data/brain_counts/
Ignored: data/cl.obo
Ignored: data/cl.owl
Ignored: data/jurkat/
Ignored: data/jurkat:293t_50:50_filtered_gene_bc_matrices.tar.gz
Ignored: data/jurkat_293t/
Ignored: data/jurkat_filtered_gene_bc_matrices.tar.gz
Ignored: data/pbmc3k/
Ignored: r_packages_4.4.0/
Ignored: data/pbmc4k_filtered_gene_bc_matrices.tar.gz
Ignored: data/refdata-gex-GRCh38-2020-A.tar.gz
Ignored: data/seurat_1m_neuron.rds
Ignored: data/t_3k_filtered_gene_bc_matrices.tar.gz
Ignored: r_packages_4.4.1/

</code></pre>
Expand Down Expand Up @@ -608,6 +624,40 @@ <h4 class="date">2025-01-16</h4>
Rmd
</td>
<td>
<a href="https://github.com/davetang/muse/blob/1349d0c450cfd2d04ac10b46d1d9aa3b33f157a4/analysis/seurat_markers.Rmd" target="_blank">1349d0c</a>
</td>
<td>
Dave Tang
</td>
<td>
2025-02-19
</td>
<td>
CD 8 markers
</td>
</tr>
<tr>
<td>
html
</td>
<td>
<a href="https://rawcdn.githack.com/davetang/muse/3c2f9fa3e9bf217de47a728b6d1ac3f5834da364/docs/seurat_markers.html" target="_blank">3c2f9fa</a>
</td>
<td>
Dave Tang
</td>
<td>
2025-01-16
</td>
<td>
Build site.
</td>
</tr>
<tr>
<td>
Rmd
</td>
<td>
<a href="https://github.com/davetang/muse/blob/380f7f818fb7e6a72fad6ae2d2ff46dbad046f65/analysis/seurat_markers.Rmd" target="_blank">380f7f8</a>
</td>
<td>
Expand Down Expand Up @@ -855,8 +905,11 @@ <h2>Data</h2>
<div id="seurat-object" class="section level2">
<h2>Seurat object</h2>
<p>Load 10x data into a matrix using <code>Read10X()</code>.</p>
<pre class="r"><code>pbmc.data &lt;- Read10X(
data.dir = &quot;data/pbmc3k/filtered_gene_bc_matrices/hg19/&quot;
<pre class="r"><code>work_dir &lt;- rprojroot::find_rstudio_root_file()
data_dir &lt;- paste0(work_dir, &quot;/data/pbmc3k/filtered_gene_bc_matrices/hg19/&quot;)
stopifnot(dir.exists(data_dir))
pbmc.data &lt;- Read10X(
data.dir = data_dir
)</code></pre>
<p>Create the Seurat object using <code>CreateSeuratObject</code>; see
<code>?SeuratObject</code> for more information on the class.</p>
Expand Down Expand Up @@ -896,6 +949,45 @@ <h2>Seurat workflow</h2>
3 layers present: counts, data, scale.data
2 dimensional reductions calculated: pca, umap</code></pre>
</div>
<div id="known-markers" class="section level2">
<h2>Known markers</h2>
<p>UMAP.</p>
<pre class="r"><code>DimPlot(seurat_obj, label = TRUE)</code></pre>
<p><img src="figure/seurat_markers.Rmd/umap-1.png" width="672" style="display: block; margin: auto;" /></p>
<p>Known markers.</p>
<pre class="r"><code>known_markers &lt;- tibble::tribble(
~Label, ~`Expanded Label`, ~`OBO Ontology ID`, ~Markers,
&quot;Mono&quot;, &quot;Monocyte&quot;, &quot;CL:0000576&quot;, &quot;CTSS, FCN1, NEAT1, LYZ, PSAP, S100A9, AIF1, MNDA, SERPINA1, TYROBP&quot;,
&quot;CD4 T&quot;, &quot;CD4+ T cell&quot;, &quot;CL:0000624&quot;, &quot;IL7R, MAL, LTB, CD4, LDHB, TPT1, TRAC, TMSB10, CD3D, CD3G&quot;,
&quot;CD8 T&quot;, &quot;CD8+ T cell&quot;, &quot;CL:0000625&quot;, &quot;CD8B, CD8A, CD3D, TMSB10, HCST, CD3G, LINC02446, CTSW, CD3E, TRAC&quot;,
&quot;NK&quot;, &quot;natural killer cell&quot;, &quot;CL:0000623&quot;, &quot;NKG7, KLRD1, TYROBP, GNLY, FCER1G, PRF1, CD247, KLRF1, CST7, GZMB&quot;,
&quot;B&quot;, &quot;B cell&quot;, &quot;CL:0000785&quot;, &quot;CD79A, RALGPS2, CD79B, MS4A1, BANK1, CD74, TNFRSF13C, HLA-DQA1, IGHM, MEF2C&quot;,
&quot;other T&quot;, &quot;other T cell&quot;, &quot;CL:0002419&quot;, &quot;CD3D, TRDC, GZMK, KLRB1, NKG7, TRGC2, CST7, LYAR, KLRG1, GZMA&quot;,
&quot;DC&quot;, &quot;dendritic cell&quot;, &quot;CL:0000451&quot;, &quot;CD74, HLA-DPA1, HLA-DPB1, HLA-DQA1, CCDC88A, HLA-DRA, HLA-DMA, CST3, HLA-DQB1, HLA-DRB1&quot;
)

known_markers</code></pre>
<pre><code># A tibble: 7 × 4
Label `Expanded Label` `OBO Ontology ID` Markers
&lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt;
1 Mono Monocyte CL:0000576 CTSS, FCN1, NEAT1, LYZ, PSAP, S…
2 CD4 T CD4+ T cell CL:0000624 IL7R, MAL, LTB, CD4, LDHB, TPT1…
3 CD8 T CD8+ T cell CL:0000625 CD8B, CD8A, CD3D, TMSB10, HCST,…
4 NK natural killer cell CL:0000623 NKG7, KLRD1, TYROBP, GNLY, FCER…
5 B B cell CL:0000785 CD79A, RALGPS2, CD79B, MS4A1, B…
6 other T other T cell CL:0002419 CD3D, TRDC, GZMK, KLRB1, NKG7, …
7 DC dendritic cell CL:0000451 CD74, HLA-DPA1, HLA-DPB1, HLA-D…</code></pre>
<p>Plot CD8 markers.</p>
<pre class="r"><code>known_markers |&gt;
dplyr::filter(Label == &quot;CD8 T&quot;) |&gt;
dplyr::pull(Markers) |&gt;
stringr::str_split(pattern = &quot;, &quot;) |&gt;
unlist() -&gt; cd8_markers

Seurat::FeaturePlot(seurat_obj, features = cd8_markers)</code></pre>
<pre><code>Warning: The following requested variables were not found: LINC02446, TRAC</code></pre>
<p><img src="figure/seurat_markers.Rmd/cd8_markers-1.png" width="768" style="display: block; margin: auto;" /></p>
</div>
<div id="find-all-markers" class="section level2">
<h2>Find all markers</h2>
<p><code>FindAllMarkers()</code> will find markers (differentially
Expand Down Expand Up @@ -1352,9 +1444,30 @@ <h2>Calculate module scores</h2>
expression, and the control features are randomly selected from each
bin.</p>
</blockquote>
<p>Arguments:</p>
<ul>
<li><code>object</code> - Seurat object</li>
<li><code>features</code> - A list of vectors of features for expression
programs; each entry should be a vector of feature names</li>
<li><code>pool</code> - List of features to check expression levels
against, defaults to rownames(x = object)</li>
<li><code>nbin</code> - Number of bins of aggregate expression levels
for all analyzed features</li>
<li><code>ctrl</code> - Number of control features selected from the
same bin per analyzed feature</li>
<li><code>k</code> - Use feature clusters returned from DoKMeans</li>
<li><code>assay</code> - Name of assay to use</li>
<li><code>name</code> - Name for the expression programs; will append a
number to the end for each entry in features (eg. if features has three
programs, the results will be stored as name1, name2, name3,
respectively)</li>
<li><code>seed</code> - Set a random seed. If NULL, seed is not
set.</li>
<li><code>search</code> - Search for symbol synonyms for features in
features that don’t match features in object? Searches the HGNC’s gene
names database; see UpdateSymbolList for more details</li>
<li><code>slot</code> - Slot to calculate score values off of. Defaults
to data slot (i.e log-normalized counts)</li>
</ul>
<pre class="r"><code>pbmc_small_markers |&gt;
head(10) |&gt;
Expand Down Expand Up @@ -1461,6 +1574,22 @@ <h2>Calculate module scores</h2>
</table>
</div>
</div>
<div id="cd-8" class="section level3">
<h3>CD 8</h3>
<p>Add module score for CD 8 markers.</p>
<pre class="r"><code>cd8_markers_found &lt;- cd8_markers[cd8_markers %in% row.names(seurat_obj@assays$RNA$data)]

AddModuleScore(
object = seurat_obj,
features = cd8_markers_found,
name = &#39;cd8_markers&#39;
) -&gt; seurat_obj

FeaturePlot(
seurat_obj,
features = &quot;cd8_markers1&quot;, label = TRUE, repel = TRUE
)</code></pre>
<p><img src="figure/seurat_markers.Rmd/add_module_score_cd8-1.png" width="672" style="display: block; margin: auto;" /></p>
<br>
<p>
<button type="button" class="btn btn-default btn-workflowr btn-workflowr-sessioninfo" data-toggle="collapse" data-target="#workflowr-sessioninfo" style="display: block;">
Expand Down Expand Up @@ -1507,7 +1636,7 @@ <h2>Calculate module scores</h2>
[16] KernSmooth_2.23-24 bslib_0.8.0 htmlwidgets_1.6.4
[19] ica_1.0-3 plyr_1.8.9 plotly_4.10.4
[22] zoo_1.8-12 cachem_1.1.0 whisker_0.4.1
[25] igraph_2.1.2 mime_0.12 lifecycle_1.0.4
[25] igraph_2.1.1 mime_0.12 lifecycle_1.0.4
[28] pkgconfig_2.0.3 Matrix_1.7-0 R6_2.5.1
[31] fastmap_1.2.0 fitdistrplus_1.2-1 shiny_1.9.1
[34] digest_0.6.37 colorspace_2.1-1 patchwork_1.3.0
Expand All @@ -1518,14 +1647,14 @@ <h2>Calculate module scores</h2>
[49] compiler_4.4.1 withr_3.0.2 fastDummies_1.7.4
[52] highr_0.11 R.utils_2.12.3 MASS_7.3-60.2
[55] tools_4.4.1 lmtest_0.9-40 httpuv_1.6.15
[58] goftest_1.2-3 R.oo_1.27.0 glue_1.8.0
[58] goftest_1.2-3 R.oo_1.26.0 glue_1.8.0
[61] callr_3.7.6 nlme_3.1-164 promises_1.3.0
[64] grid_4.4.1 Rtsne_0.17 getPass_0.2-4
[67] cluster_2.1.6 reshape2_1.4.4 generics_0.1.3
[70] gtable_0.3.6 spatstat.data_3.1-2 R.methodsS3_1.8.2
[73] tidyr_1.3.1 utf8_1.2.4 spatstat.geom_3.3-3
[76] RcppAnnoy_0.0.22 ggrepel_0.9.6 RANN_2.6.2
[79] pillar_1.9.0 stringr_1.5.1 limma_3.62.1
[79] pillar_1.9.0 stringr_1.5.1 limma_3.62.2
[82] spam_2.11-0 RcppHNSW_0.6.0 later_1.3.2
[85] splines_4.4.1 dplyr_1.1.4 lattice_0.22-6
[88] survival_3.6-4 deldir_2.0-4 tidyselect_1.2.1
Expand All @@ -1548,6 +1677,7 @@ <h2>Calculate module scores</h2>
</div>
</div>
</div>
</div>


<!-- Adjust MathJax settings so that all math formulae are shown using
Expand Down

0 comments on commit 61c73f8

Please sign in to comment.