colourByCount(helix, cols, counts, get = FALSE) colourByValue(helix, cols, breaks, get = FALSE, log = FALSE, include.lowest = TRUE, ...) colourByBasepairFrequency(helix, cols, get = TRUE) colourByUnknottedGroups(helix, cols, get = TRUE) colourByCovariation(helix, msa, cols, get = FALSE) colourByConservation(helix, msa, cols, get = FALSE) colourByCanonical(helix, msa, cols, get = FALSE) defaultPalette()
helix
with. When missing, a default set of colours from
defaultPalette() will be used. Valid input include hex codes, colour
names from the colours
function, and integer numbers. The
colours will be interpreted as being from best to worst.
cols
, dictating the
number of times each corresponding colour should be used. When missing,
the function will divide the number of helices evenly over each of the
colours available.
helix
into, or a list of numbers defining the interval breaks.
If missing, the range of helix$value will automatically be
split evenly into intervals for each colour available.
helix
with a col
column, else
simply returns an array of colours the same length as the number of row
in helix
. The exceptions are colourByBasepairFrequency
and colourByUnknottedGroups
which will return a different helix
if TRUE, and a list of colours that will not match the input helix if
FALSE.
cut
cut
, potentially useful
ones include right
(whether intervals should be inclusive on the
right or left) and dig.lab
(number of digits in interval labels).
Biostrings
XStringSet
object or a named array of strings like ones obtained
from converting XStringSet with as.character
.
get =
FALSE
, and a helix with a col
column if get = TRUE
. In both
bases, the returned object has attributes legend and fill,
showing the mapping between interval (in legend) and colour (in fill),
which can as eponymous arguments legend
.defaultPalette
returns the default list of colours.
colourByCount
assigns colours indepenent of the helix input's value
column, and instead operates over the number of helices (i.e. rows).
colourByValue
uses cut
to assign each of the helices
to an interval based on its value.
colourByCovariation
, colourByConservation
, and
colourByCanonical
, colour helices according to compensatory mutations
(or covariation), percentage identity conservation, and percentage canonical
basepair repsectively, relative to the multiple sequence alignment provided. colourByBasepairFrequency
colours each basepair according to the
number of times it appear in the input, regardless of its value.
colourByUnknottedGroups
greedily partitions the basepairs into non-
pseudoknotted groups, and assigns a colour to each.
plotHelix
data(helix)
known$col <- colourByCount(known)
plotHelix(known)
plotHelix(colourByValue(helix, log = TRUE, get = TRUE))
cov <- colourByCovariation(known, fasta, get = TRUE)
plotCovariance(fasta, cov)
legend("topleft", legend = attr(cov, "legend"),
fill = attr(cov, "fill"), title = "Covariation")
Run the code above in your browser using DataLab