The function evaluates a score about loss of heterozygosity and allelic fraction for each block. It generates specific information about the variants in the block, like the number of homozygotes or heterozygotes. In the case of RNA-seq, the blocks are genes.

tableBlockAF(snpPos)

Arguments

snpPos

a data.frame with lower allelic fraction (lap) for the SNVs with coverage > minCov, for a specific chromosome.

Value

a data.frame containing only heterozygote SNV information. The data.frame contain those columns:

block

a single integer representing the unique identifier of the block.

aRF

a single numeric representing the final allelic fraction; not computed yet, -1 value assigned to all entries.

aFraction

a single integer representing the possible allelic fraction in absence of loss of heterozygosity (LOH).

lR

a single integer representing the coverage for the alternative allele.

nPhase

a single integer representing the number of SNV phases.

sumAlleleLow

a single integer representing the sum of the alleles with the less coverage.

sumAlleleHigh

a single integer representing the sum of the alleles with more coverage.

lH

a single numeric for the homozygotes log10 of the product frequencies of the allele not found in the profile (not a probability).

lM

a single numeric log10 product frequency allele in population.

lRhomo

a single numeric representing the score lH - lM.

nbHomo

a single integer representing the number of homozygote SNVs per block.

nbKeep

a single integer representing the number of SNVs retained per block.

nbHetero

a single integer representing the number of heterozygote SNVs per block.

Author

Pascal Belleau, Astrid Deschênes and Alexander Krasnitz

Examples


## Loading demo dataset containing SNV information
data(snpPositionDemo)

## Retain SNVs on chromosome 1
subset <- snpPositionDemo[which(snpPositionDemo$snp.chr == 1),]

##Compile the information about the SNVs for each block
result <- RAIDS:::tableBlockAF(subset)
head(result)
#>        block nbHomo nbKeep nbHetero aRF  aFraction         lR nPhase
#> block   3833      0      1        1  -1 -1.0000000 -1.0000000     -1
#> block1  3834      1      1        0  -1 -1.0000000 -1.0000000     -1
#> block2  2693      2      4        2  -1  0.4166667  0.2908852      0
#> block3  2750     25     29        4  -1  0.3389831  4.0578619      0
#> block4  2714      7      7        0  -1 -1.0000000 -1.0000000     -1
#> block5  2689      8      8        0  -1 -1.0000000 -1.0000000     -1
#>        sumAlleleLow sumAlleleHigh          lH          lM        lRhomo
#> block            -1            -1  1.00000000  1.00000000  0.000000e+00
#> block1            0           544 -0.03545753 -0.03545753 -2.081668e-17
#> block2           20            28  1.00000000  1.00000000  0.000000e+00
#> block3           60           117  1.00000000  1.00000000  0.000000e+00
#> block4            0           112 -0.10612196 -0.05374429 -5.237766e-02
#> block5            0           136 -1.16008188 -0.53606843 -6.240135e-01