dotplot cannot use pvalue to filter
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- r
- Domain
- data-visualization
Research direction
Start in R/method-fortify.R at fortify.internal and trace how dotplot obtains its data through as.data.frame.enrichResult and DOSE's get_enriched in enricher_internal.R. Compare the requested p-value filtering behavior with the existing pvalueCutoff and qvalueCutoff handling, then verify that the completed change lets dotplot apply the requested p-value filter.
Written by the indexing model from the issue text.
Description
Hi teacher:
I use dotplot to visualize enrichResult objects, but it cannot use pvalue to filter.
I found that in res <- as.data.frame(model) and res <- res[!is.na(res$Description), ] of the source code, It calls a generic function.
as.data.frame.enrichResult
[.enrichResult
as.data.frame.enrichResult <- function(x, ...) {
x <- get_enriched(x)
as.data.frame(x@result, ...)
}
`[.enrichResult` <- function(x, i, j, asis = FALSE, ...) {
x <- get_enriched(x)
y <- x@result[i, j, ...]
if (!asis)
return(y)
x@result <- y
return(x)
}
Both of these two generic functions are called get_enriched.
get_enriched <- function(object) {
Over <- object@result
pvalueCutoff <- object@pvalueCutoff
if (length(pvalueCutoff) != 0) {
## if groupGO result, numeric(0)
Over <- Over[ Over$pvalue <= pvalueCutoff, ]
Over <- Over[ Over$p.adjust <= pvalueCutoff, ]
}
qvalueCutoff <- object@qvalueCutoff
if (length(qvalueCutoff) != 0) {
if (! any(is.na(Over$qvalue))) {
if (length(qvalueCutoff) > 0)
Over <- Over[ Over$qvalue <= qvalueCutoff, ]
}
}
object@result <- Over
return(object)
}
However, there is no option to filter pvalue in function get_enriched. Can I add this filter parameter?
fortify.internal <- function(model, data, showCategory=5, by = "Count",
order=FALSE, drop=FALSE, split=NULL,colorBy="p.adjust", ...) {
# res <- as.data.frame(model)
res <- get_enriched(model,colorBy)
# res <- res[!is.na(res$Description), ]
......
}
- Dominant language
- R
- Stars
- 260
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from YuLab-SMU/enrichplot
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
YuLab-SMU/enrichplot#330 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
YuLab-SMU/enrichplot#327 · 2 comments ·
-
emapplot
Difficulty 4/5 3-5 days Newbie friendliness 28/100
YuLab-SMU/enrichplot#322 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
YuLab-SMU/enrichplot#319 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
YuLab-SMU/enrichplot#317 · 10 comments · 1 reaction ·
All issues in YuLab-SMU/enrichplot
Similar issues
-
documentation pkg infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
epiverse-trace/epiparameter#511 ·
-
function:write_dwc
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jbkunst/highcharter#849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100