增强火山图,要不要试一下?

包作者:Kevin Blighe撰文:协和医学院 苑晓梅编辑:生信宝典时间:2019-06-03

前言

最近道听途说EnhancedVolcano绘制火山图的方便性,所以本人就根据其说明文档进行操作。但在操作过程中发现,其shape功能并没有在help文档中找到,经过搜索在github上看到了以下的答复 。。。(说明整个文档功能并没有完全开发,需进行选择)

1 Introduction

火山图是可视化差异表达分析结果的有效方法。这次更新的EnhancedVolcano目的就是两个(1)使转录本基因名称的显示更加的合理化,避免出现相互重叠的现象;(2)允许用户通过颜色,形状和阴影参数配置在同一绘图空间中识别多达3种不同类型的属性。

2 Installation

2.1 1. 下载安装包

# if (!requireNamespace('BiocManager', quietly = TRUE))
# install.packages('BiocManager')
# BiocManager::install('EnhancedVolcano')
if (!requireNamespace('devtools', quietly = TRUE))
install.packages('devtools')
devtools::install_github('kevinblighe/EnhancedVolcano')

2.2 2. 加载R包

library(EnhancedVolcano)

3 开始

作者使用该流程: RNA-seq workflow: gene-level exploratory analysis and differential expression。具体来说,我们将加载airway数据,其中不同的气道平滑肌细胞用地塞米松治疗。

library(airway)
library(magrittr)

data('airway')
# %<>%复合赋值操作符, 功能与 %>% 基本是一样的,但多了一项额外的操作,就是把结果写到左侧对象。
# 对dex列进行relevel,再把revel后的结果赋值到airway$dex。
airway$dex %<>% relevel('untrt')

使用DESeq2进行差异表达,以创建两组结果(DESeq2差异基因分析和批次效应移除):

  library('DESeq2')

  dds <- DESeqDataSet(airway, design = ~ cell + dex)  dds <- DESeq(dds, betaPrior=FALSE)  # compare trt & untrt  res1 <- results(dds,    contrast = c('dex','trt','untrt'))  # shrink log2 fold change  res1 <- lfcShrink(dds,    contrast = c('dex','trt','untrt'), res=res1)  # compare different cells  res2 <- results(dds,    contrast = c('cell', 'N061011', 'N61311'))  res2 <- lfcShrink(dds,    contrast = c('cell', 'N061011', 'N61311'), res=res2)

查看下数据结构

head res1
log2 fold change (MAP): dex trt vs untrt Wald test p-value: dex trt vs untrt DataFrame with 6 rows and 6 columns                         baseMean      log2FoldChange              lfcSE                        <numeric>           <numeric>          <numeric>ENSG00000000003  708.602169691234  -0.374152710396614 0.0988428916720785ENSG00000000005                 0                  NA                 NAENSG00000000419  520.297900552084   0.202062036081026  0.109739490807055ENSG00000000457  237.163036796015  0.0361672062398394  0.138337785736641ENSG00000000460  57.9326331250967 -0.0844566831590659  0.249890471495246ENSG00000000938 0.318098378392895 -0.0841390331826692  0.151334283397515                              stat               pvalue                padj                         <numeric>            <numeric>           <numeric>ENSG00000000003   -3.7877506903658 0.000152017272634539 0.00128363812227422ENSG00000000005                 NA                   NA                  NAENSG00000000419   1.84294384315416   0.0653372100766985    0.19654584069126ENSG00000000457  0.264356843264039    0.791504963002101   0.911458000845921ENSG00000000460 -0.307052600205469    0.758803335537917   0.895034449952733ENSG00000000938  -0.39379516719652    0.693732272741941                  NA

3.1 绘制最基本的火山图

对于最基本的火山图,只需要一个数据框或测试结果矩阵,包含转录本名称,log2FC以及adjusted或unajusted的P值。 log2FC的默认cut-off值是 > | 2 |; P值的默认cut-off值为10e-6。

EnhancedVolcano(res1,
# 基因名字
lab = rownames(res1),
x = 'log2FoldChange',
y = 'pvalue',
xlim = c(-5, 8))

图例:NS-非显著基因;Log2 FC倍数大于阈值的基因;P 统计显著的基因;P & Log2 FC 差异基因

4 高级功能

