Skip to content

Commit

Permalink
added that p-values have to be in (0,1]
Browse files Browse the repository at this point in the history
  • Loading branch information
floklimm committed Jul 12, 2019
1 parent 17bca0e commit 349466e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
18 changes: 9 additions & 9 deletions R/.Rhistory
Original file line number Diff line number Diff line change
@@ -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"),
# )
Expand Down Expand Up @@ -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]!')
Binary file modified R/Rplots.pdf
Binary file not shown.
6 changes: 6 additions & 0 deletions R/tutorial_scPPIN.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 349466e

Please sign in to comment.