aptPlotCT {RRNA} | R Documentation |
RNA secondary structure plotting from CT files
Description
Generates and RNA secondary structure plot from a CT file. Removes pseudoKnots automatically and allows them to be drawn back in with pseudoTF=TRUE.
Usage
aptPlotCT(file, 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 = "", pseudoTF = FALSE, pseudo_nums = NULL,
ticks = NULL, ticksTF = FALSE
)
Arguments
file |
CT file name |
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. |
pseudoTF |
Plot pseudo knot sequences |
pseudo_nums |
indices of the nucleotides included in pseudoknots |
ticksTF |
TRUE/FALSE include ticks |
ticks |
Positions where the ticks should be drawn. These are sequence positions in the RNA molecule |
Value
Returns and R plot object
Author(s)
JP Bida
See Also
Examples
### PseudoKnots ###
pk= makeCt("((((...(((((((.........)))))))...((((.........))))...))))",
"AAAAAAAACCCCCCCCAAAGGGGGGGAUUACCCCUCCUUUAAAAGGGUUUUCCCCCCC"
)
pk$bound[pk$pos==20]=42
pk$bound[pk$pos==19]=43
pk$bound[pk$pos==43]=19
pk$bound[pk$pos==42]=20
f = tempfile()
### Create a CT file for testing ###
write.table(pk[,c(1,4,2,3,6,5)],file=f,row.names=FALSE,col.names=TRUE)
aptPlotCT(f,ticksTF=TRUE,ticks=seq(1,60,by=5),pseudoTF=TRUE,pseudo_nums=c(19,20,43,42))