Genes {DECIPHER}R Documentation

Genes objects and accessors

Description

Gene prediction consist of delimiting the boundaries of regions that function as genes within a genome. Class Genes provides objects and functions for storing the boundaries of genes and associated information resulting from gene prediction.

Usage

## S3 method for class 'Genes'
plot(x,
    xlim = c(1, 1e4),
    ylim = c(-100, 500),
    interact = FALSE,
    colorBy="Strand",
    colorRamp=colorRampPalette(c("darkblue", "darkred")),
    colorGenes="green4",
    ...)

## S3 method for class 'Genes'
print(x, ...)

## S3 method for class 'Genes'
x[i, j, ...]

Arguments

x

An object of class Genes.

xlim

Numeric vector of length 2 specifying the x-axis limits for plotting.

ylim

Numeric vector of length 2 specifying the y-axis limits for plotting.

interact

Logical determining whether the plot is interactive. If TRUE, clicking the plot on the right or left side will scroll one frame in that direction. To end interaction, either right-click, press the escape key, or press the stop button depending on the graphics device in use.

colorBy

Character string indicating the name of the column in x that should be used for coloring. Unambiguous abbreviations are also permitted.

colorRamp

A function that will return n colors when given a number n. Examples are rainbow, heat.colors, terrain.colors, cm.colors, or (the default) colorRampPalette.

colorGenes

Character string specifying the color of genes, or NA to color genes according to colorBy.

i

Numeric or character vector of row indices to extract from x.

j

Numeric or character vector of column indices to extract from x. If j is missing, all columns are included and the returned object will also belong to class Genes.

...

Other optional parameters.

Details

Objects of class Genes are stored as numeric matrices containing information pertaining to gene predictions. The matrix columns include the index ("Index") of the corresponding sequence in the original genome, the strand ("Strand") where the gene is located (either "+" (0) or "-" (1), the beginning ("Begin") and ending ("End") positions of the gene, scores acquired during prediction, and whether (!= 0) or not (0) the region was predicted to be a gene. Note that the start of the gene is at the beginning position when the strand is "+" and end when the strand is "-". By convention, rows with negative values in the "Gene" column represent non-coding RNAs and rows with positive values represent protein coding genes.

The plot method will show the total score of each prediction along the genome. This is most useful when displaying the result of setting allScores to TRUE in FindGenes. Here, possible genes on either strand will be shown (by default), with the predicted genes highlighted. The beginning (solid) and ending (dashed) positions are denoted by vertical lines. Note that the x-axis is cumulative genome position, and changes between genome sequences indices are demarcated by dashed vertical lines.

Author(s)

Erik Wright eswright@pitt.edu

See Also

ExtractGenes, FindGenes, WriteGenes

Examples

# import a test genome
fas <- system.file("extdata",
	"Chlamydia_trachomatis_NC_000117.fas.gz",
	package="DECIPHER")
genome <- readDNAStringSet(fas)

x <- FindGenes(genome, allScores=TRUE)
x
head(unclass(x)) # the underlying structure

plot(x) # default coloring by "Strand"
# color by RBS score (blue is weak/low, red is strong/high)
plot(x, colorBy="RibosomeBindingSiteScore", colorGenes=NA)
# color by fraction of times a gene was chosen
plot(x, colorBy="FractionReps", colorGenes=NA)
# color by which codon model was selected for each ORF
plot(x, colorBy="CodonModel", xlim=c(1, 3e4))

[Package DECIPHER version 2.22.0 Index]