| Title: | Various Utilities for Microbial Genomics and Metagenomics |
|---|---|
| Description: | A collection of functions for microbial ecology and other applications of genomics and metagenomics. Companion package for the Enveomics Collection (Rodriguez-R, L.M. and Konstantinidis, K.T., 2016 <DOI:10.7287/peerj.preprints.1900v1>). |
| Authors: | Luis M. Rodriguez-R [aut, cre] |
| Maintainer: | Luis M. Rodriguez-R <[email protected]> |
| License: | Artistic-2.0 |
| Version: | 1.10.0 |
| Built: | 2026-06-02 10:16:02 UTC |
| Source: | https://github.com/cran/enveomics.R |
Attribute accessor
## S4 method for signature 'enve.GrowthCurve' x$name## S4 method for signature 'enve.GrowthCurve' x$name
x |
Object |
name |
Attribute name |
Attribute accessor
## S4 method for signature 'enve.RecPlot2' x$name## S4 method for signature 'enve.RecPlot2' x$name
x |
Object |
name |
Attribute name |
Attribute accessor
## S4 method for signature 'enve.RecPlot2.Peak' x$name## S4 method for signature 'enve.RecPlot2.Peak' x$name
x |
Object |
name |
Attribute name |
Internal function for enve.prune.dist.
enve.__prune.iter(t, dist, min_dist, quiet)enve.__prune.iter(t, dist, min_dist, quiet)
t |
A phylo object. |
dist |
Cophenetic distance matrix. |
min_dist |
Minimum distance. |
quiet |
If running quietly. |
Returns a phylo object.
Luis M. Rodriguez-R [aut, cre]
Internal function for enve.prune.dist.
enve.__prune.reduce(t, nodes, min_dist, quiet)enve.__prune.reduce(t, nodes, min_dist, quiet)
t |
A phylo object. |
nodes |
Vector of nodes. |
min_dist |
Minimum distance. |
quiet |
If running quietly. |
A phylo object.
Luis M. Rodriguez-R [aut, cre]
Internal ancillary function (see enve.tribs).
enve.__tribs( rep, frx, selection, dimensions, dots, dist.method, summary.fx, dist )enve.__tribs( rep, frx, selection, dimensions, dots, dist.method, summary.fx, dist )
rep |
Replicates |
frx |
Fraction |
selection |
Selection |
dimensions |
Dimensions |
dots |
Sampling points |
dist.method |
Distance method |
summary.fx |
Summary function |
dist |
Distance |
A numeric indicating the summary.fx value applied to the
distance matrix subset
Luis M. Rodriguez-R [aut, cre]
Creates nice barplots from tab-delimited tables.
enve.barplot( x, sizes, top = 25, colors.per.group = 9, bars.width = 4, legend.ncol = 1, other.col = "#000000", add.trend = FALSE, organic.trend = FALSE, sort.by = median, min.report = 101, order = NULL, col, ... )enve.barplot( x, sizes, top = 25, colors.per.group = 9, bars.width = 4, legend.ncol = 1, other.col = "#000000", add.trend = FALSE, organic.trend = FALSE, sort.by = median, min.report = 101, order = NULL, col, ... )
x |
Can be either the input data or the path to the file containing the table.
|
sizes |
A numeric vector containing the real size of the samples (columns) in the same order of the input table. If set, the values are assumed to be 100%. Otherwise, the sum of the columns is used. |
top |
Maximum number of categories to display. Any additional categories will be listed as "Others". |
colors.per.group |
Number of categories in the first two saturation groups of colors. The third group contains the remaining categories if needed. |
bars.width |
Width of the barplot with respect to the legend. |
legend.ncol |
Number of columns in the legend. |
other.col |
Color of the "Others" category. |
add.trend |
Controls if semi-transparent areas are to be plotted between the bars to connect the regions (trend regions). |
organic.trend |
Controls if the trend regions are to be smoothed
(curves). By default, trend regions have straight edges. If |
sort.by |
Any function that takes a numeric vector and returns a
numeric scalar. This function is applied to each row, and the resulting
values are used to sort the rows (decreasingly). Good options include:
|
min.report |
Minimum percentage to report the value in the plot. Any value above 100 indicates that no values are to be reported. |
order |
Controls how the rows should be ordered.
|
col |
Colors to use. If provided, overrides the variables |
... |
Any additional parameters to be passed to barplot. |
No return value
Luis M. Rodriguez-R [aut, cre]
# Load data data("phyla.counts", package = "enveomics.R", envir = environment()) # Create a barplot sorted by variance with organic trends enve.barplot( phyla.counts, # Counts of phyla in four sites sizes = c(250,100,75,200), # Total sizes of the datasets of each site bars.width = 2, # Decrease from default, so the names are fully displayed organic.trend = TRUE, # Nice curvy background sort.by = var # Sort by variance across sites )# Load data data("phyla.counts", package = "enveomics.R", envir = environment()) # Create a barplot sorted by variance with organic trends enve.barplot( phyla.counts, # Counts of phyla in four sites sizes = c(250,100,75,200), # Total sizes of the datasets of each site bars.width = 2, # Decrease from default, so the names are fully displayed organic.trend = TRUE, # Nice curvy background sort.by = var # Sort by variance across sites )
Generates nicely formatted command-line interfaces for functions (closures only).
enve.cliopts( fx, rd_file, positional_arguments, usage, mandatory = c(), vectorize = c(), ignore = c(), number = c(), defaults = list(), o_desc = list(), p_desc = "" )enve.cliopts( fx, rd_file, positional_arguments, usage, mandatory = c(), vectorize = c(), ignore = c(), number = c(), defaults = list(), o_desc = list(), p_desc = "" )
fx |
Function for which the interface should be generated. |
rd_file |
(Optional) .Rd file with the standard documentation of the function. |
positional_arguments |
(Optional) Number of positional
arguments passed to |
usage |
(Optional) Usage passed to |
mandatory |
Mandatory arguments. |
vectorize |
Arguments of the function to vectorize (comma-delimited).
If numeric, use also |
ignore |
Arguments of the function to ignore. |
number |
Force these arguments as numerics. Useful for numeric
vectors (see |
defaults |
Defaults to use instead of the ones provided by the formals. |
o_desc |
Descriptions of the options. Help from |
p_desc |
Description Description of the function. Help from |
Returns a list with keys:
options, a named list with the values for the function's
arguments
args, a vector with zero or more strings containing the
positional arguments
Luis M. Rodriguez-R [aut, cre]
Modify alpha in a color (or vector of colors).
enve.col.alpha(col, alpha = 1/2)enve.col.alpha(col, alpha = 1/2)
col |
Color or vector of colors. It can be any value supported by
|
alpha |
Alpha value to add to the color, from 0 to 1. |
Returns a color or a vector of colors in hex notation,
including alpha.
Luis M. Rodriguez-R [aut, cre]
# Hexcode for a color by hexcode enve.col.alpha("#009988", 3/4) # "#009988BF" # Hexcode for a color by name enve.col.alpha("white", 1/4) # "#FFFFFF3F" # Hexcode for a color from other functions enve.col.alpha(rainbow(3)) # "#FF00007F" "#00FF007F" "#0000FF7F"# Hexcode for a color by hexcode enve.col.alpha("#009988", 3/4) # "#009988BF" # Hexcode for a color by name enve.col.alpha("white", 1/4) # "#FFFFFF3F" # Hexcode for a color from other functions enve.col.alpha(rainbow(3)) # "#FF00007F" "#00FF007F" "#0000FF7F"
Takes a vector of colors and sets the alpha.
enve.col2alpha(x, alpha)enve.col2alpha(x, alpha)
x |
A vector of any value base colors. |
alpha |
Alpha level to set, in the [0, 1] range. |
DEPRECATED: Use instead enve.col.alpha.
A vector of colors with alpha set.
Luis M. Rodriguez-R [aut, cre]
Transform a dataframe (or coercible object, like a table) into a dist object.
enve.df2dist( x, obj1.index = 1, obj2.index = 2, dist.index = 3, default.d = NA, max.sim = 0 )enve.df2dist( x, obj1.index = 1, obj2.index = 2, dist.index = 3, default.d = NA, max.sim = 0 )
x |
A dataframe (or coercible object) with at least three columns:
|
obj1.index |
Index of the column containing the ID of the object 1. |
obj2.index |
Index of the column containing the ID of the object 2. |
dist.index |
Index of the column containing the distance. |
default.d |
Default value (for missing values). |
max.sim |
If not zero, assumes that the values are similarity
(not distance) and this is the maximum similarity (corresponding to
distance 0). Applies transformation:
|
Returns a dist object.
Luis M. Rodriguez-R [aut, cre]
# A sparse matrix representation of similarities as data frame. # The column "extra_data" is meaningless, only included to illustrate # the use of the obj*.index parameters sim <- data.frame( extra_data = c(0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.5), query = c("A", "A", "A", "B", "C", "C", "D"), subject = c("A", "B", "C", "B", "C", "B", "A"), similarity = c(100, 90, 60, 100, 100, 70, 10) ) dist <- enve.df2dist(sim, "query", "subject", "similarity", max.sim = 100) print(dist)# A sparse matrix representation of similarities as data frame. # The column "extra_data" is meaningless, only included to illustrate # the use of the obj*.index parameters sim <- data.frame( extra_data = c(0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.5), query = c("A", "A", "A", "B", "C", "C", "D"), subject = c("A", "B", "C", "B", "C", "B", "A"), similarity = c(100, 90, 60, 100, 100, 70, 10) ) dist <- enve.df2dist(sim, "query", "subject", "similarity", max.sim = 100) print(dist)
Transform a dataframe (or coercible object, like a table) into a dist object, where there are 1 or more distances between each pair of objects.
enve.df2dist.group( x, obj1.index = 1, obj2.index = 2, dist.index = 3, summary = median, empty.rm = TRUE )enve.df2dist.group( x, obj1.index = 1, obj2.index = 2, dist.index = 3, summary = median, empty.rm = TRUE )
x |
A dataframe (or coercible object) with at least three columns:
|
obj1.index |
Index of the column containing the ID of the object 1. |
obj2.index |
Index of the column containing the ID of the object 2. |
dist.index |
Index of the column containing the distance. |
summary |
Function summarizing the different distances between the two objects. |
empty.rm |
Remove rows with empty or |
Returns a dist object.
Luis M. Rodriguez-R [aut, cre]
# A sparse matrix representation of distances as data frame. # Note that some pairs are repeated. dist.df <- data.frame( query = c("A", "A", "A", "B", "C", "C", "B", "B", "B"), subject = c("A", "B", "C", "B", "C", "B", "A", "C", "C"), distance = c( 0, 0.1, 0.4, 0, 0, 0.4, 0.2, 0.2, 0.1) ) dist <- enve.df2dist.group(dist.df) print(dist) # Use the mean of all repeated occurrences instead of the median. dist <- enve.df2dist.group(dist.df, summary = mean) # Simply use the first occurrence for any given pair. dist <- enve.df2dist.group(dist.df, summary = function(x) head(x, n = 1))# A sparse matrix representation of distances as data frame. # Note that some pairs are repeated. dist.df <- data.frame( query = c("A", "A", "A", "B", "C", "C", "B", "B", "B"), subject = c("A", "B", "C", "B", "C", "B", "A", "C", "C"), distance = c( 0, 0.1, 0.4, 0, 0, 0.4, 0.2, 0.2, 0.1) ) dist <- enve.df2dist.group(dist.df) print(dist) # Use the mean of all repeated occurrences instead of the median. dist <- enve.df2dist.group(dist.df, summary = mean) # Simply use the first occurrence for any given pair. dist <- enve.df2dist.group(dist.df, summary = function(x) head(x, n = 1))
Transform a dataframe (or coercible object, like a table) into a list of dist objects, one per group.
enve.df2dist.list( x, groups, obj1.index = 1, obj2.index = 2, dist.index = 3, empty.rm = TRUE, ... )enve.df2dist.list( x, groups, obj1.index = 1, obj2.index = 2, dist.index = 3, empty.rm = TRUE, ... )
x |
A dataframe (or coercible object) with at least three columns:
|
groups |
Named array where the IDs correspond to the object IDs, and the values correspond to the group. |
obj1.index |
Index of the column containing the ID of the object 1. |
obj2.index |
Index of the column containing the ID of the object 2. |
dist.index |
Index of the column containing the distance. |
empty.rm |
Remove incomplete matrices. |
... |
Any other parameters supported by |
Returns a list of dist objects.
Luis M. Rodriguez-R [aut, cre]
Calculates growth curves using the logistic growth function.
enve.growthcurve( x, times = 1:nrow(x), triplicates = FALSE, design, new.times = seq(min(times), max(times), length.out = length(times) * 10), level = 0.95, interval = c("confidence", "prediction"), plot = TRUE, FUN = function(t, K, r, P0) K * P0 * exp(r * t)/(K + P0 * (exp(r * t) - 1)), nls.opt = list(), ... )enve.growthcurve( x, times = 1:nrow(x), triplicates = FALSE, design, new.times = seq(min(times), max(times), length.out = length(times) * 10), level = 0.95, interval = c("confidence", "prediction"), plot = TRUE, FUN = function(t, K, r, P0) K * P0 * exp(r * t)/(K + P0 * (exp(r * t) - 1)), nls.opt = list(), ... )
x |
Data frame (or coercible) containing the observed growth data
(e.g., O.D. values). Each column is an independent growth curve and each
row is a time point. |
times |
Vector with the times at which each row was taken. By default, all rows are assumed to be part of constantly periodic measurements. |
triplicates |
If |
design |
Experimental design of the data. An array of mode list
with sample names as index and the list of column names in each sample as
the values. By default, each column is assumed to be an independent sample
if |
new.times |
Values of time for the fitted curve. |
level |
Confidence (or prediction) interval in the fitted curve. |
interval |
Type of interval to be calculated for the fitted curve. |
plot |
Should the growth curve be plotted? |
FUN |
Function to fit. By default: logistic growth with paramenters
|
nls.opt |
Any additional options passed to |
... |
Any additional parameters to be passed to
|
Returns an enve.GrowthCurve object.
Luis M. Rodriguez-R [aut, cre]
# Load data data("growth.curves", package = "enveomics.R", envir = environment()) # Generate growth curves with different colors g <- enve.growthcurve(growth.curves[, -1], growth.curves[, 1], triplicates = TRUE) # Generate black-and-white growth curves with different symbols plot(g, pch=15:17, col="black", band.density=45, band.angle=c(-45,45,0))# Load data data("growth.curves", package = "enveomics.R", envir = environment()) # Generate growth curves with different colors g <- enve.growthcurve(growth.curves[, -1], growth.curves[, 1], triplicates = TRUE) # Generate black-and-white growth curves with different symbols plot(g, pch=15:17, col="black", band.density=45, band.angle=c(-45,45,0))
Enve-omics representation of fitted growth curves.
design(array) Experimental design of the experiment.
models(list) Fitted growth curve models.
predict(list) Fitted growth curve values.
call(call) Call producing this object.
Luis M. Rodriguez-R [aut, cre]
Estimate preference score of species based on occupancy in biased sample sets
enve.prefscore( x, set, ignore = NULL, signif.thr, plot = TRUE, col.above = rgb(148, 17, 0, maxColorValue = 255), col.equal = rgb(189, 189, 189, maxColorValue = 255), col.below = rgb(47, 84, 150, maxColorValue = 255), ... )enve.prefscore( x, set, ignore = NULL, signif.thr, plot = TRUE, col.above = rgb(148, 17, 0, maxColorValue = 255), col.equal = rgb(189, 189, 189, maxColorValue = 255), col.below = rgb(47, 84, 150, maxColorValue = 255), ... )
x |
Occupancy matrix (logical or numeric binary) with species as rows and samples as columns |
set |
Vector indicating samples in the test set. It can be any selection vector:
boolean (same length as the number of columns in |
ignore |
Vector indicating species to ignore. It can be any selection vector with
respect to the rows in |
signif.thr |
Absolute value of the significance threshold |
plot |
Indicates if a plot should be generated |
col.above |
Color for points significantly above zero |
col.equal |
Color for points not significantly different from zero |
col.below |
Color for points significantly below zero |
... |
Any additional parameters supported by |
Returns a named vector of preference scores.
Luis M. Rodriguez-R [aut, cre]
Automatically prunes a tree, to keep representatives of each clade.
enve.prune.dist( t, dist.quantile = 0.25, min_dist, quiet = FALSE, max_iters = 100, min_nodes_random = 40000, random_nodes_frx = 1 )enve.prune.dist( t, dist.quantile = 0.25, min_dist, quiet = FALSE, max_iters = 100, min_nodes_random = 40000, random_nodes_frx = 1 )
t |
A phylo object or a path to the Newick file. |
dist.quantile |
The quantile of edge lengths. |
min_dist |
The minimum distance to allow between two tips.
If not set, |
quiet |
Boolean indicating if the function must run without output. |
max_iters |
Maximum number of iterations. |
min_nodes_random |
Minimum number of nodes to trigger tip-pairs nodes sampling.
This sampling is less reproducible and more computationally expensive,
but it's the only solution if the cophenetic matrix exceeds |
random_nodes_frx |
Fraction of the nodes to be sampled if more than |
Returns a pruned phylo object.
Luis M. Rodriguez-R [aut, cre]
Produces recruitment plots provided that BlastTab.catsbj.pl has been previously executed. Requires the gplots library.
enve.recplot( prefix, id.min = NULL, id.max = NULL, id.binsize = NULL, id.splines = 0, id.metric = "id", id.summary = "sum", pos.min = 1, pos.max = NULL, pos.binsize = 1000, pos.splines = 0, rec.col1 = "white", rec.col2 = "black", main = NULL, contig.col = grey(0.85), ret.recplot = FALSE, ret.hist = FALSE, ret.mode = FALSE, id.cutoff = NULL, verbose = TRUE, ... )enve.recplot( prefix, id.min = NULL, id.max = NULL, id.binsize = NULL, id.splines = 0, id.metric = "id", id.summary = "sum", pos.min = 1, pos.max = NULL, pos.binsize = 1000, pos.splines = 0, rec.col1 = "white", rec.col2 = "black", main = NULL, contig.col = grey(0.85), ret.recplot = FALSE, ret.hist = FALSE, ret.mode = FALSE, id.cutoff = NULL, verbose = TRUE, ... )
prefix |
Path to the prefix of the BlastTab.catsbj.pl output files. At least the files .rec and .lim must exist with this prefix. |
id.min |
Minimum identity to be considered. By default, the minimum detected identity. This value is a percentage. |
id.max |
Maximum identity to be considered. By default, 100%. |
id.binsize |
Size of the identity bins (vertical histograms). By default, 0.1 for identity metrics and 5 for bit score. |
id.splines |
Smoothing parameter for the splines in the identity histogram. Zero (0) for no splines. A generally good value is 1/2. If non-zero, requires the stats package. |
id.metric |
Metric of identity to be used (Y-axis). It can be any unambiguous prefix of:
|
id.summary |
Method used to build the identity histogram (Horizontal axis of the right panel). It can be any unambiguous prefix of:
The last four options correspond to the upper and lower boundaries of the 90% and 95% empirical confidence intervals. |
pos.min |
Minimum (leftmost) position in the reference (concatenated) genome (in bp). |
pos.max |
Maximum (rightmost) position in the reference (concatenated) genome (in bp). By default: Length of the genome. |
pos.binsize |
Size of the position bins (horizontal histograms) in bp. |
pos.splines |
Smoothing parameter for the splines in the position histogram. Zero (0) for no splines. If non-zero, requires the stats package. |
rec.col1 |
Lightest color in the recruitment plot. |
rec.col2 |
Darkest color in the recruitment plot. |
main |
Title of the plot. |
contig.col |
Color of the Contig boundaries. Set to |
ret.recplot |
Indicates if the matrix of the recruitment plot is to be returned. |
ret.hist |
Ignored, for backwards compatibility. |
ret.mode |
Indicates if the mode of the identity is to be computed. It requires the modeest package. |
id.cutoff |
Minimum identity to consider an alignment as "top". By default, it is 0.95 for the identity metrics and 95% of the best scoring alignment for bit score. |
verbose |
Indicates if the function should report the advance. |
... |
Any additional graphic parameters to be passed to plot for all panels except the recruitment plot (lower-left). |
Returns a list with the following elements:
pos.marksMidpoints of the position histogram.
id.matrixMidpoints of the identity histogram.
recplotMatrix containing the recruitment plot values
(if ret.recplot=TRUE).
id.meanMean identity.
id.medianMedian identity.
id.modeMode of the identity (if ret.mode=TRUE).
Deprecated.
id.histValues of the identity histogram
(if ret.hist=TRUE).
pos.hist.lowValues of the position histogram (depth) with
"low" identity (i.e., below id.cutoff) (if ret.hist=TRUE).
pos.hist.topValues of the position histogram (depth) with
"top" identity (i.e., above id.cutoff) (if ret.hist=TRUE).
id.maxValue of id.max. This is returned because
id.max=NULL may vary.
id.cutoffValue of id.cutoff.
This is returned because id.cutoff=NULL may vary.
seqdepth.mean.topAverage sequencing depth with identity above
id.cutoff.
seqdepth.mean.lowAverage sequencing depth with identity below
id.cutoff.
seqdepth.mean.allAverage sequencing depth without identity filtering.
seqdepth.median.topMedian sequencing depth with identity above
id.cutoff.
seqdepth.median.lowMedian sequencing depth with identity below
id.cutoff.
seqdepth.median.allMedian sequencing depth without identity filtering.
id.metricFull name of the used identity metric.
id.summaryFull name of the summary method used to build the identity plot.
Luis M. Rodriguez-R [aut, cre]
Produces recruitment plots provided that BlastTab.catsbj.pl has
been previously executed.
enve.recplot2( prefix, plot = TRUE, pos.breaks = 1000, pos.breaks.tsv = NA, id.breaks = 60, id.free.range = FALSE, id.metric = c("identity", "corrected identity", "bit score"), id.summary = sum, id.cutoff = 95, threads = 2, verbose = TRUE, ... )enve.recplot2( prefix, plot = TRUE, pos.breaks = 1000, pos.breaks.tsv = NA, id.breaks = 60, id.free.range = FALSE, id.metric = c("identity", "corrected identity", "bit score"), id.summary = sum, id.cutoff = 95, threads = 2, verbose = TRUE, ... )
prefix |
Path to the prefix of the |
plot |
Should the object be plotted? |
pos.breaks |
Breaks in the positions histogram. It can also be a vector of break points, and values outside the range are ignored. If zero (0), it uses the sequence breaks as defined in the .lim file, which means one bin per contig (or gene, if the mapping is agains genes). Ignored if 'pos.breaks.tsv' is passed. |
pos.breaks.tsv |
Path to a list of (absolute) coordinates to use as position breaks.
This tab-delimited file can be produced by |
id.breaks |
Breaks in the identity histogram. It can also be a vector of break points, and values outside the range are ignored. |
id.free.range |
Indicates that the range should be freely set from the observed values. Otherwise, 70-100% is included in the identity histogram (default). |
id.metric |
Metric of identity to be used (Y-axis). Corrected identity is only supported if the original BLAST file included sequence lengths. |
id.summary |
Function summarizing the identity bins. Other recommended options
include: |
id.cutoff |
Cutoff of identity metric above which the hits are considered
|
threads |
Number of threads to use. |
verbose |
Indicates if the function should report the advance. |
... |
Any additional parameters supported by |
Returns an object of class enve.RecPlot2.
Luis M. Rodriguez-R [aut, cre]
Kenji Gerhardt [aut]
Enve-omics representation of Recruitment plots. This object can
be produced by enve.recplot2 and supports S4 method plot.
counts(matrix) Counts as a two-dimensional histogram.
pos.counts.in(numeric) Counts of in-group hits per position bin.
pos.counts.out(numeric) Counts of out-group hits per position bin.
id.counts(numeric) Counts per ID bin.
id.breaks(numeric) Breaks of identity bins.
pos.breaks(numeric) Breaks of position bins.
pos.names(character) Names of the position bins.
seq.breaks(numeric) Breaks of input sequences.
peaks(list) Peaks identified in the recplot.
Limits of the subject sequences after concatenation.
seq.names(character) Names of the subject sequences.
id.metric(character) Metric used as 'identity'.
id.ingroup(logical) Identity bins considered in-group.
call(call) Call producing this object.
Luis M. Rodriguez-R [aut, cre]
Internal ancillary function (see enve.recplot2).
enve.recplot2.__counts(x, pos.breaks, id.breaks, rec.idcol)enve.recplot2.__counts(x, pos.breaks, id.breaks, rec.idcol)
x |
|
pos.breaks |
Position breaks |
id.breaks |
Identity breaks |
rec.idcol |
Identity column to use |
2-dimensional matrix of counts per identity and position bins.
Luis M. Rodriguez-R [aut, cre]
Kenji Gerhardt [aut]
Internal ancillary function (see enve.RecPlot2.Peak).
enve.recplot2.__peakHist(x, mids, counts = TRUE)enve.recplot2.__peakHist(x, mids, counts = TRUE)
x |
|
mids |
Midpoints |
counts |
Counts |
A numeric vector of counts (histogram)
Luis M. Rodriguez-R [aut, cre]
Internal ancillary function (see enve.recplot2.findPeaks).
enve.recplot2.__whichClosestPeak(peak, peaks)enve.recplot2.__whichClosestPeak(peak, peaks)
peak |
Query |
peaks |
list of |
A numeric index out of peaks.
Luis M. Rodriguez-R [aut, cre]
Estimate the Average Nucleotide Identity from reads (ANIr) from a recruitment plot.
enve.recplot2.ANIr(x, range = c(0, Inf))enve.recplot2.ANIr(x, range = c(0, Inf))
x |
|
range |
Range of identities to be considered. By default, the full range
is used (note that the upper boundary is |
A numeric value indicating the ANIr (as percentage).
Luis M. Rodriguez-R [aut, cre]
Change the intra-species cutoff of an existing recruitment plot.
enve.recplot2.changeCutoff(rp, new.cutoff = 98)enve.recplot2.changeCutoff(rp, new.cutoff = 98)
rp |
|
new.cutoff |
New cutoff to use. |
The modified enve.RecPlot2 object.
Luis M. Rodriguez-R [aut, cre]
Compare the distribution of identities between two
enve.RecPlot2 objects.
enve.recplot2.compareIdentities( x, y, method = "hellinger", smooth.par = NULL, pseudocounts = 0, max.deviation = 0.75 )enve.recplot2.compareIdentities( x, y, method = "hellinger", smooth.par = NULL, pseudocounts = 0, max.deviation = 0.75 )
x |
First |
y |
Second |
method |
Distance method to use. This should be (an unambiguous abbreviation of) one of:
|
smooth.par |
Smoothing parameter for cubic spline smoothing. Use 0 for no smoothing.
Use |
pseudocounts |
Smoothing parameter for Laplace smoothing. Use 0 for no smoothing, or 1 for add-one smoothing. |
max.deviation |
Maximum mean deviation between identity breaks tolerated (as percent
identity). Difference in number of |
A numeric indicating the distance between the objects.
Luis M. Rodriguez-R [aut, cre]
Returns the sequence name and coordinates of the requested position bins.
enve.recplot2.coordinates(x, bins)enve.recplot2.coordinates(x, bins)
x |
|
bins |
Vector of selected bins to return. It can be a vector of logical values
with the same length as |
Returns a data.frame with five columns: name.from (character),
pos.from (numeric), name.to (character), pos.to
(numeric), and seq.name (character).
The first two correspond to sequence and position of the start point of the
bin. The next two correspond to the sequence and position of the end point of
the bin. The last one indicates the name of the sequence (if defined).
Luis M. Rodriguez-R [aut, cre]
Finds the peak in a list of peaks that is most likely to represent the "core genome" of a population.
enve.recplot2.corePeak(x)enve.recplot2.corePeak(x)
x |
|
A enve.RecPlot2.Peak object.
Luis M. Rodriguez-R [aut, cre]
Extract windows significantly below (or above) the peak in sequencing depth.
enve.recplot2.extractWindows( rp, peak, lower.tail = TRUE, significance = 0.05, seq.names = FALSE )enve.recplot2.extractWindows( rp, peak, lower.tail = TRUE, significance = 0.05, seq.names = FALSE )
rp |
Recruitment plot, a |
peak |
Peak, an |
lower.tail |
If |
significance |
Significance threshold (alpha) to select windows. |
seq.names |
Returns subject sequence names instead of a vector of Booleans. If
the recruitment plot was generated with named position bins (e.g, using
|
Returns a vector of logicals if seq.names = FALSE.
If seq.names = TRUE, it returns a data.frame with five columns:
name.from, name.to, pos.from, pos.to, and
seq.name (see enve.recplot2.coordinates).
Luis M. Rodriguez-R [aut, cre]
Identifies peaks in the population histogram potentially indicating sub-population mixtures.
enve.recplot2.findPeaks(x, method = "emauto", ...)enve.recplot2.findPeaks(x, method = "emauto", ...)
x |
An |
method |
Peak-finder method. This should be one of:
|
... |
Any additional parameters supported by
|
Returns a list of enve.RecPlot2.Peak objects.
Luis M. Rodriguez-R [aut, cre]
Internal ancillary function (see enve.recplot2.findPeaks.em).
enve.recplot2.findPeaks.__em_e(x, theta)enve.recplot2.findPeaks.__em_e(x, theta)
x |
Vector of log-transformed sequencing depths |
theta |
Parameters list |
A list with components ll (numeric) the log-likelihood, and
posterior (numeric) the posterior probability.
Luis M. Rodriguez-R [aut, cre]
Internal ancillary function (see enve.recplot2.findPeaks.em).
enve.recplot2.findPeaks.__em_m(x, posterior)enve.recplot2.findPeaks.__em_m(x, posterior)
x |
Vector of log-transformed sequencing depths |
posterior |
Posterior probability |
A list with components mu (numeric) the estimated mean,
sd (numeric) the estimated standard deviation, and alpha
(numeric) the estimated alpha parameter.
Luis M. Rodriguez-R [aut, cre]
Internal ancillary function (see
enve.recplot2.findPeaks.emauto).
enve.recplot2.findPeaks.__emauto_one(x, comp, do_crit, best, verbose, ...)enve.recplot2.findPeaks.__emauto_one(x, comp, do_crit, best, verbose, ...)
x |
|
comp |
Components. |
do_crit |
Function estimating the criterion. |
best |
Best solution thus far. |
verbose |
If verbose. |
... |
Additional parameters for |
Updated solution with the same structure as best.
Luis M. Rodriguez-R [aut, cre]
Internal ancillary function (see
enve.recplot2.findPeaks.mower).
enve.recplot2.findPeaks.__mow_one( lsd1, min.points, quant.est, mlv.opts, fitdist.opts, with.skewness, optim.rounds, optim.epsilon, n.total, merge.logdist, verbose, log )enve.recplot2.findPeaks.__mow_one( lsd1, min.points, quant.est, mlv.opts, fitdist.opts, with.skewness, optim.rounds, optim.epsilon, n.total, merge.logdist, verbose, log )
lsd1 |
Vector of log-transformed sequencing depths |
min.points |
Minimum number of points |
quant.est |
Quantile estimate |
mlv.opts |
List of options for |
fitdist.opts |
List of options for |
with.skewness |
If skewed-normal should be used |
optim.rounds |
Maximum number of optimization rounds |
optim.epsilon |
Minimum difference considered negligible |
n.total |
Global number of windows |
merge.logdist |
Attempted |
verbose |
If verbose |
log |
If log-transformed depths |
Return an enve.RecPlot2.Peak object.
Luis M. Rodriguez-R [aut, cre]
Internal ancillary function (see enve.recplot2.findPeaks.mower).
enve.recplot2.findPeaks.__mower(peaks.opts)enve.recplot2.findPeaks.__mower(peaks.opts)
peaks.opts |
List of options for |
A list of enve.RecPlot2.Peak objects.
Luis M. Rodriguez-R [aut, cre]
Identifies peaks in the population histogram using a Gaussian Mixture Model Expectation Maximization (GMM-EM) method.
enve.recplot2.findPeaks.em( x, max.iter = 1000, ll.diff.res = 1e-08, components = 2, rm.top = 0.05, verbose = FALSE, init, log = TRUE )enve.recplot2.findPeaks.em( x, max.iter = 1000, ll.diff.res = 1e-08, components = 2, rm.top = 0.05, verbose = FALSE, init, log = TRUE )
x |
An |
max.iter |
Maximum number of EM iterations. |
ll.diff.res |
Maximum Log-Likelihood difference to be considered as convergent. |
components |
Number of distributions assumed in the mixture. |
rm.top |
Top-values to remove before finding peaks, as a quantile probability.
This step is useful to remove highly conserved regions, but can be
turned off by setting |
verbose |
Display (mostly debugging) information. |
init |
Initialization parameters. By default, these are derived from k-means
clustering. A named list with vectors for |
log |
Logical value indicating if the estimations should be performed in natural logarithm units. Do not change unless you know what you're doing. |
Returns a list of enve.RecPlot2.Peak objects.
Luis M. Rodriguez-R [aut, cre]
Identifies peaks in the population histogram using a Gaussian Mixture Model Expectation Maximization (GMM-EM) method with number of components automatically detected.
enve.recplot2.findPeaks.emauto( x, components = seq(1, 5), criterion = "aic", merge.tol = 2L, verbose = FALSE, ... )enve.recplot2.findPeaks.emauto( x, components = seq(1, 5), criterion = "aic", merge.tol = 2L, verbose = FALSE, ... )
x |
An |
components |
A vector of number of components to evaluate. |
criterion |
Criterion to use for components selection. Must be one of:
|
merge.tol |
When attempting to merge peaks with very similar sequencing depth, use this number of significant digits (in log-scale). |
verbose |
Display (mostly debugging) information. |
... |
Any additional parameters supported by
|
Returns a list of enve.RecPlot2.Peak objects.
Luis M. Rodriguez-R [aut, cre]
Identifies peaks in the population histogram potentially indicating sub-population mixtures, using a custom distribution-mowing method.
enve.recplot2.findPeaks.mower( x, min.points = 10, quant.est = c(0.002, 0.998), mlv.opts = list(method = "parzen"), fitdist.opts.sn = list(distr = "sn", method = "qme", probs = c(0.1, 0.5, 0.8), start = list(omega = 1, alpha = -1), lower = c(0, -Inf, -Inf)), fitdist.opts.norm = list(distr = "norm", method = "qme", probs = c(0.4, 0.6), start = list(sd = 1), lower = c(0, -Inf)), rm.top = 0.05, with.skewness = TRUE, optim.rounds = 200, optim.epsilon = 1e-04, merge.logdist = log(1.75), verbose = FALSE, log = TRUE )enve.recplot2.findPeaks.mower( x, min.points = 10, quant.est = c(0.002, 0.998), mlv.opts = list(method = "parzen"), fitdist.opts.sn = list(distr = "sn", method = "qme", probs = c(0.1, 0.5, 0.8), start = list(omega = 1, alpha = -1), lower = c(0, -Inf, -Inf)), fitdist.opts.norm = list(distr = "norm", method = "qme", probs = c(0.4, 0.6), start = list(sd = 1), lower = c(0, -Inf)), rm.top = 0.05, with.skewness = TRUE, optim.rounds = 200, optim.epsilon = 1e-04, merge.logdist = log(1.75), verbose = FALSE, log = TRUE )
x |
An |
min.points |
Minimum number of points in the quantile-estimation-range
|
quant.est |
Range of quantiles to be used in the estimation of a peak's parameters. |
mlv.opts |
Ignored. For backwards compatibility. |
fitdist.opts.sn |
Options passed to |
fitdist.opts.norm |
Options passed to |
rm.top |
Top-values to remove before finding peaks, as a quantile probability.
This step is useful to remove highly conserved regions, but can be
turned off by setting |
with.skewness |
Allow skewness correction of the peaks. Typically, the sequencing-depth distribution for a single peak is left-skewed, due partly (but not exclusively) to fragmentation and mapping sensitivity. See Lindner et al 2013, Bioinformatics 29(10):1260-7 for an alternative solution for the first problem (fragmentation) called "tail distribution". |
optim.rounds |
Maximum rounds of peak optimization. |
optim.epsilon |
Trace change at which optimization stops (unless |
merge.logdist |
Maximum value of |
verbose |
Display (mostly debugging) information. |
log |
Logical value indicating if the estimations should be performed in natural logarithm units. Do not change unless you know what you're doing. |
Returns a list of enve.RecPlot2.Peak objects.
Luis M. Rodriguez-R [aut, cre]
Enve-omics representation of a peak in the sequencing depth histogram
of a Recruitment plot (see enve.recplot2.findPeaks).
dist(character)
Distribution of the peak. Currently supported: norm (normal) and sn
(skew-normal).
values(numeric)
Sequencing depth values predicted to conform the peak.
values.res(numeric)
Sequencing depth values not explained by this or previously identified
peaks.
mode(numeric)
Seed-value of mode anchoring the peak.
param.hat(list)
Parameters of the distribution. A list of two values if dist=norm (sd
and mean), or three values if dist=sn(omega=scale, alpha=shape, and
xi=location). Note that the "dispersion" parameter is always first and
the "location" parameter is always last.
n.hat(numeric)
Number of bins estimated to be explained by this peak. This should
ideally be equal to the length of values, but it's not an integer.
n.total(numeric)
Total number of bins from which the peak was extracted. I.e., total
number of position bins with non-zero sequencing depth in the recruitment
plot (regardless of peak count).
err.res(numeric)
Error left after adding the peak (mower) or log-likelihood (em or emauto).
merge.logdist(numeric)
Attempted merge.logdist parameter.
seq.depth(numeric)
Best estimate available for the sequencing depth of the peak (centrality).
log(logical)
Indicates if the estimation was performed in natural logarithm space.
Luis M. Rodriguez-R [aut, cre]
Calculate the sequencing depth of the given window(s).
enve.recplot2.seqdepth(x, sel, low.identity = FALSE)enve.recplot2.seqdepth(x, sel, low.identity = FALSE)
x |
|
sel |
Window(s) for which the sequencing depth is to be calculated. If not passed, it returns the sequencing depth of all windows. |
low.identity |
A logical indicating if the sequencing depth is to be estimated only with low-identity matches. By default, only high-identity matches are used. |
Returns a numeric vector of sequencing depths (in bp/bp).
Luis M. Rodriguez-R [aut, cre]
Identifies the threshold below which windows should be identified as variable or absent.
enve.recplot2.windowDepthThreshold( rp, peak, lower.tail = TRUE, significance = 0.05 )enve.recplot2.windowDepthThreshold( rp, peak, lower.tail = TRUE, significance = 0.05 )
rp |
Recruitment plot, an |
peak |
Peak, an |
lower.tail |
If |
significance |
Significance threshold (alpha) to select windows. |
Returns a float. The units are depth if the peaks were estimated in
linear scale, or log-depth otherwise (peak$log).
Luis M. Rodriguez-R [aut, cre]
Normalizes a selection vector sel to a logical vector with indexes
from dim.names.
enve.selvector(sel, dim.names)enve.selvector(sel, dim.names)
sel |
A vector of numbers, characters, or booleans. |
dim.names |
A vector of names from which to select. |
Returns a logical vector with the same length as dim.name.
Luis M. Rodriguez-R [aut, cre]
Subsample any objects in "distance space" to reduce the effect of sample-clustering. This function was originally designed to subsample genomes in "phylogenetic distance space", a clear case of strong clustering bias in sampling, by Luis M. Rodriguez-R and Michael R Weigand.
enve.tribs( dist, selection = labels(dist), replicates = 1000, summary.fx = median, dist.method = "euclidean", subsamples = seq(0, 1, by = 0.01), dimensions = ceiling(length(selection) * 0.05), metaMDS.opts = list(), threads = 2, verbosity = 1, points, pre.tribs )enve.tribs( dist, selection = labels(dist), replicates = 1000, summary.fx = median, dist.method = "euclidean", subsamples = seq(0, 1, by = 0.01), dimensions = ceiling(length(selection) * 0.05), metaMDS.opts = list(), threads = 2, verbosity = 1, points, pre.tribs )
dist |
Distances as a |
selection |
Objects to include in the subsample. By default, all objects are selected. |
replicates |
Number of replications per point. |
summary.fx |
Function to summarize the distance distributions in a given replicate. By default, the median distance is estimated. |
dist.method |
Distance method between random points and samples in the transformed
space. See |
subsamples |
Subsampling fractions. |
dimensions |
Dimensions to use in the NMDS. By default, 5% of the selection length. |
metaMDS.opts |
Any additional options to pass to metaMDS, as |
threads |
Number of threads to use. |
verbosity |
Verbosity. Use 0 to run quietly, increase for additional information. |
points |
Optional. If passed, the MDS step is skipped and this object is used
instead. It can be the |
pre.tribs |
Optional. If passed, the points are recovered from this object (except if
|
Returns an enve.TRIBS object.
Luis M. Rodriguez-R [aut, cre]
Enve-omics representation of "Transformed-space Resampling In Biased Sets
(TRIBS)". This object represents sets of distances between objects,
sampled nearly-uniformly at random in "distance space". Subsampling
without selection is trivial, since both the distances space and the
selection occur in the same transformed space. However, it's useful to
compare randomly subsampled sets against a selected set of objects. This
is intended to identify overdispersion or overclustering (see
enve.TRIBStest) of a subset against the entire collection of
objects with minimum impact of sampling biases. This object can be produced
by enve.tribs and supports S4 methods plot and
summary.
distance(numeric) Centrality measurement of the distances
between the selected objects (without subsampling).
points(matrix) Position of the different objects in distance
space.
distances(matrix) Subsampled distances, where the rows are
replicates and the columns are subsampling levels.
spaceSize(numeric) Number of objects.
selSize(numeric) Number of selected objects.
dimensions(numeric) Number of dimensions in the distance space.
subsamples(numeric) Subsampling levels (as fractions, from
0 to 1).
call(call) Call producing this object.
Luis M. Rodriguez-R [aut, cre]
Merges two enve.TRIBS objects generated from the same objects
at different subsampling levels.
enve.TRIBS.merge(x, y)enve.TRIBS.merge(x, y)
x |
First |
y |
Second |
Returns an enve.TRIBS object.
Luis M. Rodriguez-R [aut, cre]
Estimates the empirical difference between all the distances in a set of objects and a subset, together with its statistical significance.
enve.tribs.test(dist, selection, bins = 50, ...)enve.tribs.test(dist, selection, bins = 50, ...)
dist |
Distances as |
selection |
Selection defining the subset. |
bins |
Number of bins to evaluate in the range of distances. |
... |
Any other parameters supported by |
Returns an enve.TRIBStest object.
Luis M. Rodriguez-R [aut, cre]
Test of significance of overclustering or overdispersion in a selected
set of objects with respect to the entire set (see enve.TRIBS).
This object can be produced by enve.tribs.test and supports S4
methods plot and summary.
pval.gt(numeric)
P-value for the overdispersion test.
pval.lt(numeric)
P-value for the overclustering test.
all.dist(numeric)
Empiric PDF of distances for the entire dataset (subsampled at selection
size).
sel.dist(numeric)
Empiric PDF of distances for the selected objects (without subsampling).
diff.dist(numeric)
Empiric PDF of the difference between all.dist and sel.dist.
The p-values are estimating by comparing areas in this PDF greater than and
lesser than zero.
dist.mids(numeric)
Midpoints of the empiric PDFs of distances.
diff.mids(numeric)
Midpoints of the empiric PDF of difference of distances.
call(call)
Call producing this object.
Luis M. Rodriguez-R [aut, cre]
Removes the n highest and lowest values from a vector, and applies
summary function. The value of n is determined such that the central
range is used, corresponding to the f fraction of values.
enve.truncate(x, f = 0.95, FUN = mean)enve.truncate(x, f = 0.95, FUN = mean)
x |
A vector of numbers. |
f |
The fraction of values to retain. |
FUN |
Summary function to apply to the vectors. To obtain the
truncated vector itself, use |
Returns the summary (FUN) of the truncated vector.
Luis M. Rodriguez-R [aut, cre]
This data set provides time (first column) and three triplicated growth curves as optical density at 600nm (OD_600nm) for different mutants of E. coli.
growth.curvesgrowth.curves
A data frame with 16 rows (times) and 10 rows (times and OD_600nm).
This data set gives the counts of phyla in three different sites.
phyla.countsphyla.counts
A data frame with 9 rows (phyla) and 4 rows (sites).
Plots an enve.GrowthCurve object.
## S3 method for class 'enve.GrowthCurve' plot( x, col, samples, pt.alpha = 0.9, ln.alpha = 1, ln.lwd = 1, ln.lty = 1, band.alpha = 0.4, band.density = NULL, band.angle = 45, xp.alpha = 0.5, xp.lwd = 1, xp.lty = 1, pch = 19, new = TRUE, legend = new, add.params = FALSE, ... )## S3 method for class 'enve.GrowthCurve' plot( x, col, samples, pt.alpha = 0.9, ln.alpha = 1, ln.lwd = 1, ln.lty = 1, band.alpha = 0.4, band.density = NULL, band.angle = 45, xp.alpha = 0.5, xp.lwd = 1, xp.lty = 1, pch = 19, new = TRUE, legend = new, add.params = FALSE, ... )
x |
An |
col |
Base colors to use for the different samples. Can be recycled. By default, grey for one sample or rainbow colors for more than one. |
samples |
Vector of sample names to plot. By default: plot all samples. |
pt.alpha |
Color alpha for the observed data points, using |
ln.alpha |
Color alpha for the fitted growth curve, using |
ln.lwd |
Line width for the fitted curve. |
ln.lty |
Line type for the fitted curve. |
band.alpha |
Color alpha for the confidence interval band of the
fitted growth curve, using |
band.density |
Density of the filling pattern in the interval band.
If |
band.angle |
Angle of the density filling pattern in the interval
band. Ignored if |
xp.alpha |
Color alpha for the line connecting individual experiments,
using |
xp.lwd |
Width of line for the experiments. |
xp.lty |
Type of line for the experiments. |
pch |
Point character for observed data points. |
new |
Should a new plot be generated? If |
legend |
Should the plot include a legend? If |
add.params |
Should the legend include the parameters of the fitted model? |
... |
Any other graphic parameters. |
No return value.
Luis M. Rodriguez-R [aut, cre]
Plots an enve.RecPlot2 object.
## S3 method for class 'enve.RecPlot2' plot( x, layout = matrix(c(5, 5, 2, 1, 4, 3), nrow = 2), panel.fun = list(), widths = c(1, 7, 2), heights = c(1, 2), palette = grey((100:0)/100), underlay.group = TRUE, peaks.col = "darkred", use.peaks, id.lim = range(x$id.breaks), pos.lim = range(x$pos.breaks), pos.units = c("Mbp", "Kbp", "bp"), mar = list(`1` = c(5, 4, 1, 1) + 0.1, `2` = c(ifelse(any(layout == 1), 1, 5), 4, 4, 1) + 0.1, `3` = c(5, ifelse(any(layout == 1), 1, 4), 1, 2) + 0.1, `4` = c(ifelse(any(layout == 1), 1, 5), ifelse(any(layout == 2), 1, 4), 4, 2) + 0.1, `5` = c(5, 3, 4, 1) + 0.1, `6` = c(5, 4, 4, 2) + 0.1), pos.splines = 0, id.splines = 1/2, in.lwd = ifelse(is.null(pos.splines) || pos.splines > 0, 1/2, 2), out.lwd = ifelse(is.null(pos.splines) || pos.splines > 0, 1/2, 2), id.lwd = ifelse(is.null(id.splines) || id.splines > 0, 1/2, 2), in.col = "darkblue", out.col = "lightblue", id.col = "black", breaks.col = "#AAAAAA40", peaks.opts = list(), ... )## S3 method for class 'enve.RecPlot2' plot( x, layout = matrix(c(5, 5, 2, 1, 4, 3), nrow = 2), panel.fun = list(), widths = c(1, 7, 2), heights = c(1, 2), palette = grey((100:0)/100), underlay.group = TRUE, peaks.col = "darkred", use.peaks, id.lim = range(x$id.breaks), pos.lim = range(x$pos.breaks), pos.units = c("Mbp", "Kbp", "bp"), mar = list(`1` = c(5, 4, 1, 1) + 0.1, `2` = c(ifelse(any(layout == 1), 1, 5), 4, 4, 1) + 0.1, `3` = c(5, ifelse(any(layout == 1), 1, 4), 1, 2) + 0.1, `4` = c(ifelse(any(layout == 1), 1, 5), ifelse(any(layout == 2), 1, 4), 4, 2) + 0.1, `5` = c(5, 3, 4, 1) + 0.1, `6` = c(5, 4, 4, 2) + 0.1), pos.splines = 0, id.splines = 1/2, in.lwd = ifelse(is.null(pos.splines) || pos.splines > 0, 1/2, 2), out.lwd = ifelse(is.null(pos.splines) || pos.splines > 0, 1/2, 2), id.lwd = ifelse(is.null(id.splines) || id.splines > 0, 1/2, 2), in.col = "darkblue", out.col = "lightblue", id.col = "black", breaks.col = "#AAAAAA40", peaks.opts = list(), ... )
x |
|
layout |
Matrix indicating the position of the different panels in the layout, where:
Only panels indicated here will be plotted. To plot only one panel simply set this to the number of the panel you want to plot. |
panel.fun |
List of functions to be executed after drawing each panel. Use the
indices in |
widths |
Relative widths of the columns of |
heights |
Relative heights of the rows of |
palette |
Colors to be used to represent the counts matrix, sorted from no hits to the maximum sequencing depth. |
underlay.group |
If TRUE, it indicates the in-group and out-group areas couloured based
on |
peaks.col |
If not |
use.peaks |
A list of |
id.lim |
Limits of identities to represent. |
pos.lim |
Limits of positions to represent (in bp, regardless of |
pos.units |
Units in which the positions should be represented (powers of 1,000 base pairs). |
mar |
Margins of the panels as a list, with the character representation of
the number of the panel as index (see |
pos.splines |
Smoothing parameter for the splines in the position histogram. Zero
(0) for no splines. Use |
id.splines |
Smoothing parameter for the splines in the identity histogram. Zero
(0) for no splines. Use |
in.lwd |
Line width for the sequencing depth of in-group matches. |
out.lwd |
Line width for the sequencing depth of out-group matches. |
id.lwd |
Line width for the identity histogram. |
in.col |
Color associated to in-group matches. |
out.col |
Color associated to out-group matches. |
id.col |
Color for the identity histogram. |
breaks.col |
Color of the vertical lines indicating sequence breaks. |
peaks.opts |
Options passed to |
... |
Any other graphic parameters (currently ignored). |
Returns a list of enve.RecPlot2.Peak objects (see
enve.recplot2.findPeaks). If peaks.col=NA or
layout doesn't include 4, returns NA.
Luis M. Rodriguez-R [aut, cre]
Plot an enve.TRIBS object.
## S3 method for class 'enve.TRIBS' plot( x, new = TRUE, type = c("boxplot", "points"), col = "#00000044", pt.cex = 1/2, pt.pch = 19, pt.col = col, ln.col = col, ... )## S3 method for class 'enve.TRIBS' plot( x, new = TRUE, type = c("boxplot", "points"), col = "#00000044", pt.cex = 1/2, pt.pch = 19, pt.col = col, ln.col = col, ... )
x |
|
new |
Should a new canvas be drawn? |
type |
Type of plot. The points plot shows all the replicates, the
boxplot plot represents the values found by
|
col |
Color of the areas and/or the points. |
pt.cex |
Size of the points. |
pt.pch |
Points character. |
pt.col |
Color of the points. |
ln.col |
Color of the lines. |
... |
Any additional parameters supported by |
No return value.
Luis M. Rodriguez-R [aut, cre]
Plots an enve.TRIBStest object.
## S3 method for class 'enve.TRIBStest' plot( x, type = c("overlap", "difference"), col = "#00000044", col1 = col, col2 = "#44001144", ylab = "Probability", xlim = range(attr(x, "dist.mids")), ylim = c(0, max(c(attr(x, "all.dist"), attr(x, "sel.dist")))), ... )## S3 method for class 'enve.TRIBStest' plot( x, type = c("overlap", "difference"), col = "#00000044", col1 = col, col2 = "#44001144", ylab = "Probability", xlim = range(attr(x, "dist.mids")), ylim = c(0, max(c(attr(x, "all.dist"), attr(x, "sel.dist")))), ... )
x |
|
type |
What to plot. |
col |
Main color of the plot if type= |
col1 |
First color of the plot if type= |
col2 |
Second color of the plot if type= |
ylab |
Y-axis label. |
xlim |
X-axis limits. |
ylim |
Y-axis limits. |
... |
Any other graphical arguments. |
No return value.
Luis M. Rodriguez-R [aut, cre]
Summary of an enve.GrowthCurve object.
## S3 method for class 'enve.GrowthCurve' summary(object, ...)## S3 method for class 'enve.GrowthCurve' summary(object, ...)
object |
An |
... |
No additional parameters are currently supported. |
No return value.
Luis M. Rodriguez-R [aut, cre]
Summary of an enve.TRIBS object.
## S3 method for class 'enve.TRIBS' summary(object, ...)## S3 method for class 'enve.TRIBS' summary(object, ...)
object |
|
... |
No additional parameters are currently supported. |
No return value.
Luis M. Rodriguez-R [aut, cre]
Summary of an enve.TRIBStest object.
## S3 method for class 'enve.TRIBStest' summary(object, ...)## S3 method for class 'enve.TRIBStest' summary(object, ...)
object |
|
... |
No additional parameters are currently supported. |
No return value.
Luis M. Rodriguez-R [aut, cre]