Usage
"import"(con, format, text, selection = BigWigSelection(which, ...), which = con, asRle = FALSE, as = c("GRanges", "RleList", "NumericList"), ...)
import.bw(con, ...)
"export"(object, con, format, ...)
"export"(object, con, format, dataFormat = c("auto", "variableStep", "fixedStep", "bedGraph"), compress = TRUE, fixedSummaries = FALSE)
export.bw(object, con, ...)
Arguments
con
A path, URL or BigWigFile
object. Connections are
not supported. For the functions ending in .bw
, the file
format is indicated by the function name. For the export
and import
methods, the format must be indicated another
way. If con
is a path, or URL, either the file
extension or the format
argument needs to be bigWig
or bw.
object
The object to export, should be an RleList
,
IntegerList
, NumericList
,
GRanges
or something coercible to a GRanges
.
format
If not missing, should be bigWig or bw
(case insensitive).
as
Specifies the class of the return object. Default is
GRanges
, which has one range per range in the file, and a
score column holding the value for each range. For
NumericList
, one numeric vector is returned for each range in
the selection
argument. For RleList
, there is one
Rle
per sequence, and that Rle
spans the entire
sequence.
asRle
Deprecated. Use as
instead.
If TRUE
, the BigWig file is assumed to contain
contiguous ranges that define a run-length encoding of a
vector (like coverage), and a RleList
is returned.
selection
A BigWigSelection
object
indicating the ranges to load.
which
A range data structure coercible to RangesList
,
like a GRanges
, or a BigWigFile
. Only the intervals in
the file overlapping the given ranges are returned. By default, the
value is the BigWigFile
itself. Its Seqinfo
object is
extracted and coerced to a RangesList
that represents the
entirety of the file.
dataFormat
Probably best left to auto. Exists only
for historical reasons.
compress
If TRUE
, compress the data. No reason to change this.
fixedSummaries
If TRUE
, compute summaries at fixed
resolutions corresponding to the default zoom levels in the Ensembl
genome browser (with some extrapolation): 30X, 65X, 130X, 260X,
450X, 648X, 950X, 1296X, 4800X, 19200X. Otherwise, the resolutions
are dynamically determined by an algorithm that computes an initial
summary size by initializing to 10X the size of the smallest feature
and doubling the size as needed until the size of the summary is
less than half that of the data (or there are no further gains). It
then computes up to 10 more levels of summary, quadrupling the size
each time, until the summaries start to exceed the sequence size.
...
Arguments to pass down to methods to other methods. For
import, the flow eventually reaches the BigWigFile
method on
import
.