-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve documentation and package imports #308
base: master
Are you sure you want to change the base?
Changes from all commits
f3bcb06
bd82a3c
4d8a45b
89b106f
d7690dd
8709db9
b6fdbc4
0c1670a
1a0c713
c564934
243532c
25c605d
bfe5ac8
c98891b
5188581
02dfccc
50a94ab
a162b8e
d8862e2
225c005
eea34de
d59b0a4
0f60ddd
fd170a8
9a9542e
9baac9c
7af3822
2193a71
989009a
c54b441
6671ed2
e174749
fba863a
89c2244
59862f2
2d2b508
ea0072b
e3f50e7
6ba2954
6f2b55a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dev/ |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,57 +36,56 @@ Imports: | |
methods, | ||
S4Vectors, | ||
crayon, | ||
Matrix | ||
Matrix, | ||
pkgconfig, | ||
AnnotationDbi, | ||
DESeq2, | ||
Rtsne, | ||
Seurat, | ||
betareg, | ||
boot, | ||
broom, | ||
class, | ||
clusterProfiler, | ||
e1071, | ||
edgeR, | ||
functional, | ||
glmmSeq, | ||
glmmTMB, | ||
limma, | ||
lme4, | ||
matrixStats, | ||
msigdbr, | ||
org.Hs.eg.db, | ||
org.Mm.eg.db, | ||
pbapply, | ||
pbmcapply, | ||
survival, | ||
survminer, | ||
Comment on lines
+41
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chilampoon and @william-hutchison we need to drop all these new
but without adding those dependendies to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yead I agree on too many Imports, however directly add |
||
sva, | ||
uwot, | ||
widyr | ||
Suggests: | ||
tidySummarizedExperiment, | ||
tidyHeatmap, | ||
BiocStyle, | ||
testthat, | ||
vctrs, | ||
AnnotationDbi, | ||
BiocManager, | ||
Rsubread, | ||
e1071, | ||
edgeR, | ||
limma, | ||
org.Hs.eg.db, | ||
org.Mm.eg.db, | ||
sva, | ||
GGally, | ||
knitr, | ||
qpdf, | ||
covr, | ||
Seurat, | ||
KernSmooth, | ||
Rtsne, | ||
ggplot2, | ||
widyr, | ||
clusterProfiler, | ||
msigdbr, | ||
DESeq2, | ||
broom, | ||
survival, | ||
boot, | ||
betareg, | ||
tidyHeatmap, | ||
pasilla, | ||
ggrepel, | ||
devtools, | ||
functional, | ||
survminer, | ||
tidySummarizedExperiment, | ||
markdown, | ||
uwot, | ||
matrixStats, | ||
igraph, | ||
EGSEA, | ||
IRanges, | ||
here, | ||
glmmSeq, | ||
pbapply, | ||
pbmcapply, | ||
lme4, | ||
glmmTMB, | ||
MASS, | ||
pkgconfig | ||
MASS | ||
VignetteBuilder: | ||
knitr | ||
RdMacros: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
core <- c("dplyr", "tidyr", "ttservice") | ||
|
||
core_unloaded <- function() { | ||
search <- paste0("package:", core) | ||
core[!search %in% search()] | ||
} | ||
|
||
|
||
same_library <- function(pkg) { | ||
loc <- if (pkg %in% loadedNamespaces()) | ||
dirname(getNamespaceInfo(pkg, "path")) | ||
library(pkg, lib.loc=loc, character.only=TRUE, warn.conflicts=FALSE) | ||
} | ||
|
||
tidyverse_attach <- function() { | ||
to_load <- core_unloaded() | ||
|
||
suppressPackageStartupMessages( | ||
lapply(to_load, same_library)) | ||
|
||
invisible(to_load) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,8 +202,11 @@ call_core = function(itor, Y, X, P, pval, CoreAlg){ | |
} | ||
|
||
|
||
#' @import e1071 | ||
#' @import parallel | ||
#' @import preprocessCore | ||
#' @importFrom stats sd | ||
#' @importFrom utils install.packages | ||
#' @importFrom matrixStats colSds | ||
#' | ||
#' @keywords internal | ||
#' | ||
|
@@ -255,12 +258,6 @@ my_CIBERSORT <- function(Y, X, perm=0, QN=TRUE, cores = 3, exp_transform = FALSE | |
)) | ||
Y=Y[,colSums(Y)>0, drop=FALSE] | ||
|
||
# Check if package is installed, otherwise install | ||
if (find.package("matrixStats", quiet = TRUE) %>% length %>% equals(0)) { | ||
message("tidybulk says: Installing matrixStats needed for cibersort") | ||
install.packages("matrixStats", repos = "https://cloud.r-project.org") | ||
} | ||
|
||
# Eliminate sd == 0 | ||
Comment on lines
-258
to
261
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reinstate this would also be part of the effort of dependencies. |
||
if(length(which(matrixStats::colSds(Y)==0))>0) | ||
warning(sprintf( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this through!
I really think the dependency structure should go back as before. Please try to remove dependency gradually and see if error appear.
Is there any reason to add tidySummarizedExperiment in Suggests?
*please open a new branch for this