A BigWigSelection represents a query against a
BigWig file, see import.bw. It is simply
a RangedSelection that requires its colnames
parameter to be "score", if non-empty, as that is the only column
supported by BigWig.
Constructor
BigWigSelection(ranges = GRanges(), colnames =
"score"): Constructs a BigWigSelection with the given
ranges and colnames. ranges can be either
something coercible to a RangesList, a
character identifying a genome (see
GenomicSelection), or a
BigWigFile, in which case the ranges are
derived from the bounds of its sequences.
Coercion
as(from, "BigWigSelection"): Coerces from to a
BigWigSelection object. Typically, from is a
GRanges or
a RangesList, the ranges of
which become the ranges in the
new BigWigSelection.
Author(s)
Michael Lawrence
Examples
rl <- IRanges::RangesList(chr1 = IRanges::IRanges(c(1, 5), c(3, 6)))
BigWigSelection(rl)
as(rl, "BigWigSelection") # same as above
# do not select the 'score' column
BigWigSelection(rl, character())
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(rtracklayer)
Loading required package: GenomicRanges
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomeInfoDb
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/rtracklayer/BigWigSelection-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: BigWigSelection-class
> ### Title: Selection of ranges and columns
> ### Aliases: BigWigSelection-class BigWigSelection
> ### coerce,RangesList,BigWigSelection-method
> ### coerce,GenomicRanges,BigWigSelection-method
> ### Keywords: methods classes
>
> ### ** Examples
>
> rl <- IRanges::RangesList(chr1 = IRanges::IRanges(c(1, 5), c(3, 6)))
>
> BigWigSelection(rl)
An object of class "BigWigSelection"
Slot "ranges":
RangesList of length 1
$chr1
IRanges object with 2 ranges and 0 metadata columns:
start end width
<integer> <integer> <integer>
[1] 1 3 3
[2] 5 6 2
Slot "colnames":
[1] "score"
> as(rl, "BigWigSelection") # same as above
An object of class "BigWigSelection"
Slot "ranges":
RangesList of length 1
$chr1
IRanges object with 2 ranges and 0 metadata columns:
start end width
<integer> <integer> <integer>
[1] 1 3 3
[2] 5 6 2
Slot "colnames":
[1] "score"
>
> # do not select the 'score' column
> BigWigSelection(rl, character())
An object of class "BigWigSelection"
Slot "ranges":
RangesList of length 1
$chr1
IRanges object with 2 ranges and 0 metadata columns:
start end width
<integer> <integer> <integer>
[1] 1 3 3
[2] 5 6 2
Slot "colnames":
character(0)
>
>
>
>
>
> dev.off()
null device
1
>