Compute progeny pathway scores and assesses significance based on permutations — progenyPerm • progeny

# Compute progeny pathway scores and assesses significance based on permutations

Source: `R/progenyPermutations.r`
`progenyPerm.Rd`

Compute progeny pathway scores and assesses significance based on permutations

    progenyPerm(
      df,
      weight_matrix,
      k = 10000,
      z_scores = TRUE,
      get_nulldist = FALSE
    )

## Arguments

df | A data.frame of n*m+1 dimension, where n is the number of omic features to be considered and m is the number of samples/contrasts. The first column should be the identifiers of the omic features. These identifiers must be coherent with the identifiers of the weight matrix.
weight_matrix | A progeny coefficient matrix. the first column should be the identifiers of the omic features and should be coherent with the identifiers provided in df.
k | The number of permutations to be performed to generate the null-distribution used to estimate the significance of progeny scores. The default value is 10000.
z_scores | if true, the z-scores will be returned for the pathway activity estimations. Else, the function returns a normalized z-score value between -1 and 1.
get_nulldist | if true, the null score distribution used for normalization will be returned along with the actual normalized score data frame.

## Value

This function returns a list of two elements. The first element is a data frame of p*m+1 dimensions, where p is the number of progeny pathways, and m is the number of samples/contrasts. Each cell represents the significance of a progeny pathway score for one sample/contrast. The significance ranges between -1 and 1. The significance is equal to x*2-1, x being the quantile of the progeny pathway score with respect to the null distribution. Thus, this significance can be interpreted as the equivalent of 1-p.value two-sided test over an empirical distribution) with the sign indicating the direction of the regulation. The second element is the null distribution list (a null distribution is generated for each sample/contrast).

## Examples

    # use example gene expression matrix
    gene_expression <- as.matrix(read.csv(system.file("extdata",
    "human_input.csv", package = "progeny"), row.names = 1))

    # calculate pathway activities
    progeny(gene_expression, scale=TRUE, organism="Human", top=100, perm=10000)
    #>            Androgen   EGFR Estrogen Hypoxia JAK.STAT   MAPK    NFkB    p53
    #> SRR1039508  -0.8362 0.1964  -0.3524  0.9996   0.7756 0.4110 -0.5528 0.9310
    #> SRR1039509  -0.4944 0.0444  -0.6588  0.9996   0.4928 0.3220 -0.4226 0.8852
    #> SRR1039512  -0.7920 0.2006  -0.4054  0.9994   0.7016 0.4058 -0.4318 0.9166
    #> SRR1039513  -0.4322 0.0888  -0.6774  1.0000   0.6672 0.4530 -0.4654 0.7770
    #> SRR1039516  -0.7806 0.2562  -0.3104  0.9996   0.6286 0.4166 -0.3336 0.9198
    #> SRR1039517  -0.5116 0.5476  -0.6676  1.0000   0.4808 0.7268 -0.3894 0.8104
    #> SRR1039520  -0.8042 0.3280  -0.3976  0.9994   0.6168 0.5570 -0.6398 0.9012
    #> SRR1039521  -0.3400 0.1316  -0.6660  1.0000   0.4992 0.5676 -0.6298 0.7804
    #>               PI3K   TGFb    TNFa   Trail    VEGF     WNT
    #> SRR1039508  0.1656 0.5390 -0.5962 -0.3624  0.0566 -0.1118
    #> SRR1039509  0.0828 0.7702 -0.4380 -0.3110  0.0660 -0.1766
    #> SRR1039512  0.1604 0.6970 -0.4774 -0.3114  0.0546 -0.1698
    #> SRR1039513 -0.0630 0.8022 -0.4954 -0.2414  0.0772 -0.2848
    #> SRR1039516  0.1522 0.6836 -0.3830 -0.3382  0.2762 -0.3244
    #> SRR1039517  0.3704 0.8758 -0.4358 -0.3612  0.2562 -0.3990
    #> SRR1039520  0.1596 0.7016 -0.6738 -0.2768 -0.0808 -0.1116
    #> SRR1039521  0.0416 0.8198 -0.6466 -0.2534 -0.0634 -0.3198