默认情况下,EnhancedVolcano将仅尝试标记设置的阈值筛选出的差异基因,即p CutoffFC cutoff。 此外,它只会标记可以合理地适合绘图空间的基因。 用户可以选择性地提供他/她希望在图中标记的转录本名称的矢量(as selectLab)。

在这个例子中,还修改了点和标签大小,帮助改善清晰度,保障更多的转录本进入差异分析中。

  EnhancedVolcano(res2,    lab = rownames(res2),    x = 'log2FoldChange',    y = 'pvalue',    xlim = c(-8, 8),    title = 'N061011 versus N61311',    pCutoff = 10e-16,    FCcutoff = 1.5,    transcriptPointSize = 1.5,    transcriptLabSize = 3.0)

4.2 调整点的颜色和透明度

默认配色方案可能不是每个人都喜欢。 在这里,只有通过log2FC和P值筛选的差异转录本都是红色的,其他一切都是黑色的。 还调整’alpha’的值,它控制绘制点的透明度:1 = 100%不透明; 0 = 100%透明

EnhancedVolcano(res2,
lab = rownames(res2),
x = 'log2FoldChange',
y = 'pvalue',
xlim = c(-8, 8),
title = 'N061011 versus N61311',
pCutoff = 10e-16,
FCcutoff = 1.5,
transcriptPointSize = 1.5,
transcriptLabSize = 3.0,
# Colour shading for plotted points, corresponding to < abs(FCcutoff) && > pCutoff,
# > abs(FCcutoff), < pCutoff, > abs(FCcutoff) && < pCutoff.
# 无显著,倍数大(左下、右下),P小 (中上), 显著差异
# > DEFAULT = c('grey30', 'forestgreen', 'royalblue', 'red2').
col=c('black', 'black', 'black', 'red3'),
colAlpha = 1)

4.3 调整绘制点的形状

它可以帮助将不同的点绘制成不同的形状。 默认形状是圆形。 用户可以通过shape参数指定形状,该参数接受单个或四个可能的值:如果有四个值,则这些值将映射到也由颜色指定的标准名称; 如果是单个值,则所有点都用此值绘制。

For more information on shape encoding search online at ggplot2 Quick Reference: shape

 EnhancedVolcano(res2,    lab = rownames(res2),    x = 'log2FoldChange',    y = 'pvalue',    xlim = c(-8, 8),    title = 'N061011 versus N61311',    pCutoff = 10e-16,    FCcutoff = 1.5,    transcriptPointSize = 3.0,    transcriptLabSize = 3.0,    shape = 8,    colAlpha = 1)

    # 注意Bioconductor版本该处shape功能并不能用,需要安装github的开发版

调整画图点的形状

EnhancedVolcano(res2,
lab = rownames(res2),
x = 'log2FoldChange',
y = 'pvalue',
xlim = c(-8, 8),
title = 'N061011 versus N61311',
pCutoff = 10e-16,
FCcutoff = 1.5,
transcriptPointSize = 2.0,
transcriptLabSize = 3.0,
# 同上面col
# 无显著,倍数大(左下、右下),P小 (中上), 显著差异
shape = c(1, 4, 23, 25),
colAlpha = 1)

4.4 调整cut-off线并添加额外的阈值线

cut-off线可以通过以下参数进行调整。 “cutoffLineType”以下参数进行修改:“blank”, “solid”, “dashed”, “dotted”, “dotdash”, “longdash”,  “twodash”;cutoff线的颜色和粗细可以通过 ‘cutoffLineCol’ 和 ‘cutoffLineWidth’进行修改,如果不需要该cut-off线,可以设置“cutoffLineType=“blank” or cutoffLineWidth=0.”

