covariate | R Documentation |
function to initialize Covariates for passing to Chromunity object constructor.
Can also be initiated by passing a vector of multiple vectors of equal length, each representing one of the internal variable names You must also include a list containg all of the covariates (Granges, chracters, RLELists, ffTracks)
Covariate serves to mask the underlieing list implemenations of Covariates in the Chromunity Object. This class attempts to mimic a vector in terms of subsetting and in the future will add more vector like operations.
covariate(
data = NULL,
field = as.character(NA),
name = as.character(NA),
log = TRUE,
count = TRUE,
pad = 0,
type = as.character(NA),
signature = as.character(NA),
na.rm = NA,
grep = NA
)
data |
a list of covariate data that can include any of the covariate classes (GRanges, ffTrack, RleList, character) |
field |
a chracter vector for use with numeric covariates (NA otherwise) the indicates the column containing the values of that covarites. For example, if you have a covariate for replication timing and the timings are in the column 'value', the parameter field should be set to the character 'Value' |
name |
character vector Contains names of the covariates to be created, this should not include the names of any Cov objects passed |
log |
logical flag whether to log output for numeric covariate after averaging [TRUE] |
count |
logical flag whether to count the number of intervals (count = TRUE) or aggregate the width (count = FALSE) [TRUE] |
pad |
numeric vector Indicates the width to extend each item in the covarite. e.g. if you have a GRanges covariate with two ranges (5:10) and (20:30) with a pad of 5, These ranges wil become (0:15) and (15:35) |
type |
character vector Contains the types of each covariate (numeric, interval, sequencing) |
signature |
see ffTrack, a vector of signatures for use with ffTrack sequence covariates fftab signature: signatures is a named list that specify what is to be tallied. Each signature (ie list element) consist of an arbitrary length character vector specifying strings to or length 1 character vector to grepl (if grep = TRUE) or a length 1 or 2 numeric vector specifying exact value or interval to match (for numeric data) Every list element of signature will become a metadata column in the output GRanges specifying how many positions in the given interval match the given query |
na.rm |
logical vector that indicates whether or not to remove nas in the covariates |
grep |
a chracter vector of grep for use with sequence covariates of class ffTrack The function fftab is called during the processing of ffTrack sequence covariates grep is used to specify inexact matches (see fftab) |
Covariate object that can be passed directly to the Chromunity object constructor
Zoran Z. Gajic
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.