computes the partial transcriptome evolutionary index (TEI) values combined into strata
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)
psgroup <- sort(unique(ps))
## get pStrata
rcpp_pStrata_parallel(spmat, ps, psgroup)
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 0.39295331 0.39353082 0.41421061 0.41153988 0.42168061 0.41783018
#> [2,] 0.55914875 0.56125250 0.56064163 0.55594427 0.54154068 0.51070341
#> [3,] 0.09817938 0.09291830 0.08275821 0.08814585 0.09169432 0.09019669
#> [4,] 0.33590159 0.33335787 0.32614435 0.33717297 0.33268496 0.34456426
#> [5,] 0.16656429 0.16792339 0.15234382 0.15726786 0.15927610 0.18987539
#> [6,] 0.25872990 0.26813378 0.24458170 0.24677547 0.25514358 0.26917571
#> [7,] 0.06513175 0.05682826 0.05105236 0.05618130 0.05530130 0.05528356
#> [8,] 0.06511643 0.06180498 0.05601089 0.05588683 0.05442226 0.07020109
#> [9,] 0.09219381 0.09370185 0.09456557 0.08935340 0.07978112 0.09354879
#> [10,] 0.38766762 0.40666192 0.36664326 0.33649918 0.31130963 0.33833215
#> [11,] 0.06843326 0.07179705 0.06151227 0.06330899 0.06232254 0.06249801
#> [12,] 0.73992167 0.71770319 0.69667019 0.71861745 0.70883635 0.73430205
#> [,7]
#> [1,] 0.38838151
#> [2,] 0.47780681
#> [3,] 0.10601483
#> [4,] 0.39341385
#> [5,] 0.21135880
#> [6,] 0.34374736
#> [7,] 0.07450933
#> [8,] 0.08259620
#> [9,] 0.10997873
#> [10,] 0.32646984
#> [11,] 0.08185437
#> [12,] 0.79420194