getMatricesPhasedSNP: Generate the matrices C, W and M from a set of parameters.

Description Usage Arguments Value Examples

Description

This is a generic function to generate the matrices of the linear system (see the paper) from the allele counts and the copy number information.

Usage

1
2
getMatricesPhasedSNP(varcounts_snv, refcounts_snv, major_cn, minor_cn,
  varcounts_snp, refcounts_snp, context, LocusCoverage = FALSE)

Arguments

varcounts_snv

A count of alleles supporting the variant sequence of the somatic mutation

refcounts_snv

A count of alleles supporting the reference sequence of the somatic mutation

major_cn

major copy number at the locus of the mutation

minor_cn

minor copy number at the locus of the mutation

varcounts_snp

A count of alleles supporting the variant sequence of the Germline SNP

refcounts_snp

A count of alleles supporting the reference sequence of the Germline SNP

context

represents either the situation of a mutation which occurred after the CNV ("C1") or the context of a mutation which occurred before the CNV ("C2"). If not provided, the right context will be estimated from the input

LocusCoverage

when set to TRUE, the SNV locus coverage is estimated to the average coverage of the phased SNP and the variant allele fraction is the ratio of the variant allele count over the estimated locus coverage.

Value

the matrices W, C and M for the linear system of prevalence computation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
Matrices = getMatricesPhasedSNP(3, 10,2,1,8,5,"C1")

print(Matrices)
#$context
#[1] "C1"
#
#$W
#          SNP       SNV
#SNP 0.6153846 0.0000000
#SNV 0.0000000 0.2307692
#
#$M
#    Germ Alt Both
#SNP    1   2    2
#SNV    0   0    1
#
#$C
#    Germ Alt Both
#SNP    2   3    3
#SNV    2   3    3

chedonat/OncoPhase documentation built on May 13, 2019, 3:39 p.m.