subsetByCNVprofile {AneuFinder} | R Documentation

## Get IDs of a subset of models

### Description

Get the IDs of models that have a certain CNV profile. The result will be `TRUE` for models that overlap all specified ranges in `profile` by at least one base pair with the correct state.

### Usage

    subsetByCNVprofile(hmms, profile)

### Arguments

`hmms` | A list of `aneuHMM` objects or a character vector with files that contain such objects.
`profile` | A `GRanges-class` object with metadata column 'expected.state' and optionally columns 'expected.mstate' and 'expected.pstate'.

### Value

A named logical vector with `TRUE` for all models that are concordant with the given `profile`.

### Examples

    ## Get results from a small-cell-lung-cancer
    lung.folder <- system.file("extdata", "primary-lung", "hmms", package="AneuFinderData")
    lung.files <- list.files(lung.folder, full.names=TRUE)
    ## Get all files that have a 3-somy on chromosome 1 and 4-somy on chromosome 2
    profile <- GRanges(seqnames=c('1','2'), ranges=IRanges(start=c(1,1), end=c(195471971,182113224)),
                      expected.state=c('3-somy','4-somy'))
    ids <- subsetByCNVprofile(lung.files, profile)
    print(which(ids))

[Package AneuFinder version 1.8.0 Index]