CARMA: Calculate CARMA scores

Description Usage Arguments Details Value Source Examples

View source: R/CARMA.R View source: R/CARMA 2.R

Description

This is the main function in the CARMA package. The main input to the function is a list of segmented integer copy number profiles. The CARMA function calculates six CARMA scores within each defined genomic region.

Usage

1
CARMA(segment.list, region.type = c("arm", "chrom", "bin"), bin.width = 5 * 10^7, overlap = T, hg.version = c("hg38","hg19"), gender = NULL, exclude.x.chrom = T, normalization.set = NULL)

Arguments

segment.list

a list containing data frames with segmented integer copy number data. See head(test.data[[1]]) for the format of the copy number data. The data frames shold contain 5 columns: chromosome, start position, end position, copynumber in major allele and copy number in minor allele.

region.type

the type of region in which CARMA scores are to be calculated: "arm", "crom" or "bin" corresponding to chromosome arm, whole chromosome or bin. Default set to "arm".

bin.width

the width of the bin region. Only used if region.type="bin".

overlap

if overlap=TRUE, segments within a chromosome arm will overlap to fit within the chromosome arm. If overlap=FALSE, each bin will widen out or be trimmed a little bit relative the defined bin width to fit the chromosome arm. Only used if region.type="bin".

hg.version

the build version: "hg38" or "hg19". Default set to "hg38".

gender

a character vector of length samples giving gender. If gender="male", the functions calculating AMP and DEL will correct for an expected lower value for the X chromosome in segments covering the X chromosome. This is done by dividing the ploidy by 2 when calculating AMP and DEL in these segments. If gender=NULL female gender is assumed.

exclude.x.chrom

if exclude.x.chrom=TRUE, the X chromosome is excluded from the analysis.

normalization.set

if normalization.set=NULL the dataset currently being analyzed is used for normalization. Optionally a different set of CARMA scores can be used as a normalization set. The format of the data would then be the direct output of the CARMA function.

Details

For more details about the algorithm see linked paper under source.

Value

A list containing six objects:

raw_regional_CARMA_scores

A list containing raw regional CARMA scores.

raw_genome_wide_CARMA_scores

A list containing raw aggregated genome wide CARMA scores.

normalized_regional_CARMA_scores

A list containing normalized regional CARMA scores.

normalized_genome_wide_CARMA_scores

A list containing normalized aggregated genome wide CARMA scores.

start_stop_per_region

A data frame containing start and end positions of CARMA regions.

parameters

A list containing the input parameters used when running the CARMA function.

Source

http://biorxiv.org/lookup/doi/10.1101/769356

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Format of input copy number profiles
head(test.data[[1]])

# Calculate CARMA scores per chromosome arm
carma.res <- CARMA(test.data, region.type="arm", hg="hg19")

# Calculate CARMA scores per whole chromosome
carma.res <- CARMA(test.data, region.type="chrom", hg="hg19")

# Calculate CARMA scores within 3*10^7 base pairs long regions
carma.res <- CARMA(test.data, region.type="bin", bin.width=3*10^7, hg="hg19")

arnevpladsen/CARMA documentation built on Dec. 19, 2021, 4:39 a.m.