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.8440 0.2094  -0.3476  0.9996   0.7660 0.4102 -0.5358 0.9280
    #> SRR1039509  -0.4926 0.0442  -0.6540  0.9998   0.4892 0.3090 -0.4454 0.8786
    #> SRR1039512  -0.7886 0.2108  -0.4052  0.9996   0.6914 0.4016 -0.4240 0.9196
    #> SRR1039513  -0.4516 0.0594  -0.6786  0.9996   0.6940 0.4378 -0.4680 0.7966
    #> SRR1039516  -0.7684 0.2568  -0.2960  0.9988   0.6222 0.4118 -0.3304 0.9184
    #> SRR1039517  -0.4978 0.5642  -0.6722  0.9998   0.4624 0.7264 -0.3828 0.8124
    #> SRR1039520  -0.8050 0.3280  -0.3772  0.9998   0.6070 0.5552 -0.6424 0.9014
    #> SRR1039521  -0.3268 0.1174  -0.6638  0.9994   0.4930 0.5650 -0.6258 0.7832
    #>               PI3K   TGFb    TNFa   Trail    VEGF     WNT
    #> SRR1039508  0.1524 0.5458 -0.5788 -0.3492  0.0898 -0.1296
    #> SRR1039509  0.0728 0.7718 -0.4614 -0.3086  0.0564 -0.1560
    #> SRR1039512  0.1384 0.6948 -0.4682 -0.3206  0.0764 -0.1864
    #> SRR1039513 -0.0554 0.8104 -0.4888 -0.2280  0.0988 -0.2950
    #> SRR1039516  0.1616 0.6830 -0.3740 -0.3558  0.2764 -0.3092
    #> SRR1039517  0.3838 0.8642 -0.4246 -0.3550  0.2438 -0.4128
    #> SRR1039520  0.1564 0.6950 -0.6794 -0.2752 -0.0968 -0.1134
    #> SRR1039521  0.0144 0.8262 -0.6468 -0.2612 -0.0780 -0.3178