单细胞-第五节 多样本数据分析,打分R包AUCell

文件在单细胞\5_GC_py\1_single_cell\3.AUCell.Rmd
单细胞-第五节 多样本数据分析,打分R包AUCell_第1张图片

1.基因

rm(list = ls())
load("g.Rdata")

2.AUCell

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9897923

    IF: NA NA NA

用这个文章里的方法,将单细胞亚群的marker基因与ros相关基因取交集,用作AUCell的基因集

The intersection of marker genes was selected based on strong population specificity (adj_p < 0.05 & |avg_log2FoldChange| > 1.5 & pct.1 > 0.5 & pct.2 < 0.5) from each cell subgroup and factors related to OS responses.

seu.obj是seurat+singleR得出的对象,allmarkers是findallmarkers得到的数据框。

library(Seurat)
library(tidyverse)
load("seu.obj.Rdata")
DotPlot(seu.obj,features = g,cols = "RdYlBu")+RotatedAxis()

AUCell用于计算每个细胞中特定基因集的活性程度。用上面的gi作为基因集来计算。

AUCell的三个步骤:

Build the rankings:矩阵中的每个细胞里,给基因进行排序。
Calculate the Area Under the Curve (AUC):计算每个细胞的AUC值
Set the assignment thresholds:计算活性区分的阈值

library(GSEABase)
geneSets <- GeneSet(g, setName="pyroptosis")
geneSets
#

你可能感兴趣的:(单细胞分析,数据分析,r语言,windows)