导入数据

在 R 中使用 Bioconductor 进行 ChIP-seq 分析

Peter Humburg

Statistician, Macquarie University

在 R 中使用 Bioconductor 进行 ChIP-seq 分析

处理序列读取

  • 通常存为Binary Sequence Alignment/Map(BAM)格式文件。
  • BAM 记录字段:
    • 读取名称:SRR1782620.7265769
    • 二进制标志:0
    • 参考序列名与比对位置:chr20 29803915
    • 比对质量:0
    • CIGAR 字符串(比对摘要):51M
    • 成对读的参考序列与位置(此处未用):0 0
    • 读取序列:AATGAAATGGAA ...
    • 读取质量(ASCII 编码):CCCFFFFFHHHH ...
在 R 中使用 Bioconductor 进行 ChIP-seq 分析

将已比对的读取导入 R

  • 使用 Rsamtools 与 BAM 文件交互。
  • Rsamtools 提供 BAM 的索引、读取、过滤与写入函数。

使用 readGAlignments 导入已比对的读取。

library(GenomicAlignments)
reads <- readGAlignments(bam_file)

返回 GAlignments 对象。

在 R 中使用 Bioconductor 进行 ChIP-seq 分析

导入选定区域

  • 使用 BamViews 定义关注区域。
library(GenomicRanges)
library(Rsamtools)
ranges <- GRanges(...)
views <- BamViews(bam_file, bamRanges=ranges)
  • 然后按前述方式导入读取。
reads <- readGAlignments(views)

BamViews 支持多个 BAM 文件。

在 R 中使用 Bioconductor 进行 ChIP-seq 分析

导入峰位调用

使用 import.bed 从 BED 文件加载峰位调用。

library(rtracklayer)
peaks <- import.bed(peak_bed, genome="hg19")

使用 peaks 定义 BAM 文件的视图。

bams <- BamViews(bam_file, bamRanges=peaks)
reads <- readGAlignments(bams)
在 R 中使用 Bioconductor 进行 ChIP-seq 分析

Passons à la pratique !

在 R 中使用 Bioconductor 进行 ChIP-seq 分析

Preparing Video For Download...