diff --git a/R/.Rhistory b/R/.Rhistory index 1508702..da7ab81 100644 --- a/R/.Rhistory +++ b/R/.Rhistory @@ -1,12 +1,3 @@ -# labels=c("significant genes in functional module", "size functional module")) + -# geom_point() + -# theme_light( -# ) + -# theme(text = element_text(color = "black",size=20), -# legend.title = element_blank(), -# legend.background = element_rect(fill = "NA",color = "black"), -# #legend.position = c(0.68, 0.15), # position the legend in the upper left -# legend.position = c("bottom"), # legend.direction = "horizontal", # legend.text = element_text(size = 20, color = "black"), # ) @@ -510,3 +501,12 @@ pValuesRaw <- read.csv("./inst/extdata/examplePvalues.csv") pValues <- pValuesRaw$pVal pValuesRaw$gene toupper(pValuesRaw$gene) +pValuesRaw <- read.csv("./inst/extdata/examplePvalues.csv") +pValues <- pValuesRaw$pVal +names(pValues) <- pValuesRaw$gene +pValues<0 +sum(pValues<0) +sum(pValues<0) + sum(pValues>1) +checksum +warning('p-values are not in (0,1]!') +warning('p-values are not in (0,1]!') diff --git a/R/Rplots.pdf b/R/Rplots.pdf index 922522b..fb5e768 100644 Binary files a/R/Rplots.pdf and b/R/Rplots.pdf differ diff --git a/R/tutorial_scPPIN.R b/R/tutorial_scPPIN.R index 4dce76e..885e04b 100644 --- a/R/tutorial_scPPIN.R +++ b/R/tutorial_scPPIN.R @@ -16,6 +16,12 @@ names(pValues) <- pValuesRaw$gene # if the gene symbols are not in upper case, use the `toupper` function #names(pValues) <- toupper(pValuesRaw$gene) +# you should make sure that the p-values are in the semi-open interval (0,1], so this checksum should be zero +checksum = sum(pValues<0) + sum(pValues>1) +if (checksum>0){ + warning('p-values are not in (0,1]!') +} + # 2) Run our algorithms FDR <- 10^{-2} # choose the false discovery rate functionalModule <-detectFunctionalModule(ppin,pValues,FDR) diff --git a/README.md b/README.md index b025b26..ecd0b89 100644 --- a/README.md +++ b/README.md @@ -77,5 +77,8 @@ In the script *tutorial_scPPIN-stepwise.R* the functionality is shown step-by-st 5. I don't like BioGRID and would rather use my own PPIN. > You can construct your own network in the igraph format and use the provided functions. But it is important that the gene symbols are the same as the names of the nodes in the PPIN. +6. When using the `fitBUM` function I receive an error. +> This often occurs when the p-values are not in the half-open interval (0,1]. This means that p-values of zero are not allowed. (a first workaround would be to replace all zero p-values with the smallest of all non-zero p-values.) + ## License This project is licensed under the AGPL - see the [LICENSE](https://github.com/floklimm/scPPIN/blob/master/LICENSE) file for details.