computes the phylogenetically based transcriptome evolutionary index (TEI)

rcpp_tei_parallel(expression, ps, ncores = 1L)

Arguments

expression

ExpressionSet as sparseMatrix

ps

named Phylostratum

ncores

number of cores

Value

list

Author

Kristian K Ullrich

Examples

## load example PhyloExpressionSetExample

data("PhyloExpressionSetExample", package="myTAI")

## convert into sparseMatrix - rownames GeneID

spmat <- as(data.matrix(PhyloExpressionSetExample[,-c(1,2)]),
    "sparseMatrix")
rownames(spmat) <- PhyloExpressionSetExample$GeneID

## create named Phylostratum vector

ps <- setNames(PhyloExpressionSetExample$Phylostratum,
    PhyloExpressionSetExample$GeneID)

## get TEI
rcpp_tei_parallel(spmat, ps)
#> $sumx
#> [1] 60413160 59665009 57246260 55866953 55152111 57140339 63197410
#> 
#> $teisum
#> [1] 195130989 192456282 177871849 174120165 169537228 181506933 214260302
#> 
#> $tei
#> [1] 3.229942 3.225614 3.107135 3.116693 3.073993 3.176511 3.390334
#>