Learn R Programming

Repitools (version 1.18.0)

checkProbes: Check Probe Specificity for Some Regions

Description

Given a set of gene coordinates, and probe mappings to the genome, a plot is created across every gene region of how many probes mapped to each position.

Usage

"checkProbes"(regs, probes, up = NULL, down = NULL, ...) "checkProbes"(regs, probes, up = NULL, down = NULL, ...)

Arguments

regs
A data.frame with (at least) columns chr, start, end, strand, and name, or a GRanges object with an elementMetadata column name. The starts and ends of regions describe are the windows plotted in.
probes
A data.frame describing where the probes mapped to, with (at least) columns name (identifier of a probe), chr, start, and end, or a GRanges object with an elementMetadata column name.
up
How many bases upstream to plot.
down
How many bases downstream to plot.
...
Line parameters passed onto matplot.

Value

A set of plots is created, one for each of the genes. The lines in the plot show where a probe hits (the x - axis) and how many places in total the probe hits in the genome (y - axis).

Details

If up and down are NULL, then the gene is plotted as it is described by its start and end coordinates.

This function produces a number of plots. Sending output to a PDF device is recommended.

Examples

Run this code
	p.table <- data.frame(name = c("probeA", "probeB", "probeC", "probeC", "probeC"),
			    strand = c('+', '-', '+', '-', '-'),
                               chr = c("chr1", "chr2", "chr1", "chr2", "chr2"),
                             start = c(20, 276, 101, 101, 151),
                               end = c(44, 300, 125, 125, 175))
	r.table <- data.frame(name = c("gene1", "gene2", "gene3"),
                               chr = c("chr1", "chr2", "chr2"),
                            strand = c('+', '-', '+'),
                             start = c(20, 500, 75),
                               end = c(200, 800, 400))
	pdf("tmp.pdf", height = 6, width = 14)
	checkProbes(r.table, p.table, lwd = 4, col = "blue")
	dev.off()

Run the code above in your browser using DataLab