fftab | R Documentation |
ffTrack
Tabulates data in ffTrack file across a set of intervals (GRanges) by counting the number of positions matching a given "signature" or applying FUN to aggregate data. Returns the input GRanges populated with one or more meta data columns of counts or averages.
Similar to gr.val in gUtils
ff can be an ffTrack but also an RleList from same genome as intervals.
returns a GRanges with additional columns for metadata counts
fftab(ff, intervals, signatures = NULL, FUN = sum, grep = FALSE, mc.cores = 1, chunksize = 1e+06, verbose = TRUE, na.rm = TRUE)
ff |
ffTrack or RleList to pull data from |
intervals |
intervals |
signatures |
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 |
FUN |
function to aggregate with (default is sum) |
grep |
logical flag (default FALSE), if TRUE will treat the strings in signature as inputs to grep (instead of exact matches if FALSE) |
mc.cores |
how many cores (default 1) |
chunksize |
chunk of FF to bring into memory (i.e. the width of interval), decrease if memory becomes an issue |
verbose |
logical flag |
na.rm |
logical flag whether to remove na during aggregation. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.