keepRelevantChrs {DEScan2} | R Documentation

## keepRelevantChrs

### Description

subselect a list of GRanges created with cutGRangesPerChromosome returning only the relevant chromosomes GRanges.

### Usage

    keepRelevantChrs(chrGRangesList, chr = NULL)

### Arguments

`chrGRangesList` | where each element is a chromosome, tipically created with cutGRangesPerChromosome.
`chr` | a character vector of chromosomes names of the form "chr#".

### Value

the input chrGRangesList with only the relevat chromosomes.

### Examples

    library("GenomicRanges")
    gr1 <- GRanges(
                seqnames=Rle(c("chr1", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)),
                ranges=IRanges(1:10, end=10),
                strand=Rle(strand(c("-", "+", "*", "+", "-")), c(1, 2, 2, 3, 2)),
                seqlengths=c(chr1=11, chr2=12, chr3=13))
    grlc <- cutGRangesPerChromosome(gr1)
    (grlChr <- keepRelevantChrs(grlc, c("chr1", "chr3")))

[Package DEScan2 version 1.2.1 Index]