new.trackdrawer | R Documentation |
This constructor creates a new Trackdrawer object. The object can be used to draw a plot containing amino-acid resolution structural information tracks, such as conservation, secondary structure, solvent accessibility or burial.
new.trackdrawer(l, nox = FALSE)
l |
the length of the tracks (i.e. the number of amino acids) |
nox |
no x-axis. Removes the x-axis and decreases the bottom margin to 0. This
option is for use with the |
The object has the following methods:
add.track(values,label,col,minVal=0,maxVal=max(values))
adds a new numerical
track, which will be visualized in heatmap style. values
are the numerical
values for the heatmap. label
is the label that will be shown on the y-axis
for this track. col
is the color that will be used to generate the color
ramp (from white to col
). minVal
is optional and is the minimum value that
will be mapped to the color white (default 0). maxVal
is also optional and
is the maximum value in the scale, which will be mapped to col
.
add.constrack(values)
adds a new conservation track, which will be
visualized as a barplot. values
are the conservation values to use.
add.ss.track(values)
adds a new secondary structure track, which
will be visualized using spriral and arrow symbols. values
are the
character values representing the secondary structure type for each amino acid.
Permissible values are: "AlphaHelix","H","G","I" for alpha helices, "Strand","E"
for beta strands and "Disorder" for disordered regions. Any other string is
interpreted as no specific secondary structure.
draw()
draws the plot
num.tracks()
returns the number of tracks currently added to the plot.
an object of type TrackDrawer.
## Not run:
td <- new.trackdrawer(50)
td$add.track(runif(50,0,1),"SASA","blue")
td$add.constrack(runif(50,0,11))
td$add.ss.track(sample(c("AlphaHelix","Strand",""),50,replace=TRUE))
td$draw()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.