checkProbes {Repitools} | R Documentation

## 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

      ## S4 method for signature 'data.frame,data.frame'
    checkProbes(regs, probes, up = NULL, down = NULL, ...)
      ## S4 method for signature 'GRanges,GRanges'
    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`.

### 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.

### 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).

### Author(s)

Dario Strbenac

### Examples

    	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()

[Package Repitools version 1.36.0 Index]