compute_snv_clonality: Function to compute clonality of SNVs

Description Usage Arguments Value Author(s) Examples

View source: R/CLONETv2_compute_snv_clonality.R

Description

This function takes as input the genomic position of a SNVs and computes the percentage of genomic homogeneus cells harboring the mutation.

Usage

1
2
3
compute_snv_clonality(sample_id, snv_read_count, beta_table, ploidy_table,
  admixture_table, error_tb = error_table, error_rate = 0.05,
  n_digits = 3, n_cores = 1, annotation_style = "VEP", debug = F)

Arguments

sample_id

the id of the analyzed sample. It must be the same value reported in column sample of tables beta_table, ploidy_table, and admixture_table

snv_read_count

data.frame reporting in each row the genomic coordinates of an SNV together with number of reference and alternative reads covering the position in columns rc_ref_tumor and rc_alt_tumor, respectively. See parameter annotation_style for details about column names

beta_table

data.frame formatted as the output of function compute_beta_table

ploidy_table

data.frame formatted as the output of function compute_ploidy

admixture_table

data.frame formatted as the output of function compute_dna_admixture

error_tb

data.frame that reports for each combination of coverage and number informative SNPs the expected estimation error around beta. The data.frame error_tb must contains 3 columns:

mean.cov

mean coverage

n.info.snps

number of informative SNPs

adm.estimation.error

estimated error on computed beta on a segment with coverage mean.cov and n.info.snps informative SNPs

Package CLONETv2 have built in error_tb named error_table (default=error_table)

error_rate

expected fraction of SNV positions with outlier variant allelic fraction (default=0.05)

n_digits

number of digits in the output table (default=3)

n_cores

number of cores (default=1)

annotation_style

a string that corresponds to the format of the columns that describe the genomic coordinates of a SNV. Accepted values are VEP and MAF. VEP annotation describes genomic coordinates with a single column named Location. MAF format has columns Chromosome, Start_position, and End_position for each aberrant position

debug

return extra columns for debugging (default=F)

Value

A data.frame that extends input table snv_read_count with columns sample, cnA, cnB, t_af, t_af_corr, SNV.clonality, and SNV.clonality.status. Columns cnA and cnB report the allele specific copy number of the genomic segment containing the SNV position. Columns t_af and t_af_corr are respectively raw and ploidy/purity adjusted tumor varian allelic fractions. SNV.clonality reports the percentage of tumor cells harboring the SNV and with allele specific copy number cnA and cnB. SNV.clonality.status column lists dicretized SNV.clonality values. Discrete states are clonal, uncertain.clonal, uncertain.subclonal, and subclonal based in threshold automatically computed on the SNV.clonality values. Empty SNV.clonality.status of an SNV indicates that clonality cannot be assessed.

Author(s)

Davide Prandi, Tarcisio Fedrizzi

Examples

1
2
3

CLONETv2 documentation built on May 20, 2019, 5:02 p.m.