initialize-ExomeDepth-method: ExomeDepth initialization tool

initialize,ExomeDepth-methodR Documentation

ExomeDepth initialization tool

Description

Builds an exomeDepth object from test and reference vectors

Usage

## S4 method for signature 'ExomeDepth'
initialize(
  .Object,
  data = NULL,
  test,
  reference,
  formula = "cbind(test, reference) ~ 1",
  phi.bins = 1,
  prop.tumor = 1,
  subset.for.speed = NULL,
  positions = GenomicRanges::GRanges(),
  verbose = TRUE
)

Arguments

.Object

ExomeDepth object

data

Data frame containing potential covariates.

test

Numeric, vector of counts for the test sample.

reference

Numeric, vector of counts for the reference sample.

formula

Linear model to be used when fitting the data.

phi.bins

Numeric, defaults to 1. Number of discrete bins for the over-dispersion parameter phi, depending on read depth. Do not modify this parameter for the standard use of ExomeDepth.

prop.tumor

Numeric, defaults to 1. For the somatic variant calling, this assesses the proportion of the test sample data originating from the tumour. Do not modify this parameter for the standard use of ExomeDepth.

subset.for.speed

Numeric, defaults to NULL. If non-null, this sets the number of data points to be used for an accelerated fit of the data.

positions

Optional GRanges argument specifying the positions of the exons (or DNA regions) where the reads were counted for test and reference.

verbose

Logical, controls the output level.

Value

An ExomeDepth object, which contains the CNV calls after running a Viterbi algorithm.

Examples


data(ExomeCount)  #pick an example count file
small_count <- ExomeCount[1:100, ]  #reduce the size for speedy computations

## remove exons without data below
small_count <- small_count[ small_count$Exome2 + small_count$Exome3 > 0, ]

example_object <- new('ExomeDepth', test = small_count$Exome2,
                                    reference = small_count$Exome3,
                                    formula = 'cbind(test, reference) ~ 1')
print(example_object)
print( mean(example_object@expected)) ## proportion of reads expected to match the test set

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