分类标签归档:单细胞

单细胞之Reference Mapping


Reference Mapping

### 背景
单细胞数据分析的核心步骤到底是在分析基因表达矩阵协方差的来源
对细胞的cell embedding,图谱提供好的model,可看自己数据在其中的关系

1.数据清洗

library(Seurat)
library(GEOquery)
setwd(here::here())

# cached.object <- "input/SadeFeldman.seurat.rds"
cached.object <- "input/SadeFeldman.seurat.qs"

options(t...

Read more

单细胞之GRN


GRN 基因调控网络

## 背景
http://www.seqyuan.com/GRN.html
https://lishensuo.github.io/posts/bioinfo/010%E5%8D%95%E7%BB%86%E8%83%9E%E5%88%86%E6%9E%90%E5%B7%A5%E5%85%B7--%E8%BD%AC%E5%BD%95%E5%9B%A0%E5%AD%90pyscenic/
## 数据securt多样本数据
外源刺激 -> TF(GRN) -> 转录组的变化 -> 通路/生物学过程的变化

1.pySCENIC数据准备

## 准备pyS...

Read more

单细胞多样本分析Seurat


Seurat多样本

## 背景
多样本分析流程
https://satijalab.org/seurat/archive/v3.0/immune_alignment.html
https://github.com/satijalab/seurat-wrappers

1.读取多个样本数据并合并

library(Seurat)
### 样本1
scdata1 <- data.table::fread('data/immune_control_expression_matrix.txt.gz', data.table = F)
rownames(scdata1) &l...

Read more

GSEA分析


GSEA基因集富集分析

## 背景:
基因集富集分析

1.fgsea

### https://bioconductor.org/packages/release/bioc/vignettes/fgsea/inst/doc/fgsea-tutorial.html
rm(list = ls())

library(fgsea)
library(data.table)
library(ggplot2)
data(examplePathways)
data(exampleRanks)
set.seed(42)
fgseaRes <- fgsea(pathways = examplePa...

Read more

单细胞富集分析


单细胞富集分析

接上述的 单细胞seurat中间提到的单细胞富集分析

下面的代码还未测试 ,后续测试
library(Seurat)
library(tidyverse)
## 1 常规富集分析----
# 常规富集基于 top DEG
library(clusterProfiler)
library(enrichplot)

### 1.1、获得DEG----
# 同前,只需要要把默认 idents 从 seurat_clusters 改成 cell_type
Idents(sc_pbmc_int3)
Idents(sc_pbmc_int3) = "cell_type&q...

Read more

单细胞Seurat流程


基于Seurat包单细胞流程

## 背景:
https://satijalab.org/seurat/articles/get_started_v5_new
https://github.com/gao-lab/GLUE/
https://github.com/carmonalab/ProjecTILs
https://pair-code.github.io/understanding-umap/

1.基本步骤

rm(list = ls())

options(BioC_mirror = "https://mirrors.tuna.tsinghua.edu.cn/bioco...

Read more

单细胞的初步探索


单细胞

## 背景
https://satijalab.org/seurat/articles/get_started_v5_new

基本流程

## 1. 上游分析:略
见上述的转录组的流程到 featurecounts 得到 原始的表达矩阵
## 数据直接下载
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE111229
## 2. 表达矩阵
a = read.table('./GSE111229_Mammary_Tumor_fibroblasts_768samples_rawCounts.txt.gz'...

Read more