Skip to content

Commit

Permalink
check() passed
Browse files Browse the repository at this point in the history
  • Loading branch information
QingfeiPan committed Oct 19, 2024
1 parent 6fbfd3f commit 07ffa04
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 5 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Description: scMINER is a mutual information-based framework for single-cell/nuc
License: Apache License (>= 2)
Encoding: UTF-8
LazyData: TRUE
LazyDataCompression:xz
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Depends:
Expand All @@ -36,7 +37,8 @@ Imports:
pheatmap (>= 1.0.12),
reshape2 (>= 1.4.4),
rmarkdown (>= 2.8),
sessioninfo (>= 1.2.2)
sessioninfo (>= 1.2.2),
RColorBrewer
Suggests:
knitr,
kableExtra,
Expand Down
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

export(MICAplot)
export(addMICAoutput)
export(cal_Activity)
export(combinePvalVector)
export(combineSparseEset)
export(compare2groups)
export(createProjectSpace)
export(createSparseEset)
export(drawNetworkQC)
Expand All @@ -24,12 +27,15 @@ export(getDA)
export(getDE)
export(getDriverList)
export(getTopFeatures)
export(get_net2target_list)
export(get_target_list2matrix)
export(normalizeSparseEset)
export(readInput_10x.dir)
export(readInput_10x.h5)
export(readInput_h5ad)
export(readInput_table)
export(updateSparseEset)
export(z_normalization)
exportClasses(SparseExpressionSet)
import(Biobase)
import(ggplot2)
Expand Down
2 changes: 2 additions & 0 deletions R/differential_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#' @param twosided Logical, whether the input P values are two-sided. If FALSE, the input P values will be treated as one-tailed. Default: `TRUE`.
#'
#' @return A vector containing "Z-statistics" and "P.Value".
#' @export
#'
#' @examples
#' ## 1. combine P values from a vector
Expand Down Expand Up @@ -99,6 +100,7 @@ combinePvalVector <- function(pvals,
#'
#' @return A data frame. Rows are genes/drivers, and columns are 11 statistics of differential analysis.
#' @import limma
#' @export
#'
#' @examples
#' ## to call this function
Expand Down
4 changes: 2 additions & 2 deletions R/manipulate_sparseEset.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ methods::setClass(Class = "SparseExpressionSet",
#'
#' ## 2. Create SparseEset with customized meta data
#' true_label <- read.table(system.file("extdata/demo_pbmc14k/PBMC14k_trueLabel.txt.gz", package = "scMINER"),
#' header = T, row.names = 1, sep = "\t", quote = "", stringsAsFactors = FALSE)
#' header = TRUE, row.names = 1, sep = "\t", quote = "", stringsAsFactors = FALSE)
#' pbmc14k_raw.eset <- createSparseEset(input_matrix = pbmc14k_rawCount,
#' cellData = true_label,
#' featureData = NULL,
Expand Down Expand Up @@ -304,7 +304,7 @@ combineSparseEset <- function(eset_list,
#' pbmc14k_raw.eset <- updateSparseEset(input_eset = pbmc14k_expression.eset, addMetaData = TRUE)
#'
#' ## 2. Update the meta data of cells: with this, the user can add more information of cells, like clustering results, cell type.
#' true_label <- read.table(system.file("extdata/demo_pbmc14k/PBMC14k_trueLabel.txt.gz", package = "scMINER"), header = T, row.names = 1, sep = "\t", quote = "", stringsAsFactors = FALSE)
#' true_label <- read.table(system.file("extdata/demo_pbmc14k/PBMC14k_trueLabel.txt.gz", package = "scMINER"), header = TRUE, row.names = 1, sep = "\t", quote = "", stringsAsFactors = FALSE)
#' pbmc14k_raw.eset <- updateSparseEset(input_eset = pbmc14k_expression.eset, cellData = true_label, addMetaData = TRUE)
#'
updateSparseEset <- function(input_eset,
Expand Down
4 changes: 4 additions & 0 deletions R/network_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ drawNetworkQC <- function(network_file = NULL,
#' @param x a vector of numbers for z-normalization
#'
#' @return a vector of numbers with z-normalized
#' @export
#'
#' @examples z_normalization(c(1,2,3,4,5,NA,6,7,8,9))
z_normalization <- function(x) {
Expand All @@ -634,6 +635,7 @@ z_normalization <- function(x) {
#' @param net_dat a data frame generated from SJARANCe network file. These columns are needed: "`source`", "`target`", "`MI`" and "`spearman`".
#'
#' @return A list of source genes, for each source gene, the value is a data frame with "`target`", "`MI`" and "`spearman`" as the columns
#' @export
#'
#' @examples
#' net_data <- read.table(system.file("extdata/demo_pbmc14k/SJARACNe/B/TF/bt100_pc001/consensus_network_ncol_.txt", package = "scMINER"),
Expand Down Expand Up @@ -676,6 +678,7 @@ get_net2target_list <- function(net_dat = NULL) {
#'
#' @return If "`weightedmean`" is given, it returns a matrix of signed (by Spearman correlation coefficient) mutual information, the sign of which will be used for activity calculation. For
#' all the other methods ("`mean`", "`absmean`" or "`maxmean`"), it returns a matrix of 1.
#' @export
#'
#' @examples
#' net_data <- read.table(system.file("extdata/demo_pbmc14k/SJARACNe/B/TF/bt100_pc001/consensus_network_ncol_.txt", package = "scMINER"),
Expand Down Expand Up @@ -710,6 +713,7 @@ get_target_list2matrix <- function(target_list = NULL, activity_method = 'mean')
#' @param do.std Logical, whether to do the z-normalization on the gene expression values in each sample. Default: `TRUE`.
#'
#' @return a matrix of activities, drivers by cells
#' @export
#'
#' @examples
#' net_data <- read.table(system.file("extdata/demo_pbmc14k/SJARACNe/B/TF/bt100_pc001/consensus_network_ncol_.txt", package = "scMINER"),
Expand Down
2 changes: 1 addition & 1 deletion man/createSparseEset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/updateSparseEset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 07ffa04

Please sign in to comment.