segs2Rle {genoset} | R Documentation

## Make Rle from segments for one sample

### Description

Take output of CBS, make Rle representing all features in 'locs' ranges. CBS output contains run length and run values for genomic segmetns, which could very directly be converted into a Rle. However, as NA values are often removed, especially for mBAF data, these run lengths do not necessarily cover all features in every sample. Using the start and top positions of each segment and the location of each feature, we can make a Rle that represents all features.

### Usage

    segs2Rle(segs, locs)

### Arguments

`segs` | data.frame of segments, formatted as output of segment function from DNAcopy package
`locs` | GenomicRanges, like rowRanges slot of a GenoSet

### Value

Rle with run lengths and run values covering all features in the data set.

### See Also

Other 'segmented data': `bounds2Rle`, `rangeSegMeanLength`, `runCBS`, `segPairTable`, `segTable`, `segs2Granges`, `segs2RleDataFrame`

### Examples

      data(genoset,package='genoset')
      segs = runCBS( genoset.ds[, , 'lrr'], rowRanges(genoset.ds), return.segs=TRUE )
      segs2Rle( segs[[1]], rowRanges(genoset.ds) )  # Take a data.frame of segments, say from DNAcopy's segment function, and make Rle's using probe locations in the locs

[Package genoset version 1.45.1 Index]