也可以通过参数‘hline’ and ‘vline’  显示其他的cut-off线;

  EnhancedVolcano(res2,    lab = rownames(res2),    x = 'log2FoldChange',    y = 'pvalue',    xlim = c(-6, 6),    title = 'N061011 versus N61311',    pCutoff = 10e-12,    FCcutoff = 1.5,    transcriptPointSize = 1.5,    transcriptLabSize = 3.0,    colAlpha = 1,    # 取消cutoff线    cutoffLineType = 'blank',    cutoffLineCol = 'black',    cutoffLineWidth = 0.8,    hline = c(10e-12, 10e-36, 10e-60, 10e-84),    hlineCol = c('grey0', 'grey25','grey50','grey75'),    hlineType = 'longdash',    hlineWidth = 0.8,    gridlines.major = FALSE,    gridlines.minor = FALSE)

4.5 调整图例位置,大小和文本

EnhancedVolcano(res2,
lab = rownames(res2),
x = 'log2FoldChange',
y = 'pvalue',
xlim = c(-6, 6),
pCutoff = 10e-12,
FCcutoff = 1.5,
cutoffLineType = 'twodash',
cutoffLineWidth = 0.8,
transcriptPointSize = 3.0,
transcriptLabSize = 4.0,
colAlpha = 1,
legend=c('NS','Log (base 2) fold-change','P value', 'P value & Log (base 2) fold-change'),
legendPosition = 'right',
legendLabSize = 16,
legendIconSize = 5.0)

4.6 绘制调整后的p值

作者通过 bquote 函数修改轴标题

[object Object]

4.7 通过添加连接线来添加更多标签

为了标记更多点,可以通过短线连接标签, 这些连接线的宽度和颜色也可以分别用widthConnectorscolConnectors进行修改;

EnhancedVolcano(res2,
lab = rownames(res2),
x = 'log2FoldChange',
y = 'pvalue',
xlim = c(-6,6),
xlab = bquote(~Log[2]~ 'fold change'),
pCutoff = 10e-14,
FCcutoff = 2.0,
transcriptPointSize = 3.0,
transcriptLabSize = 4.0,
colAlpha = 1,
legend=c('NS','Log (base 2) fold-change','P value', 'P value & Log (base 2) fold-change'),
legendPosition = 'right',
legendLabSize = 12,
legendIconSize = 4.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = 'grey30')

4.8 仅标记关键转录本

在许多情况下,人们可能只希望标记他们感兴趣的关键转录本。 因此,可以通过selectLab参数提要标记的转录本的名字。当然,只有通过差异基因阈值筛选的名字才会被标记。

 EnhancedVolcano(res2,    lab = rownames(res2),    x = 'log2FoldChange',    y = 'pvalue',    ## 标记目标基因    selectLab = c('ENSG00000106565','ENSG00000187758'),    xlim = c(-6,7),    xlab = bquote(~Log[2]~ 'fold change'),    pCutoff = 10e-14,    FCcutoff = 2.0,    transcriptPointSize = 3.0,    transcriptLabSize = 5.0,    shape = c(4, 35, 17, 18),    colAlpha = 1,    legend=c('NS','Log (base 2) fold-change','P value','P value & Log (base 2) fold-change'),    legendPosition = 'right',    legendLabSize = 14,    legendIconSize = 5.0)

4.9 给标签加框

EnhancedVolcano(res2,
lab = rownames(res2),
x = 'log2FoldChange',
y = 'pvalue',
selectLab = c('ENSG00000106565','ENSG00000187758',
'ENSG00000230795', 'ENSG00000164530',
'ENSG00000143153'),
xlim = c(-5.5,8),
xlab = bquote(~Log[2]~ 'fold change'),
pCutoff = 10e-14,
FCcutoff = 2.0,
transcriptPointSize = 3.0,
transcriptLabSize = 5.0,
transcriptLabCol = 'black',
transcriptLabFace = 'bold',
# 加框
boxedlabels = TRUE,
colAlpha = 4/5,
legend=c('NS','Log (base 2) fold-change','P value','P value & Log (base 2) fold-change'),
legendPosition = 'right',
legendLabSize = 14,
legendIconSize = 4.0,
drawConnectors = TRUE,
widthConnectors = 1.0,
colConnectors = 'black')

4.10 使用自定义值着色方案

在这个例子,作者希望将log2FC> 2.5的所有转录本标记为“high”,将log2FC <-2.5的转录本标记为“low”。

# create custom key-value pairs for 'high', 'low', 'mid' expression by fold-change# 通过named vector生成自定义颜色    # set the base colour as 'black'    keyvals <- rep('black', nrow(res2))

    # set the base name/label as 'Mid'    names(keyvals) <- rep('Mid', nrow(res2))

    # modify keyvals for transcripts with fold change > 2.5    keyvals[which(res2$log2FoldChange > 2.5)] <- 'gold'    names(keyvals)[which(res2$log2FoldChange > 2.5)] <- 'high'

    # modify keyvals for transcripts with fold change < -2.5    keyvals[which(res2$log2FoldChange < -2.5)] <- 'royalblue'    names(keyvals)[which(res2$log2FoldChange < -2.5)] <- 'low'

    unique(names(keyvals))
## [1] 'Mid' 'low' 'high'
unique(keyvals)
## [1] 'black' 'royalblue' 'gold'
keyvals[1:20]
## Mid Mid Mid Mid Mid Mid Mid Mid Mid
## 'black' 'black' 'black' 'black' 'black' 'black' 'black' 'black' 'black'
## Mid Mid Mid Mid Mid Mid Mid Mid Mid
## 'black' 'black' 'black' 'black' 'black' 'black' 'black' 'black' 'black'
## Mid Mid
## 'black' 'black'
  p1 <- EnhancedVolcano(res2,    lab = rownames(res2),    x = 'log2FoldChange',    y = 'pvalue',    selectLab = rownames(res2)[which(names(keyvals) %in% c('high', 'low'))],    xlim = c(-6.5,6.5),    xlab = bquote(~Log[2]~ 'fold change'),    title = 'Custom colour over-ride',    pCutoff = 10e-14,    FCcutoff = 1.0,    transcriptPointSize = 3.5,    transcriptLabSize = 4.5,    shape = c(6, 4, 2, 11),    # 自定义颜色    colCustom = keyvals,    colAlpha = 1,    legendPosition = 'top',    legendLabSize = 15,    legendIconSize = 5.0,    drawConnectors = TRUE,    widthConnectors = 0.5,    colConnectors = 'grey50',    gridlines.major = TRUE,    gridlines.minor = FALSE,    border = 'partial',    borderWidth = 1.5,    borderColour = 'black')

  p2 <- EnhancedVolcano(res2,    lab = rownames(res2),    x = 'log2FoldChange',    y = 'pvalue',    selectLab = rownames(res2)[which(names(keyvals) %in% c('high', 'low'))],    xlim = c(-6.5,6.5),    xlab = bquote(~Log[2]~ 'fold change'),    title = 'No custom colour over-ride',    pCutoff = 10e-14,    FCcutoff = 1.0,    transcriptPointSize = 3.5,    transcriptLabSize = 4.5,    colCustom = NULL,    colAlpha = 1,    legendPosition = 'top',    legendLabSize = 15,    legendIconSize = 5.0,    drawConnectors = FALSE,    widthConnectors = 0.5,    colConnectors = 'grey50',    gridlines.major = TRUE,    gridlines.minor = FALSE,    border = 'full',    borderWidth = 1.0,    borderColour = 'black')

  library(gridExtra)  library(grid)  grid.arrange(p1, p2,    ncol=2,    top = textGrob('EnhancedVolcano',      just = c('center'),      gp = gpar(fontsize = 32)))  grid.rect(gp=gpar(fill=NA))

4.11 使用自定义value对覆盖颜色和/或形状进行修改

# define different cell-types that will be shaded
celltype1 <- c('ENSG00000106565', 'ENSG00000002933',
'ENSG00000165246', 'ENSG00000224114')
celltype2 <- c('ENSG00000230795', 'ENSG00000164530',
'ENSG00000143153', 'ENSG00000169851',
'ENSG00000231924', 'ENSG00000145681')

# create custom key-value pairs for different cell-types
# set the base shape as '3'
keyvals.shape <- rep(3, nrow(res2))

# set the base name/label as 'PBC'
names(keyvals.shape) <- rep('PBC', nrow(res2))

# modify the keyvals for cell-type 1
keyvals.shape[which(rownames(res2) %in% celltype1)] <- 17
names(keyvals.shape)[which(rownames(res2) %in% celltype1)] <- 'Cell-type 1'

# modify the keyvals for cell-type 2
keyvals.shape[which(rownames(res2) %in% celltype2)] <- 64
names(keyvals.shape)[which(rownames(res2) %in% celltype2)] <- 'Cell-type 2'

unique(names(keyvals.shape))

## [1] 'PBC'         'Cell-type 1' 'Cell-type 2'
unique(keyvals.shape)
## [1]  3 17 64
keyvals.shape[1:20]
## PBC PBC PBC PBC PBC PBC PBC PBC PBC PBC PBC PBC PBC PBC PBC PBC PBC PBC ##   3   3   3   3   3   3   3   3   3   3   3   3   3   3   3   3   3   3 ## PBC PBC ##   3   3
p1 <- EnhancedVolcano(res2,
lab = rownames(res2),
x = 'log2FoldChange',
y = 'pvalue',
selectLab = rownames(res2)[which(names(keyvals) %in% c('high', 'low'))],
xlim = c(-6.5,6.5),
xlab = bquote(~Log[2]~ 'fold change'),
title = 'Custom shape over-ride',
pCutoff = 10e-14,
FCcutoff = 1.0,
transcriptPointSize = 3.5,
transcriptLabSize = 4.5,
shapeCustom = keyvals.shape,
colCustom = NULL,
colAlpha = 1,
legendLabSize = 15,
legendPosition = 'left',
legendIconSize = 5.0,
drawConnectors = TRUE,
widthConnectors = 0.5,
colConnectors = 'grey50',
gridlines.major = TRUE,
gridlines.minor = FALSE,
border = 'partial',
borderWidth = 1.5,
borderColour = 'black')

# create custom key-value pairs for 'high', 'low', 'mid' expression by fold-change
# set the base colour as 'black'
keyvals.colour <- rep('black', nrow(res2))

# set the base name/label as 'Mid'
names(keyvals.colour) <- rep('Mid', nrow(res2))

# modify keyvals for transcripts with fold change > 2.5
keyvals.colour[which(res2$log2FoldChange > 2.5)] <- 'gold'
names(keyvals.colour)[which(res2$log2FoldChange > 2.5)] <- 'high'

# modify keyvals for transcripts with fold change < -2.5
keyvals.colour[which(res2$log2FoldChange < -2.5)] <- 'royalblue'
names(keyvals.colour)[which(res2$log2FoldChange < -2.5)] <- 'low'

unique(names(keyvals.colour))

## [1] 'Mid'  'low'  'high'
unique(keyvals.colour)
## [1] 'black'     'royalblue' 'gold'
p2 <- EnhancedVolcano(res2,
lab = rownames(res2),
x = 'log2FoldChange',
y = 'pvalue',
selectLab = rownames(res2)[which(names(keyvals) %in% c('High', 'Low'))],
xlim = c(-6.5,6.5),
xlab = bquote(~Log[2]~ 'fold change'),
title = 'Custom shape & colour over-ride',
pCutoff = 10e-14,
FCcutoff = 1.0,
transcriptPointSize = 5.5,
transcriptLabSize = 0.0,
shapeCustom = keyvals.shape,
colCustom = keyvals.colour,
colAlpha = 1,
legendPosition = 'top',
legendLabSize = 15,
legendIconSize = 5.0,
drawConnectors = TRUE,
widthConnectors = 0.5,
colConnectors = 'grey50',
gridlines.major = TRUE,
gridlines.minor = FALSE,
border = 'full',
borderWidth = 1.0,
borderColour = 'black')

library(gridExtra)
library(grid)
grid.arrange(p1, p2,
ncol=2,
top = textGrob('EnhancedVolcano',
just = c('center'),
gp = gpar(fontsize = 32)))
grid.rect(gp=gpar(fill=NA))

4.12 Shade 指定的转录本

此功能最适用于仅显示1或2个关键转录本。用户可以使用’shapeCustom’参数来更识别不同类型的转录本。

  # define different cell-types that will be shaded  celltype1 <- c('ENSG00000106565', 'ENSG00000002933')  celltype2 <- c('ENSG00000230795', 'ENSG00000164530')
p1 <- EnhancedVolcano(res2,
lab = rownames(res2),
x = 'log2FoldChange',
y = 'pvalue',
selectLab = celltype1,
xlim = c(-6.5,6.5),
xlab = bquote(~Log[2]~ 'fold change'),
title = 'Shading cell-type 1',
pCutoff = 10e-14,
FCcutoff = 1.0,
transcriptPointSize = 8.0,
transcriptLabSize = 5.0,
transcriptLabCol = 'purple',
transcriptLabFace = 'bold',
boxedlabels = TRUE,
shape = 42,
# 自定义颜色
colCustom = keyvals,
colAlpha = 1,
legendPosition = 'top',
legendLabSize = 15,
legendIconSize = 5.0,
# 自定义标签的背景
shade = celltype1,
shadeLabel = 'Cell-type I',
shadeAlpha = 1/2,
shadeFill = 'purple',
shadeSize = 1,
shadeBins = 5,
drawConnectors = TRUE,
widthConnectors = 1.0,
colConnectors = 'grey30',
gridlines.major = TRUE,
gridlines.minor = FALSE,
border = 'partial',
borderWidth = 1.5,
borderColour = 'black')

p2 <- EnhancedVolcano(res2,
lab = rownames(res2),
x = 'log2FoldChange',
y = 'pvalue',
selectLab = celltype2,
xlim = c(-6.5,6.5),
xlab = bquote(~Log[2]~ 'fold change'),
title = 'Shading cell-type 2',
pCutoff = 10e-14,
FCcutoff = 1.0,
transcriptLabSize = 5.0,
transcriptLabCol = 'forestgreen',
transcriptLabFace = 'bold',
# 自定义形状
shapeCustom = keyvals.shape,
colCustom = keyvals.colour,
colAlpha = 1,
legendPosition = 'top',
transcriptPointSize = 4.0,
legendLabSize = 15,
legendIconSize = 5.0,
shade = celltype2,
shadeLabel = 'Cell-type II',
shadeAlpha = 1/2,
shadeFill = 'forestgreen',
shadeSize = 1,
shadeBins = 5,
drawConnectors = TRUE,
widthConnectors = 1.0,
colConnectors = 'grey30',
gridlines.major = TRUE,
gridlines.minor = FALSE,
border = 'full',
borderWidth = 1.0,
borderColour = 'black')

library(gridExtra)
library(grid)
grid.arrange(p1, p2,
ncol=2,
top = textGrob('EnhancedVolcano',
just = c('center'),
gp = gpar(fontsize = 32)))
grid.rect(gp=gpar(fill=NA))

5 Session info

sessionInfo()
## R version 3.6.0 (2019-04-26)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.2 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.10-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.10-bioc/R/lib/libRlapack.so
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] grid parallel stats4 stats graphics grDevices utils
## [8] datasets methods base
##
## other attached packages:
## [1] gridExtra_2.3 DESeq2_1.25.0
## [3] magrittr_1.5 airway_1.5.0
## [5] SummarizedExperiment_1.15.1 DelayedArray_0.11.0
## [7] BiocParallel_1.19.0 matrixStats_0.54.0
## [9] Biobase_2.45.0 GenomicRanges_1.37.8
## [11] GenomeInfoDb_1.21.1 IRanges_2.19.6
## [13] S4Vectors_0.23.6 BiocGenerics_0.31.2
## [15] EnhancedVolcano_1.3.1 ggrepel_0.8.1
## [17] ggplot2_3.1.1 knitr_1.23
##
## loaded via a namespace (and not attached):
## [1] bit64_0.9-7 splines_3.6.0 Formula_1.2-3
## [4] assertthat_0.2.1 highr_0.8 latticeExtra_0.6-28
## [7] blob_1.1.1 GenomeInfoDbData_1.2.1 yaml_2.2.0
## [10] RSQLite_2.1.1 pillar_1.4.1 backports_1.1.4
## [13] lattice_0.20-38 glue_1.3.1 digest_0.6.19
## [16] RColorBrewer_1.1-2 XVector_0.25.0 checkmate_1.9.3
## [19] colorspace_1.4-1 htmltools_0.3.6 Matrix_1.2-17
## [22] plyr_1.8.4 XML_3.98-1.19 pkgconfig_2.0.2
## [25] genefilter_1.67.1 zlibbioc_1.31.0 purrr_0.3.2
## [28] xtable_1.8-4 scales_1.0.0 tibble_2.1.2
## [31] htmlTable_1.13.1 annotate_1.63.0 withr_2.1.2
## [34] nnet_7.3-12 lazyeval_0.2.2 survival_2.44-1.1
## [37] crayon_1.3.4 memoise_1.1.0 evaluate_0.14
## [40] MASS_7.3-51.4 foreign_0.8-71 tools_3.6.0
## [43] data.table_1.12.2 stringr_1.4.0 locfit_1.5-9.1
## [46] munsell_0.5.0 cluster_2.0.9 AnnotationDbi_1.47.0
## [49] compiler_3.6.0 rlang_0.3.4 RCurl_1.95-4.12
## [52] rstudioapi_0.10 htmlwidgets_1.3 labeling_0.3
## [55] bitops_1.0-6 base64enc_0.1-3 rmarkdown_1.13
## [58] gtable_0.3.0 DBI_1.0.0 R6_2.4.0
## [61] dplyr_0.8.1 bit_1.1-14 Hmisc_4.2-0
## [64] stringi_1.4.3 Rcpp_1.0.1 geneplotter_1.63.0
## [67] rpart_4.1-15 acepack_1.4.1 tidyselect_0.2.5
## [70] xfun_0.7
(0)

相关推荐

  • 转录组数据的基因表达变化情况探索

    一般来说可以用CV或者MAD来衡量某基因在某些样本的表达变化情况. 标准差与平均数的比值称为变异系数,记为C.V(Coefficient of Variance). 变异系数又称"标准差率& ...

  • 聚类分析和主成分分析

    聚类分析和主成分分析 来自黄思思(浙江大学八年制医学生,生信技能树全国巡讲杭州站优秀学员)投稿 聚类分析 01 系统聚类 示例数据一:现有16种饮料的热量.咖啡因含量.钠含量和价格的数据,根据这4个变 ...

  • 多个探针对应同一个基因到底该如何取舍

    前些天我发现了乳腺癌领域的PAM50算法原理探索,在:PAM50的概念及分子分型算法原理 ,其实并不难,然后我注意到他们在 挑选50个基因的时候,提到了多个探针对应同一个基因到底该如何取舍 原文是:F ...

  • 转录组学习七(差异基因分析)

    任务 载入表达矩阵,然后设置好分组信息 用DEseq2进行差异分析,也可以走走edgeR或者limma的voom流程 基本任务是得到差异分析结果,进阶任务是比较多个差异分析结果的异同点. 了解差异基因 ...

  • 凡是Excel能实现的数据操作,理论上R语言也可以

    两个月前的一个学徒作业:绘图本身很简单但是获取数据很难,完成率超级低,仅仅接到了不到十个邮件,而且有3个人做的是错的!!超级尴尬,其中有一个错误很明显,就是自以为是的排序,然后比对肿瘤组织和配对的正常 ...

  • What if starts with DESeq2 normlized matrix?

    因为没拿到raw counts,拿到的是DESeq2 normlized matrix,为了有谱,拿airway数据用DESeq2处理两次,看下结果,比较一下是不是可行! 可行性以及解释,各位看官,往 ...

  • R EnhancedVolcano 绘制火山图

    火山图是用于差异表达分析结果可视化的一种有效方法.今天,我们来介绍一个用于增强火山图绘制的强大 R 包:EnhancedVolcano ,该包拥有强大的绘图功能,用户可以简单的通过设置颜色.形状.大小 ...

  • 过滤线粒体核糖体基因

    前面我们一起学习了单细胞转录组数据的上游分析,而且了解了自己的项目的样本数量和测序量,还过滤了不合格的细胞和基因, 教程目录如下: 上游分析流程 课题多少个样品,测序数据量如何 过滤不合格细胞和基因( ...

  • 想让你的火山图更漂亮?

    最近有粉丝在我b站的数据挖掘视频课程发弹幕吐槽我授课时候作为例子的火山图不怎么好看,希望我提高一下自己的审美. 课程是:三年前的数据挖掘课程(TNBC表达矩阵探索) https://m.bilibil ...

  • 构建seurat对象之初就应该是把基因名字转换好

    看到单细胞转录组测序数据的文献:<Single-cell sequencing links multiregional immune landscapes and tissue-resident ...

  • DESeq2差异表达分析(二)

    接上文DESeq2差异表达分析 质量控制--样品水平 DESeq2工作流程的下一步是QC,它包括样本级和基因级的步骤,对计数数据执行QC检查,以帮助我们确保样本/重复 看起来很好. RNA-SEQ分析 ...

  • 使用不匹配的gtf版本信息会导致近一半ID无法转化

    太多人有这样的疑问,为什么自己进行ID转换的时候,成功率很低,今天就为你解惑. 当我们遇到了这样一个表达矩阵(其实就是从tcga数据库下载,通过ucsc的xena浏览器啦): dim(exprSet) ...

  • 利用单细胞集合做免疫浸润分析

    以前一直用经典的MCP法分免疫浸润 总感觉不好 上篇文章上也写过 这次用肠癌单细胞6万多的细胞的特异性基因,特异性基因我是一个一个看的,我选的标准是logfc大于1,而且如果是肿瘤细胞的特异性基因,那 ...