Skip to content

Commit

Permalink
adds dplyr to suggests
Browse files Browse the repository at this point in the history
  • Loading branch information
metamaden committed Jul 19, 2023
1 parent 893c9d2 commit 5b8d972
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ URL: https://github.com/metamaden/lute
BugReports: https://github.com/metamaden/lute/issues
LazyData: FALSE
Depends:
R (>= 3.5.0),
R (>= 4.2),
SummarizedExperiment,
SingleCellExperiment,
Biobase,
S4Vectors
Imports:
dplyr,
methods,
nnls,
stats
Suggests:
nnls,
dplyr,
glmnet,
knitr,
testthat,
Expand Down
2 changes: 1 addition & 1 deletion R/lute_classes.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ setClass("cellProportionsPredictions", slots = c(predictions.table = "data.frame
cellProportionsPredictions <- function(predictions.table,
cell.type.vector = NULL,
sample.id.vector = NULL) {
requireNamespace("dplyr")
library(dplyr)
if(is(cell.type.vector, "NULL")){
cell.type.vector <- colnames(predictions.table)
}
Expand Down
6 changes: 3 additions & 3 deletions R/lute_utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
ypb_from_sce <- function(sce, assay.name = "counts",
celltype.variable = "celltype",
sample.id.variable = NULL, S = NULL){
requireNamespace("dplyr")
library(dplyr)
num.groups <- 1; unique.group.id.vector <- ""
if(!is(sample.id.variable, "NULL")){
group.id.vector <- sce[[sample.id.variable]]
Expand Down Expand Up @@ -99,7 +99,7 @@ signature_matrix_from_sce <- function(sce,
celltype.variable = "celltype",
summary.method = "mean",
assay.name = "counts"){
requireNamespace("dplyr")
library(dplyr)
# gets the z signature matrix from an sce object
expression.matrix <- assays(sce)[[assay.name]] %>% as.matrix()
cd <- colData(sce)
Expand Down Expand Up @@ -262,7 +262,7 @@ signature_matrix_from_sce <- function(sce,
.parse_deconvolution_predictions_results <- function(list.pred,
column.labels,
row.labels){
requireNamespace("dplyr")
library(dplyr)
table.pred <- do.call(rbind, list.pred)
table.pred <- apply(table.pred, 1, function(ri){ri/sum(ri)}) %>% t()
colnames(table.pred) <- column.labels
Expand Down
1 change: 0 additions & 1 deletion vignettes/lute_users_guide.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ output:
toc_depth: 0
vignette: >
%\VignetteIndexEntry{The lute user's guide}
%\VignetteDepends{RCurl}
%\usepackage[UTF-8]{inputenc}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
Expand Down

0 comments on commit 5b8d972

Please sign in to comment.