From af5ed20d0d3f3c09268f1aa3367aab8c8917b232 Mon Sep 17 00:00:00 2001 From: Qingfei Pan Date: Mon, 5 Aug 2024 12:59:17 -0500 Subject: [PATCH] added import in NAMESPACE --- NAMESPACE | 8 +++++++- R/clustering_analysis.R | 1 + R/differential_analysis.R | 1 + R/manipulate_sparseEset.R | 3 ++- R/network_analysis.R | 4 ++++ R/visualization.R | 2 ++ README.md | 2 +- 7 files changed, 18 insertions(+), 3 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index da259df..fdb20d2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -31,4 +31,10 @@ export(readInput_h5ad) export(readInput_table) export(updateSparseEset) exportClasses(SparseExpressionSet) -importFrom(Biobase,ExpressionSet) +import(Biobase) +import(ggplot2) +import(igraph) +import(limma) +import(pheatmap) +import(rmarkdown) +importFrom(dplyr,filter) diff --git a/R/clustering_analysis.R b/R/clustering_analysis.R index ddb7583..9574fed 100644 --- a/R/clustering_analysis.R +++ b/R/clustering_analysis.R @@ -178,6 +178,7 @@ addMICAoutput <- function(input_eset, #' @param fontsize.axis_text Integer, font size of the axis text. Default: 8. #' #' @return A UMAP or T-SNE plot. It also print the plot to screen. +#' @import ggplot2 #' @export #' #' @examples diff --git a/R/differential_analysis.R b/R/differential_analysis.R index 3353ad7..eeb8b03 100644 --- a/R/differential_analysis.R +++ b/R/differential_analysis.R @@ -95,6 +95,7 @@ combinePvalVector <- function(pvals, #' @param use_method Character, method used for differential analysis: "`limma`" (the default), "`wilcoxon`", and "`t.test`". #' #' @return A data frame. Rows are genes/drivers, and columns are 11 statistics of differential analysis. +#' @import limma #' #' @examples #' ## to call this function diff --git a/R/manipulate_sparseEset.R b/R/manipulate_sparseEset.R index 48acd81..40a9e01 100644 --- a/R/manipulate_sparseEset.R +++ b/R/manipulate_sparseEset.R @@ -3,7 +3,7 @@ #' #' @title SparseExpressionSet #' @exportClass SparseExpressionSet -#' @importFrom Biobase ExpressionSet +#' @import Biobase methods::setClass(Class = "SparseExpressionSet", contains = "ExpressionSet", prototype = methods::prototype(methods::new("VersionedBiobase", versions = c(Biobase::classVersion("ExpressionSet"), SparseExpressionSet = "1.0.0" ))) @@ -267,6 +267,7 @@ combineSparseEset <- function(eset_list, #' @param addMetaData Logical, whether to update the meta data of features and cells based on the expression matrix. Default: `FALSE`. #' #' @return A sparse eset object with updated information +#' @import Biobase #' @export #' #' @examples diff --git a/R/network_analysis.R b/R/network_analysis.R index 576cfc7..2640596 100644 --- a/R/network_analysis.R +++ b/R/network_analysis.R @@ -8,6 +8,7 @@ #' @param driver_type Character, type of drivers to be extracted: "`TF`" for transcriptional factor, "`SIG`" for signaling genes, and "`TF_SIG`" for both. Default: "`TF`". #' #' @return A vector of pre-defined driver genes +#' @importFrom dplyr filter #' @export #' #' @examples @@ -72,6 +73,7 @@ getDriverList <- function(species_type = "hg", #' - a "**`SIG`**" folder containing a "**`.sig.txt`**" file: this file contains the SIG driver list. #' - a bash script (**`runSJARACNe.sh`**) to run SJARACNe. Further modification is needed to run it. #' - a json file (**`config_cwlexec.json`**) containing parameters to run SJARACNe. +#' @importFrom dplyr filter #' @export #' #' @examples @@ -353,6 +355,8 @@ generateSJARACNeInput <- function(input_eset, #' @param prefix Character or `NULL`, the character string to add in front of the html report file name. Default: `NULL`. Ignored if `generate_html` = `FALSE`. #' #' @return This function will print the statistics of several key quality metrics of network(s). If `generate_html` is set `TRUE`, it also generates a html file of quality control report and save it to the same folder of the network file (by default) or the folder specified by "`outdir`". +#' @import igraph +#' @import rmarkdown #' @export #' #' @examples diff --git a/R/visualization.R b/R/visualization.R index 70306c6..3b245f6 100644 --- a/R/visualization.R +++ b/R/visualization.R @@ -28,6 +28,7 @@ #' @param jitter.size Numeric, size of the jittered points. Default: 0.1. #' #' @return A ggplot object with one or multiple violin plots +#' @import ggplot2 #' @export #' #' @examples @@ -400,6 +401,7 @@ feature_bubbleplot <- function(input_eset, #' @param cluster_rows Logical, whether to cluster the rows. If `TRUE`, the rows will be clustered. If `FALSE`, the rows are displays following the order in '`features`'. Default: `FALSE`. #' #' @return Print the heatmap to screen +#' @import pheatmap #' @export #' #' @examples diff --git a/README.md b/README.md index 3f074b0..b4756b8 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ from [GitHub](https://github.com/) with: ``` r # install.packages("devtools") -devtools::install_github("jyyulab/scMINER@dev-qpan") +devtools::install_github("jyyulab/scMINER") ``` ### Install MICA and SJARACNe