Learn R Programming

gQTLBase (version 1.4.2)

ufeatByTiling: split featurenames of SummarizedExperiment according to tiling, or to achieve simple balance within seqnames

Description

split featurenames of SummarizedExperiment according to tiling, without redundancies

Usage

ufeatByTiling(se, tiling, maxlen=20)
balancedFeatList(se, maxlen=20)

Arguments

se
instance of SummarizedExperiment
tiling
GRanges instance corresponding to a genomic tiling
maxlen
numeric ... list elements longer than maxlen are chopped up to have this length, to foster load balancing

Value

  • a list with elements of names(rowRanges(se)) corresponding to the elements of the tiling

Details

ufeatByTiling uses findOverlaps, balancedFeatList uses split on seqnames and BBmisc::chunk

Examples

Run this code
library(geuvPack)
data(geuFPKM)
library(Homo.sapiens)
au = paste0("chr", 1:22)
tg_500k = tileGenome(seqinfo(TxDb(Homo.sapiens))[au,], tilewidth=500000,
  cut.last.tile.in.chrom=TRUE)
sn = ufeatByTiling(geuFPKM, tg_500k)
summary(sapply(sn,length))
sn2 = balancedFeatList(geuFPKM)
summary(sapply(sn2,length))

Run the code above in your browser using DataLab