pcaPlot: PCA plot of ChIP and input samples

Description Usage Arguments Details Value Examples

View source: R/binned_pca.R

Description

Plot the first two components of the PCA analysis on all samples.

Usage

1
pcaPlot(normalizedCounts, condition = as.factor(colnames(counts)))

Arguments

normalizedCounts

The normalized data.frame with counts per bin as generated by normalizeTagCount.

condition

A factor containing the groups which the samples belong to. Samples are colored by condition.

Details

pcaPlot runs a PCA analysis on all samples (ChIP and input) and plots the first two components of the analysis in a scatter plot. Each dot in the plot represents a sample. Samples which the analysis deems closely related cluster together.

Value

The result of the PCA analysis.

Examples

1
2
3
4
5
6
counts <- tagCount(
    samples=c("ctl1.bam", "ctl2.bam", "chip1.bam", "chip2.bam"),
    org="Mmusculus", assembly="UCSC", version="mm9"
)
nCounts <- normalizeTagCount(counts)
pcaPlot(nCounts, as.factor(c("ctl", "ctl", "chip", "chip")))

imbforge/encodeChIPqc documentation built on May 18, 2019, 4:45 a.m.