Learn R Programming

ExomeDepth (version 1.1.16)

TestCNV,ExomeDepth-method: TestCNV

Description

Computes the Bayes Factor in favour of a CNV defined by position and type.

Usage

# S4 method for ExomeDepth
TestCNV(x, chromosome, start, end, type)

Value

A single numeric value that is the log likelihood ratio in favour of a call present at this location.

Arguments

x

ExomeDepth object

chromosome

Character, chromosome name.

start

Numeric, start of the tested CNV

end

Numeric, end of the tested CNV

type

Character, must be either deletion or duplication.

Examples

Run this code
data(ExomeCount)
ExomeCount <- ExomeCount[1:500,] ## small for the purpose of this test
ref_counts <- ExomeCount$Exome2 + ExomeCount$Exome3 + ExomeCount$Exome4

## creates a simple ExomeDepth object
## Note that I include the positions here (GRanges format)
## This is necessary for TestCNV to work
test_object <- new('ExomeDepth', test = ExomeCount$Exome1,
                                 reference = ref_counts,
                                 positions = ExomeCount)

## A positive control first
TestCNV (test_object, chromosome = 'chr1', start = 1387428, end = 1405539, type = 'deletion')

## And a region without evidence of call
TestCNV (test_object, chromosome = 'chr1', start = 987428, end = 1005539, type = 'deletion')

Run the code above in your browser using DataLab