Skip to content

Commit

Permalink
Solving infix_spaces_linter() issues (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Oct 4, 2023
1 parent bc10c55 commit 875ff08
Show file tree
Hide file tree
Showing 28 changed files with 169 additions and 165 deletions.
4 changes: 2 additions & 2 deletions R/DIscBIO-generic-ClustDiffGenes.R
Expand Up @@ -18,8 +18,8 @@
#' @export
#' @examples
#' sc <- DISCBIO(valuesG1msTest)
#' sc <- Clustexp(sc, cln=3, quiet=TRUE)
#' cdiff <- ClustDiffGenes(sc, K=3, fdr=.3, export=FALSE)
#' sc <- Clustexp(sc, cln = 3, quiet = TRUE)
#' cdiff <- ClustDiffGenes(sc, K=3, fdr=.3, export = FALSE)
#' str(cdiff)
#' cdiff[[2]]

Expand Down
4 changes: 2 additions & 2 deletions R/DIscBIO-generic-Clustexp.R
Expand Up @@ -32,7 +32,7 @@
#' @return The DISCBIO-class object input with the cpart slot filled.
#' @examples
#' sc <- DISCBIO(valuesG1msTest) # changes signature of data
#' sc <- Clustexp(sc, cln=2)
#' sc <- Clustexp(sc, cln = 2)
setGeneric("Clustexp", function(object, clustnr = 3, bootnr = 50,
metric = "pearson", do.gap = TRUE, SE.method = "Tibs2001SEmax",
SE.factor = .25, B.gap = 50, cln = 0, rseed = NULL, quiet = FALSE)
Expand Down Expand Up @@ -134,4 +134,4 @@ setMethod(
object@cpart <- object@kmeans$kpart
return(object)
}
)
)
4 changes: 2 additions & 2 deletions R/DIscBIO-generic-FinalPreprocessing.R
Expand Up @@ -10,8 +10,8 @@
#' @return The DISCBIO-class object input with the FinalGeneList slot filled.
#' @examples
#' sc <- DISCBIO(valuesG1msTest)
#' sc <- NoiseFiltering(sc, percentile=0.9, CV=0.2, export=FALSE)
#' sc <- FinalPreprocessing(sc, GeneFlitering="NoiseF", export=FALSE)
#' sc <- NoiseFiltering(sc, percentile = 0.9, CV = 0.2, export = FALSE)
#' sc <- FinalPreprocessing(sc, GeneFlitering="NoiseF", export = FALSE)
#'
setGeneric(
"FinalPreprocessing",
Expand Down
4 changes: 2 additions & 2 deletions R/DIscBIO-generic-FindOutliers.R
Expand Up @@ -23,7 +23,7 @@
#' of cells on each.
#' @examples
#' sc <- DISCBIO(valuesG1msTest)
#' sc <- Clustexp(sc, cln=2) # K-means clustering
#' sc <- Clustexp(sc, cln = 2) # K-means clustering
#' FindOutliers(sc, K=2)
#'
setGeneric(
Expand Down Expand Up @@ -98,7 +98,7 @@ setMethod(
outdistquant = outdistquant
)
### calibrate background model
EXP<-object@expdata + 0.1
EXP <- object@expdata + 0.1
m <- log2(apply(EXP, 1, mean))
v <- log2(apply(EXP, 1, var))
f <- m > -Inf & v > -Inf
Expand Down
2 changes: 1 addition & 1 deletion R/DIscBIO-generic-NoiseFiltering.R
Expand Up @@ -27,7 +27,7 @@
#' @return The DISCBIO-class object input with the noiseF slot filled.
#' @examples
#' sc <- DISCBIO(valuesG1msTest) # changes signature of data
#' sd_filtered <- NoiseFiltering(sc, export=FALSE)
#' sd_filtered <- NoiseFiltering(sc, export = FALSE)
#' str(sd_filtered)
#'
setGeneric(
Expand Down
4 changes: 2 additions & 2 deletions R/DIscBIO-generic-Normalizedata.R
Expand Up @@ -29,7 +29,7 @@
#' # In this case this function is used to normalize the reads
#' sc_normal <- Normalizedata(
#' sc, mintotal=1000, minexpr=0, minnumber=0, maxexpr=Inf, downsample=FALSE,
#' dsn=1, rseed=17000
#' dsn=1, rseed = 17000
#' )
#' summary(sc_normal@fdata)
#'
Expand Down Expand Up @@ -93,4 +93,4 @@ setMethod(
object@fdata <- x[apply(x, 1, max, na.rm = TRUE) < maxexpr, ]
return(object)
}
)
)
8 changes: 4 additions & 4 deletions R/DIscBIO-generic-clustheatmap.R
Expand Up @@ -18,10 +18,10 @@ setGeneric(
function(
object,
clustering_method = "k-means",
hmethod="single",
rseed=NULL,
quiet=FALSE,
plot=TRUE)
hmethod = "single",
rseed = NULL,
quiet = FALSE,
plot = TRUE)
{
standardGeneric("clustheatmap")
}
Expand Down
8 changes: 4 additions & 4 deletions R/DIscBIO-generic-comptSNE.R
Expand Up @@ -13,14 +13,14 @@
#' @return The DISCBIO-class object input with the tsne slot filled.
#' @examples
#' sc <- DISCBIO(valuesG1msTest) # changes signature of data
#' sc <- Clustexp(sc, cln=2) # data must be clustered before plottin
#' sc <- comptSNE(sc, max_iter=30)
#' sc <- Clustexp(sc, cln = 2) # data must be clustered before plottin
#' sc <- comptSNE(sc, max_iter = 30)
#' head(sc@tsne)
#'
setGeneric(
name = "comptSNE",
def = function(
object, rseed=NULL, max_iter=5000, epoch=500, quiet=FALSE, ...
object, rseed = NULL, max_iter = 5000, epoch = 500, quiet = FALSE, ...
)
{
standardGeneric("comptSNE")
Expand Down Expand Up @@ -68,4 +68,4 @@ setMethod(
}
return(object)
}
)
)
4 changes: 2 additions & 2 deletions R/DIscBIO-generic-plotGap.R
Expand Up @@ -23,7 +23,7 @@ setMethod(
y_limits <- c(y_lo, y_up)
}
plot(
gap, las=1, ylim = y_limits, main="Gap Statistics"
gap, las = 1, ylim = y_limits, main = "Gap Statistics"
)
}
)
)
2 changes: 1 addition & 1 deletion R/DIscBIO-generic-plottSNE.R
Expand Up @@ -30,7 +30,7 @@ setMethod(
# Plotting
# ======================================================================
col <- c("black", "blue", "green", "red", "yellow", "gray")
LEN<-length(levels(factor(part)))
LEN <- length(levels(factor(part)))
plot(
x,
las = 1,
Expand Down
6 changes: 3 additions & 3 deletions R/DIscBIO-generic-pseudoTimeOrdering.R
Expand Up @@ -10,9 +10,9 @@
#' @return The DISCBIO-class object input with the kordering slot filled.
setGeneric("pseudoTimeOrdering", function(
object,
quiet=FALSE,
export=FALSE,
filename="Cellular_pseudo-time_ordering"
quiet = FALSE,
export = FALSE,
filename = "Cellular_pseudo-time_ordering"
)
{
standardGeneric("pseudoTimeOrdering")
Expand Down
8 changes: 4 additions & 4 deletions R/J48DTeval.R
Expand Up @@ -74,10 +74,10 @@ J48DTeval <- function(
)
colnames(j48.confusion.matrix) <- c(First, Second)
if (!quiet) print(j48.confusion.matrix)
j48.sn <- round(SN(j48.confusion.matrix),digits=2)
j48.sp <- round(SP(j48.confusion.matrix),digits=2)
j48.acc <- round(ACC(j48.confusion.matrix),digits=2)
j48.mcc <- round(MCC(j48.confusion.matrix),digits=2)
j48.sn <- round(SN(j48.confusion.matrix),digits = 2)
j48.sp <- round(SP(j48.confusion.matrix),digits = 2)
j48.acc <- round(ACC(j48.confusion.matrix),digits = 2)
j48.mcc <- round(MCC(j48.confusion.matrix),digits = 2)

if (!quiet) {
message(
Expand Down
8 changes: 4 additions & 4 deletions R/NetAnalysis.R
Expand Up @@ -23,10 +23,10 @@ NetAnalysis <- function(
names <- rownames(betweenness.table)
rownames(betweenness.table) <- NULL
degree <- degree(gg)
Duplicated<-data[duplicated(data),]
if(length(Duplicated[,1])>0){
degree=degree/2

Duplicated <- data[duplicated(data),]
if(length(Duplicated[, 1]) > 0){
degree <- degree / 2
}

degree.table <- data.frame(degree)
Expand Down
2 changes: 1 addition & 1 deletion R/Networking.R
Expand Up @@ -46,7 +46,7 @@ Networking <- function(
"\n",
paste0(y)
)
Network <- readPNG(FileName, native=TRUE)
Network <- readPNG(FileName, native = TRUE)
set_plot_dimensions <- function(width_choice, height_choice) {
opar <- options(
repr.plot.width = width_choice,
Expand Down
2 changes: 1 addition & 1 deletion R/PlotMBpca.R
Expand Up @@ -14,7 +14,7 @@
#' @return A plot of the PCA.
#' @export

PlotMBpca <- function(object, type="order", g=NULL, n=NULL) {
PlotMBpca <- function(object, type = "order", g = NULL, n = NULL) {
# ==========================================================================
# Validation
# ==========================================================================
Expand Down
8 changes: 4 additions & 4 deletions R/RpartEVAL.R
Expand Up @@ -74,10 +74,10 @@ RpartEVAL <- function(data, num.folds = 10, First = "CL1", Second = "CL2",
)
colnames(Rpart.confusion.matrix) <- c(First, Second)
if (!quiet) print(Rpart.confusion.matrix)
Rpart.sn <- round(SN(Rpart.confusion.matrix),digits=2)
Rpart.sp <- round(SP(Rpart.confusion.matrix),digits=2)
Rpart.acc <- round(ACC(Rpart.confusion.matrix),digits=2)
Rpart.mcc <- round(MCC(Rpart.confusion.matrix),digits=2)
Rpart.sn <- round(SN(Rpart.confusion.matrix),digits = 2)
Rpart.sp <- round(SP(Rpart.confusion.matrix),digits = 2)
Rpart.acc <- round(ACC(Rpart.confusion.matrix),digits = 2)
Rpart.mcc <- round(MCC(Rpart.confusion.matrix),digits = 2)

if (!quiet) {
message(
Expand Down

0 comments on commit 875ff08

Please sign in to comment.