TestCNV-ExomeDepth-method: TestCNV

TestCNV,ExomeDepth-methodR Documentation

TestCNV

Description

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

Usage

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

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.

Value

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

Examples

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')


ExomeDepth documentation built on Nov. 3, 2022, 5:05 p.m.