sharedness: Sharedness Score

Description Usage Arguments Details Value Author(s) Examples

View source: R/sharedness.R

Description

The sharedness score computes the strength of sharedness of hit genes among the conditions.

Usage

1
sharedness(fit, threshold = 0.2, na.action = "na.omit")

Arguments

fit

data frame returned by the pmm function.

threshold

threshold for the false discovery rate. Genes are counted as hits if they are below this threshold. Default is 0.2.

na.action

a function that indicates what happens if fit contains NAs. There are two options: "na.omit" (default) or "use". In the case of "na.omit" the sharedness score is applied to na.omit(fit) and in the other case the sharedness score is adapted for each gene to the number of conditions without NA.

Details

The sharedness score is a combination of two quantities:

sh_g = 1/2 ( (1 - mean(fdr_cg)) + sum (fdr_cg < 1) )


The first part defines the shift away from 1 and the second part describes how many pathogens support the shift (proportion of FDRs < 1).

Value

The score returns a value between 0 and 1 for each gene. Score 0 indicates that a gene is not shared among the condition and score 1 that the gene is significant among all conditions.

Author(s)

Anna Drewek <adrewek@stat.math.ethz.ch>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(kinome)
fit <- pmm(kinome,"InfectionIndex","weight_library")
sh <- sharedness(fit, threshold = 0.2)
head(sh)

## NA-Handling
kinome$InfectionIndex[kinome$GeneID == 132158 & kinome$condition ==
"ADENO"] <- rep(NA,12)
fit <- pmm(kinome,"InfectionIndex","weight_library")
## Sharedness score for genes present in all conditions
sh <- sharedness(fit, threshold = 0.2, na.action = "na.omit")
head(sh)
## Sharedness score for all significant genes
sh <- sharedness(fit, threshold = 0.2, na.action = "use")
head(sh)

pmm documentation built on Nov. 8, 2020, 6:55 p.m.