Skip to content

Commit

Permalink
minFC argument deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
dosorio committed Apr 7, 2020
1 parent 7f5aa03 commit 8298a67
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
4 changes: 1 addition & 3 deletions R/dRegulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#' @title Evaluates gene differential regulation based on manifold alignment distances.
#' @description Using the output of the non-linear manifold alignment, this function computes the Euclidean distance between the coordinates for the same gene in both conditions. Calculated distances are then transformed using Box-Cox power transformation, and standardized to ensure normality. P-values are assigned following the chi-square distribution over the fold-change of the squared distance computed with respect to the expectation.
#' @param manifoldOutput A matrix. The output of the non-linear manifold alignment, a labeled matrix with two times the number of shared genes as rows (X_ genes followed by Y_ genes in the same order) and \code{d} number of columns.
#' @param minFC A decimal value. Defines the cut-off threshold of fold-change to limit the testing to genes that show, at least \code{minFC} deviation.
#' @return A data frame with 5 columns as follows: \itemize{
#' \item \code{gene} A character vector with the gene id identified from the \code{manifoldAlignment} output.
#' \item \code{distance} A numeric vector of the Euclidean distance computed between the coordinates of the same gene in both conditions.
Expand Down Expand Up @@ -67,7 +66,7 @@
#' qqline(dcOutput$Z)
#' }

dRegulation <- function(manifoldOutput, minFC = 1.5){
dRegulation <- function(manifoldOutput){

geneList <- rownames(manifoldOutput)
geneList <- geneList[grepl('^X_', geneList)]
Expand Down Expand Up @@ -119,7 +118,6 @@ dRegulation <- function(manifoldOutput, minFC = 1.5){
p.value = pValues,
p.adj = pAdjusted
)
dOut <- dOut[FC > minFC,]
dOut <- dOut[order(dOut$p.value),]
dOut <- as.data.frame.array(dOut)
return(dOut)
Expand Down
5 changes: 2 additions & 3 deletions R/scTenifoldNet.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#' @param td_maxIter An integer value. Defines the maximum number of iterations if error stay above \code{td_maxError}.
#' @param td_maxError A decimal value between 0 and 1. Defines the relative Frobenius norm error tolerance.
#' @param ma_nDim An integer value. Defines the number of dimensions of the low-dimensional feature space to be returned from the non-linear manifold alignment.
#' @param dc_minFC A decimal value. Defines the cut-off threshold of fold-change to limit the testing to genes that show, at least \code{dc_minFC} deviation.
#' @return A list with 3 slots as follows:
#' \itemize{
#' \item{tensorNetworks:} The generated weight-averaged denoised gene regulatory networks using CANDECOMP/PARAFAC (CP) Tensor Decomposition.
Expand Down Expand Up @@ -66,7 +65,7 @@
scTenifoldNet <- function(X, Y, qc_minLibSize = 1000, qc_removeOutlierCells = TRUE,
qc_minPCT = 0.05, qc_maxMTratio = 0.1, nc_nNet = 10,
nc_nCells = 500, nc_nComp = 3, nc_symmetric = FALSE, nc_scaleScores = TRUE,
nc_q = 0.05, td_K = 3, td_maxIter = 1e3, td_maxError = 1e-5, ma_nDim = 30, dc_minFC = 1.5){
nc_q = 0.05, td_K = 3, td_maxIter = 1e3, td_maxError = 1e-5, ma_nDim = 30){
# Single-cell Quality Control
X <- scQC(X, minLibSize = qc_minLibSize, removeOutlierCells = qc_removeOutlierCells, minPCT = qc_minPCT, maxMTratio = qc_maxMTratio)
Y <- scQC(Y, minLibSize = qc_minLibSize, removeOutlierCells = qc_removeOutlierCells, minPCT = qc_minPCT, maxMTratio = qc_maxMTratio)
Expand Down Expand Up @@ -113,7 +112,7 @@ scTenifoldNet <- function(X, Y, qc_minLibSize = 1000, qc_removeOutlierCells = TR
# write.csv(mA, outFile)

# Differential regulation testing
dR <- dRegulation(manifoldOutput = mA, minFC = dc_minFC)
dR <- dRegulation(manifoldOutput = mA)
# write.csv(dC, paste0('dCoex_',id,'_',M,'tensor_',A,'alignment.csv'))
# }
# }
Expand Down
4 changes: 1 addition & 3 deletions man/dRegulation.Rd

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

4 changes: 1 addition & 3 deletions man/scTenifoldNet.Rd

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

0 comments on commit 8298a67

Please # to comment.