RNAPlot {RRNA} | R Documentation |
Generic RNA Secondary Structure Plotting Function
Description
Given fold data from loadFolds or ct2coords RNAPlot plots the secondary structure
Usage
RNAPlot(data, ranges = 0, add = FALSE, hl = NULL, seqcols = NULL,
seqTF = FALSE, labTF = FALSE, nt = FALSE, dp = 0.5,
modspec = FALSE, modp = NULL, mod = NULL, modcol = NULL,
tsize = 0.5, main = "", pointSize = 2, lineWd = 2)
Arguments
data |
R data frame containing the coordinates for plotting a given secondary structure
|
ranges |
A data frame containing the ranges of sequence positions that should be highlighted with given colors.
|
add |
Should the new plot be added to an existing plot TRUE/FALSE |
hl |
Takes an array of sequences and highlights them with seqcol
|
seqcols |
Colors that should be used to highlight the sequences given in hl |
seqTF |
If sequence is a vector set as TRUE |
labTF |
TRUE/FALSE plot the legend |
nt |
TRUE/FALSE plot the nucleotide sequence on the secondary structure |
dp |
Floating point value to determine how far from the coordinates the nucleotide sequence should be plotted. Values between 0 and 5 usually work best. |
modspec |
TRUE/FALSE modify specific positions in the secondary structure. Used in combination with modp,mod,and modcol. This allows you to change the shape and color of nucleotide in the secondary structure. |
modp |
Array defining the specific positions to be modified in the plot
|
mod |
Array defining the pch values to be plotted at the positions given by modp.
|
modcol |
Array of color values to be used for plotting at the positions defined by modp in the secondary structure.
|
tsize |
Text size used for plotting the nucleotide sequence in the secondary structure. Only applicable when nt=TRUE. Values between 0.1 and 4 work well. |
main |
Title used for the plot when labTF is set to TRUE. |
pointSize |
The size of points plotted in the secondary structure. Values betwen 0.1-5 work well. |
lineWd |
Line width for base pairings and backbone of secondary structures. |
Value
Returns a generic R plot that can be used with the jpeg, postscript, etc. functions.
Author(s)
JP Bida
See Also
Examples
## Create a CT file from bracket notation and sequence ###
ct=makeCt( "((((...(((((((....)))))))...((((...))))...))))",
"CCCCAAAGGGGGGGAUUACCCCUCCUUUAAAAGGGUUUUCCCCCCC"
)
## Create a coordinate file based on the CT file ###
dat=ct2coord(ct)
### Create a plot of the secondary structure ###
RNAPlot(dat)
### Plot positions 1:4 as green and 43:46 circles ##
### and show the legend
ranges=data.frame(min=c(1,43),max=c(4,46),col=c(2,3),
desc=c("Region 1","Region 2")
)
RNAPlot(dat,ranges,labTF=TRUE)
### Highlight the sequences CUCCU and CCCCAAA ###
RNAPlot(dat,hl=c("CUCCU","CCCCAAA"),seqcol=c(2,4),labTF=TRUE,main="RNA Molecule")
### Modify specific positions ####
RNAPlot( dat, modspec=TRUE, modp=c(1:4,43:46),mod=c(17,17,15,15,16,16,16,16),
modcol=c(rep(2,2),rep(3,2),rep(4,4))
)
### RNA Plot with nucleotides ###
RNAPlot(dat,nt=TRUE)
### RNA plot with nucleotides
RNAPlot( dat,nt=TRUE,modspec=TRUE,modp=c(1:4,43:46),
mod=c(17,17,15,15,16,16,16,16),
modcol=c(rep(2,2),rep(3,2),rep(4,4))
)
### RNA Plot wiht nucleotides and dots ###
RNAPlot(dat)
RNAPlot(dat,nt=TRUE,add=TRUE,dp=0.75)