RNA-Seq 差异表达分析总结 2

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

Mary Piper

Bioinformatics Consultant and Trainer

DESeq 工作流程 - 标准化

工作流程-标准化

dds <- estimateSizeFactors(dds)
normalized_counts <- counts(dds, normalized=TRUE)
使用 R 中的 Bioconductor 进行 RNA-Seq 分析

无监督聚类分析:对数变换

工作流程-聚类

# Log transformation of normalized counts
vsd <- vst(dds, blind=TRUE)
使用 R 中的 Bioconductor 进行 RNA-Seq 分析

无监督聚类分析

热图

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

无监督聚类分析 - 热图

vsd %>%
    assay() %>% # Extract the vst matrix from the object
    cor() %>%   # Compute pairwise correlation values
    pheatmap(annotation = metadata[ , c("column_name1", "column_name2])

热图

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

无监督聚类分析 - PCA

# PCA
plotPCA(vsd, intgroup="condition")

主成分分析

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

运行差异表达分析

DESeq2 工作流程 - 模型

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

运行差异表达分析

# Create DESeq object
dds <- DESeqDataSetFromMatrix(countData = rawcounts,
                              colData = metadata,
                              design = ~ source_of_variation + condition)
# Run analysis
dds <- DESeq(dds)
使用 R 中的 Bioconductor 进行 RNA-Seq 分析

DESeq2 工作流程 - 模型

# Plot dispersion estimates
plotDispEsts(dds)

离散度

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

DESeq2 工作流程 - 对比与 LFC 收缩

DESeq2 工作流程 - LFC 收缩

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

DESeq2 工作流程 - 对比与 LFC 收缩

# Extract results for comparison of interest
res <- results(dds, 
                contrast = c("condition_factor", "level_to_compare", 
                "base_level"), 
                alpha = 0.05)
# Shrink the log2 foldchanges
res <- lfcShrink(dds, 
                contrast = c("condition_factor", "level_to_compare", 
                "base_level"), 
                res = res)
使用 R 中的 Bioconductor 进行 RNA-Seq 分析

DESeq2 工作流程 - LFC 收缩

# Extract all results as a data frame
res_all <- data.frame(res) %>% 
        rownames_to_column(var = "ensgene") 
# Add gene annotations
res_all <- left_join(x = res_all, 
                    y = grcm38[, c("ensgene", "symbol", "description")], 
                    by = "ensgene") 
res_all <- arrange(res_all, padj)

注释

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

DESeq2 工作流程 - 结果探索

DESeq2 工作流程 - 结果探索

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

DESeq2 工作流程 - 结果探索

# Identify significant genes
res_sig <- subset(res_all, padj < 0.05)

显著结果

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

多种可视化

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

Passons à la pratique !

使用 R 中的 Bioconductor 进行 RNA-Seq 分析

Preparing Video For Download...