Skip to content

Commit 3ab289b

Browse files
committed
Fix CHECK
1 parent 5dc53d8 commit 3ab289b

File tree

6 files changed

+64
-13
lines changed

6 files changed

+64
-13
lines changed

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: tidybulk
33
Title: Brings transcriptomics to the tidyverse
4-
Version: 1.99.2
4+
Version: 1.99.3
55
Authors@R: c(person("Stefano", "Mangiola", email = "[email protected]",
66
role = c("aut", "cre")),
77
person("Maria", "Doyle", email = "[email protected]",
@@ -28,6 +28,7 @@ Imports:
2828
utils,
2929
lifecycle,
3030
scales,
31+
ggplot2,
3132
SummarizedExperiment,
3233
GenomicRanges,
3334
methods,
@@ -54,7 +55,6 @@ Suggests:
5455
Seurat,
5556
KernSmooth,
5657
Rtsne,
57-
ggplot2,
5858
widyr,
5959
clusterProfiler,
6060
msigdbr,
@@ -95,7 +95,7 @@ RdMacros:
9595
Biarch: true
9696
biocViews: AssayDomain, Infrastructure, RNASeq, DifferentialExpression, GeneExpression, Normalization, Clustering, QualityControl, Sequencing, Transcription, Transcriptomics
9797
Encoding: UTF-8
98-
LazyData: true
98+
LazyData: false
9999
RoxygenNote: 7.3.2
100100
LazyDataCompression: xz
101101
URL: https://github.com/stemangiola/tidybulk

R/ggplot.R

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11

2+
#' Log10 reverse transformation for ggplot2
3+
#'
4+
#' Creates a transformation that applies -log10(x) to data, useful for
5+
#' visualizing p-values or other values where smaller values should be
6+
#' displayed larger.
7+
#'
8+
#' @return A transformation object that can be used with ggplot2's scale functions
9+
#'
10+
#' @examples
11+
#' \dontrun{
12+
#' library(ggplot2)
13+
#' # Example usage with p-values
14+
#' ggplot(data, aes(x = pvalue)) +
15+
#' geom_histogram() +
16+
#' scale_x_continuous(trans = log10_reverse_trans())
17+
#' }
18+
#'
219
#' @importFrom scales trans_new
320
#' @importFrom scales label_scientific
4-
#' @noRd
521
#' @export
622
log10_reverse_trans <- function() {
723
trans <- function(x) -log10(x)

R/global_variables.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ if(getRversion() >= "2.15.1") {
1717
"ncbi_gene", "fit", "FDR", "constrast", "adj.P.Val", "group_id",
1818
"parameter", "CI", "lower", "upper", "term", "sample a", "sample b",
1919
"abundance", "element", "feature", "rc", "correlation",
20-
"buildCustomIdx", "buildIdx", "egsea", "normalize.quantiles"
20+
"buildCustomIdx", "buildIdx", "egsea", "normalize.quantiles", "deconvolute", "data_base"
2121
))
2222
}

man/log10_reverse_trans.Rd

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-gene-enrichment.R

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,30 @@ airway_mini <- airway[1:100, 1:5]
77
library(dplyr)
88
library(SummarizedExperiment)
99
library(tidySummarizedExperiment)
10+
library(tidybulk)
1011
library(EGSEA)
1112

1213
# Add entrez and symbol mapping for gene enrichment tests
1314
if(requireNamespace("org.Hs.eg.db", quietly = TRUE)) {
14-
airway_mini <- airway_mini |>
15-
mutate(symbol = mapIds(org.Hs.eg.db::org.Hs.eg.db,
16-
keys = .feature,
15+
# Get gene names from rownames
16+
gene_names <- rownames(airway_mini)
17+
18+
# Map gene symbols and entrez IDs
19+
symbol_mapping <- mapIds(org.Hs.eg.db::org.Hs.eg.db,
20+
keys = gene_names,
1721
keytype = "ENSEMBL",
1822
column = "SYMBOL",
19-
multiVals = "first")) |>
20-
mutate(entrez = mapIds(org.Hs.eg.db::org.Hs.eg.db,
21-
keys = .feature,
23+
multiVals = "first")
24+
25+
entrez_mapping <- mapIds(org.Hs.eg.db::org.Hs.eg.db,
26+
keys = gene_names,
2227
keytype = "ENSEMBL",
2328
column = "ENTREZID",
24-
multiVals = "first"))
29+
multiVals = "first")
30+
31+
# Add mappings to rowData
32+
SummarizedExperiment::rowData(airway_mini)$symbol <- symbol_mapping
33+
SummarizedExperiment::rowData(airway_mini)$entrez <- entrez_mapping
2534
}
2635

2736
# Test test_gene_enrichment function

vignettes/introduction.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ airway_overrep =
10051005

10061006
EGSEA [@alhamdoosh2017egsea] is used for ensemble gene set enrichment analysis. EGSEA is a method that combines multiple gene set enrichment analysis methods to provide a more robust and comprehensive analysis of gene set enrichment. It creates a web-based interactive tool that allows you to explore the results of the gene set enrichment analysis.
10071007

1008-
```{r enrichment-egsea-analysis}
1008+
```{r enrichment-egsea-analysis, eval=FALSE}
10091009
library(EGSEA)
10101010
# Test gene enrichment
10111011
airway |>

0 commit comments

Comments
 (0)