NathanSkene / EWCE

Expression Weighted Celltype Enrichment. See the package website for up-to-date instructions on usage.
https://nathanskene.github.io/EWCE/index.html
53 stars 25 forks source link

Compute q-values during during `bootstrap_enrichment_test` #44

Closed bschilder closed 2 years ago

bschilder commented 2 years ago

Compute multiple-testing corrected q-values during bootstrap_enrichment_test rather than making it a separate step.

bschilder commented 2 years ago

Implemented here: https://github.com/bschilder/EWCE/blob/7d35d75308bd2eb8fc7fcb6aaaeae1fd32465fe6/R/bootstrap_enrichment_test.R#L233

iscastanho commented 2 years ago

full_results$results is not showing me q-values.

colnames(full_results$results) [1] "CellType" "annotLevel" "p" "fold_change" "sd_from_mean"

Any idea why that may be?

q values are definitely being calculated (mtc_method ="BH") and EWCE::ewce_plot() is showing significant q-values as stars.

Al-Murphy commented 2 years ago

Hi,

Can you check your version of EWCE and post it here? Q-values were only calculated in the plot function in old versions of EWCE.

Cheers, Alan.

iscastanho commented 2 years ago

Hi Alan. Thanks for the prompt reply.

I realized that I was using EWCE 1.2, which I hadn't noticed because I installed EWCE recently and assumed that a recent version had been installed. I am using conda environments and with R 4.1 I can only seem to be able to install EWCE 1.2. I've created a conda environment with R 4.2 but I sill can't manage to install EWCE 1.4+. If I use conda install -c r bioconductor-ewce it asks me if I want to revert to R 4.1 (-c bioconda doesn't seem to have R 4.2 yet, so that obviously didn't work either). if I try to install EWCE in an R session using BiocManager::install("EWCE") the installation is not successful and I get similar errors to when I try the GitHub version using devtools that I show below.

> library(devtools)
> install_github("NathanSkene/EWCE")
...
ERROR: compilation failed for package ‘RCurl’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/RCurl’
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/lme4’
ERROR: dependency ‘RCurl’ is not available for package ‘GenomeInfoDb’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/GenomeInfoDb’
ERROR: dependency ‘RCurl’ is not available for package ‘gprofiler2’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/gprofiler2’
ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/pbkrtest’
ERROR: dependency ‘GenomeInfoDb’ is not available for package ‘GenomicRanges’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/GenomicRanges’
ERROR: dependency ‘GenomeInfoDb’ is not available for package ‘Biostrings’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/Biostrings’
ERROR: dependencies ‘pbkrtest’, ‘lme4’ are not available for package ‘car’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/car’
ERROR: dependency ‘Biostrings’ is not available for package ‘KEGGREST’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/KEGGREST’
ERROR: dependencies ‘GenomicRanges’, ‘GenomeInfoDb’ are not available for package ‘SummarizedExperiment’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/SummarizedExperiment’
ERROR: dependency ‘car’ is not available for package ‘rstatix’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/rstatix’
ERROR: dependency ‘KEGGREST’ is not available for package ‘AnnotationDbi’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/AnnotationDbi’
ERROR: dependencies ‘SummarizedExperiment’, ‘GenomicRanges’ are not available for package ‘SingleCellExperiment’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/SingleCellExperiment’
ERROR: dependency ‘AnnotationDbi’ is not available for package ‘AnnotationHub’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/AnnotationHub’
ERROR: dependency ‘rstatix’ is not available for package ‘ggpubr’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/ggpubr’
ERROR: dependency ‘AnnotationHub’ is not available for package ‘ExperimentHub’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/ExperimentHub’
ERROR: dependencies ‘gprofiler2’, ‘ggpubr’ are not available for package ‘orthogene’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/orthogene’
ERROR: dependency ‘ExperimentHub’ is not available for package ‘ewceData’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/ewceData’

The downloaded source packages are in
    ‘/tmp/Rtmp8hkBRL/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
✔  checking for file ‘/tmp/Rtmp8hkBRL/remotes246341022b0e1/NathanSkene-EWCE-4eeee28/DESCRIPTION’ ...
─  preparing ‘EWCE’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘EWCE/inst/extdata’
─  building ‘EWCE_1.5.3.tar.gz’

ERROR: dependencies ‘ewceData’, ‘SingleCellExperiment’, ‘SummarizedExperiment’, ‘orthogene’ are not available for package ‘EWCE’
* removing ‘/home/DrCherry/miniconda3/envs/use_ewce_r4_2/lib/R/library/EWCE’
There were 20 warnings (use warnings() to see them)

> warnings()
Warning messages:
1: In i.p(...) : installation of package ‘nloptr’ had non-zero exit status
2: In i.p(...) : installation of package ‘RCurl’ had non-zero exit status
3: In i.p(...) : installation of package ‘lme4’ had non-zero exit status
4: In i.p(...) : installation of package ‘GenomeInfoDb’ had non-zero exit status
5: In i.p(...) : installation of package ‘gprofiler2’ had non-zero exit status
6: In i.p(...) : installation of package ‘pbkrtest’ had non-zero exit status
7: In i.p(...) : installation of package ‘GenomicRanges’ had non-zero exit status
8: In i.p(...) : installation of package ‘Biostrings’ had non-zero exit status
9: In i.p(...) : installation of package ‘car’ had non-zero exit status
10: In i.p(...) : installation of package ‘KEGGREST’ had non-zero exit status
11: In i.p(...) :
  installation of package ‘SummarizedExperiment’ had non-zero exit status
12: In i.p(...) : installation of package ‘rstatix’ had non-zero exit status
13: In i.p(...) :
  installation of package ‘AnnotationDbi’ had non-zero exit status
14: In i.p(...) :
  installation of package ‘SingleCellExperiment’ had non-zero exit status
15: In i.p(...) :
  installation of package ‘AnnotationHub’ had non-zero exit status
16: In i.p(...) : installation of package ‘ggpubr’ had non-zero exit status
17: In i.p(...) :
  installation of package ‘ExperimentHub’ had non-zero exit status
18: In i.p(...) : installation of package ‘orthogene’ had non-zero exit status
19: In i.p(...) : installation of package ‘ewceData’ had non-zero exit status
20: In i.p(...) :
  installation of package ‘/tmp/Rtmp8hkBRL/file246346487dedd/EWCE_1.5.3.tar.gz’ had non-zero exit status