DESeq2 模型

使用 R 與 Bioconductor 進行 RNA-Seq

Mary Piper

Bioinformatics Consultant and Trainer

DESeq2 模型

差異表現理論

使用 R 與 Bioconductor 進行 RNA-Seq

DESeq2 模型-平均與變異數關係

# Syntax for apply()
apply(data, rows/columns, function_to_apply)
# Calculating mean for each gene (each row)
mean_counts <- apply(wt_rawcounts[, 1:3], 1, mean)
# Calculating variance for each gene (each row)
variance_counts <- apply(wt_rawcounts[, 1:3], 1, var)
使用 R 與 Bioconductor 進行 RNA-Seq

DESeq2 模型-離散度

繪製平均與變異數的關係:

# Creating data frame with mean and variance for every gene
df <- data.frame(mean_counts, variance_counts)
ggplot(df) +
        geom_point(aes(x=mean_counts, y=variance_counts)) + 
        scale_y_log10() +
        scale_x_log10() +
        xlab("Mean counts per gene") +
        ylab("Variance per gene")
使用 R 與 Bioconductor 進行 RNA-Seq

DESeq2 模型-離散度

平均-變異數關係

使用 R 與 Bioconductor 進行 RNA-Seq

DESeq2 模型-離散度

$Var$:變異數

$\mu$:平均數

$\alpha$:離散度

離散度公式: $Var = \mu + \alpha * \mu^{2}$

平均、變異數與離散度的關係:

$$\uparrow variance \Rightarrow \uparrow dispersion$$

$$\uparrow mean \Rightarrow \downarrow dispersion$$

使用 R 與 Bioconductor 進行 RNA-Seq

DESeq2 模型-離散度

# Plot dispersion estimates
plotDispEsts(dds_wt)

離散度圖

使用 R 與 Bioconductor 進行 RNA-Seq

DESeq2 模型-離散度

離散度圖(不佳)

使用 R 與 Bioconductor 進行 RNA-Seq

一起來練習吧!

使用 R 與 Bioconductor 進行 RNA-Seq

Preparing Video For Download...