Ocena wzbogacenia

ChIP-seq z Bioconductor w R

Peter Humburg

Statistician, Macquarie University

ChIP-seq z Bioconductor w R

ChIP-seq z Bioconductor w R

Rozszerzanie odczytów

Wczytaj dane:

reads <- readGAlignments(bam)
reads_gr <- granges(reads[[1]])

Oblicz średnią długość fragmentu:

frag_length <- fragmentlength(qc_report)["GSM1598218"]

Rozszerz odczyty i oblicz pokrycie:

reads_ext <- resize(reads_gr, width=frag_length)
cover_ext <- coverage(reads_ext)
ChIP-seq z Bioconductor w R

ChIP-seq z Bioconductor w R

Pokrycie szczytów

Utwórz biny 200 bp wzdłuż genomu.

bins <- tileGenome(seqinfo(reads), tilewidth=200, 
                   cut.last.tile.in.chrom=TRUE)

Znajdź wszystkie biny nakładające się ze szczytami.

peak_bins_overlap <- findOverlaps(bins, peaks)
peak_bins <- bins[from(peak_bins_overlap), ]

Policz odczyty nakładające się z każdym binem szczytowym.

peak_bins$score <- countOverlaps(peak_bins, reads)
ChIP-seq z Bioconductor w R

Funkcja pokrycia binowego

count_bins <- function(reads, target, bins){
  # Find all bins overlapping peaks
  overlap <- from(findOverlaps(bins, target))
  target_bins <- bins[overlap, ]

  # Count the number of reads overlapping each peak bin
  target_bins$score <- countOverlaps(target_bins, reads)
  target_bins
}
ChIP-seq z Bioconductor w R

Pokrycie regionów blacklist

peak_bins <- count_bins(reads_ext, peaks, bins)
bl_bins <- count_bins(reads_ext, blacklist.hg19, bins)
ChIP-seq z Bioconductor w R

Pokrycie tła

Usuń wszystkie już uwzględnione biny.

bkg_bins <- subset(bins, !bins %in% peak_bins & !bins %in% bl_bins)

Policz odczyty nakładające się z każdym pozostałym binem.

bkg_bins$score <- countOverlaps(bkg_bins, reads_ext)
ChIP-seq z Bioconductor w R

ChIP-seq z Bioconductor w R

ChIP-seq z Bioconductor w R

ChIP-seq z Bioconductor w R

Czas na ćwiczenia!

ChIP-seq z Bioconductor w R

Preparing Video For Download...