Operations

 

1.  Compute the average fold change and standard deviation for all genes in the comparison.

2.  Compute a normalized p-value (NPV) for each gene in the comparison, based on its fold change (fc) value, and the above average (ave) and standard deviation (std) values.  Use a normal distribution function (CDF):

  if (fc > 0) 

      NPV = 1.0 - CDF(fc, ave, std)

  else

      NPV = 1.0 - CDF(-fc, ave, std)

  if NPV < 1.0e-15, set to 1.0e-15

 

3.  For each gene in the gene signature, list, or pathway, search against experimental comparisons and extract those comparisons where the gene’s normalized p-value is less than 0.05. This returns a comparison list.

4.  Iterate through the comparison list. For each comparison (C), add the normalized p-value to one of two arrays of sums (pv_sum), as follows:

□    For gene signatures and gene lists, add the gene’s normalized p-value to:

●    pv_sum(C, up) if the gene’s fold change in the signature (svc) and in the comparison (cfc) are co-regulated.

●    pv_sum(C, down) if the gene’s fold change in the signature and in the comparison are anti-regulated.

□    For pathways, add the gene’s normalized p-value to:

●    pv_sum(C, up) if the gene’s comparison fold change (cfc) is up-regulated.

●    pv_sum(C, down) if the gene’s comparison fold change is down-regulated.

Also, use the logarithm of the normalized p-value to make the final TEA score more human readable:

if (gene_signature OR gene_list)

   if ( (sfc > 0 AND cfc > 0) OR (sfc < 0 AND cfc < 0) )

       pv_sum(C, up) += -Math.log(NPV)

       pv_count(C, up)++

     else

       pv_sum(C, down) += -Math.log(NPV)

       pv_count(C, down)++

 

if (gene_pathway)

   if (cfc > 0)

          pv_sum(C, up) += -Math.log(NPV)

          pv_count(C, up)++

        else

       pv_sum(C, down) += -Math.log(NPV)

       pv_count(C, down)++

 

5.  Compute the min-LogP average (pv_ave) for each sum:

pv_ave(C, up) = Math.exp(-pv_sum(C,up) / pv_count(C,up) )

pv_ave(C, down) = Math.exp(-pv_sum(C,down) / pv_count(C,down) )

 

6.  Compute a TEA score (pv_tea) for each min-LogP average through a binomial distribution function:

   pv_tea(C, up) = 1.0 - Binom( N, pv_count(C,up), pv_ave(C,up) )

   pv_tea(C, down) = 1.0 - Binom( N, pv_count(C,down), pv_ave(C,down) )