From 9366bcd232c262f355b0378cd9c77f60ce142718 Mon Sep 17 00:00:00 2001 From: Hani Jieun Kim Date: Mon, 24 Jun 2024 20:16:21 +1000 Subject: [PATCH] bioc check --- DESCRIPTION | 3 ++- LICENSE | 2 ++ LICENSE.md | 21 +++++++++++++++++++++ R/Cepo.R | 7 ++++--- 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 LICENSE create mode 100644 LICENSE.md diff --git a/DESCRIPTION b/DESCRIPTION index 2be18d6..ea00ae7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,7 +35,8 @@ Imports: reshape2, BiocParallel, stats, - dplyr + dplyr, + purrr biocViews: Classification, GeneExpression, SingleCell, Software, Sequencing, DifferentialExpression Suggests: knitr, diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..813fa3d --- /dev/null +++ b/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2024 +COPYRIGHT HOLDER: Cepo authors diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9842340 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +Copyright (c) 2024 Cepo authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/R/Cepo.R b/R/Cepo.R index 59e6a90..6eecf82 100644 --- a/R/Cepo.R +++ b/R/Cepo.R @@ -6,7 +6,7 @@ #' Default to NULL to not remove any genes. #' @param prefilter_sd Numeric value indicating threshold relating to standard #' deviation of genes. Used with prefilter_zeros. -#' @param prefilter_pzeros Numeric value indicating threshold relating to the +#' @param prefilter_pzero Numeric value indicating threshold relating to the #' percentage of zero expression of genes. Used with prefilter_sd. #' @param logfc Numeric value indicating the threshold of log fold-change #' to use to filter genes. @@ -39,6 +39,7 @@ #' @importFrom HDF5Array HDF5Array #' @importFrom BiocParallel SerialParam MulticoreParam SnowParam bplapply #' @importFrom stats pnorm pchisq +#' @importFrom purrr map map2 #' @import dplyr #' @return Returns a list of key genes. #' @description ExprsMat accepts various matrix objects, @@ -258,8 +259,8 @@ bootFastCepo <- function(exprsMat, cellTypes, minCells, exprsPct, logfc, variabi this_celltype_stats_matrix = purrr::map(.x = sampled_cepo_stats, .f = function(this_sampled_stats){ this_sampled_stats[,this_celltype] }) %>% do.call(cbind, .) - this_celltype_stats_mean = Cepo:::rowMeans_withnames(this_celltype_stats_matrix) - this_celltype_stats_sd = Cepo:::rowSds_withnames(this_celltype_stats_matrix) + this_celltype_stats_mean = rowMeans_withnames(this_celltype_stats_matrix) + this_celltype_stats_sd = rowSds_withnames(this_celltype_stats_matrix) return(data.frame(mean = this_celltype_stats_mean, sd = this_celltype_stats_sd)) }) names(celltype_norm_stats) = cts