Skip to content

Commit

Permalink
Lintr : Commented code should be removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienCode404 committed Oct 23, 2024
1 parent 0f42d95 commit bc6be48
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions tools/metams/metaMS_runGC/metaMS_runGC.r
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cat("\nStart of the '", modNamC, "' Galaxy module call: ", format(Sys.time(), "%
# ----- PROCESSING INFILE -----
cat("\n\n\tARGUMENTS PROCESSING INFO\n\n")
args <- parseCommandArgs(evaluate = FALSE) # interpretation of arguments given in command line as an R list of objects
# write.table(as.matrix(args), col.names=F, quote=F, sep='\t\t')

print(cbind(value = unlist(args)))

# ----- PROCESSING INFILE -----
Expand Down Expand Up @@ -208,7 +208,7 @@ if (!is.null(args$singlefile_galaxyPath)) {
if (length(xset@rt$raw) > 1) {
# create an exceptable list of xset for metaMS
xset.l <- vector("list", length(xset@rt$raw))
for (i in 1:length(xset@rt$raw)) {
for (i in seq_along(xset@rt$raw)) {
xset.l[[i]] <- new("xcmsSet")
xset.l[[i]]@peaks <- xset@peaks[which(xset@peaks[, "sample"] == i), ]
df <- data.frame(class = xset@phenoData[i, ])
Expand Down
32 changes: 16 additions & 16 deletions tools/metams/scripts/lib_metams.r
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ getBPC2s <- function(files, xset = NULL, pdfname = "BPCs.pdf", rt = c("raw", "co
colvect <- NULL
for (j in seq_along(classnames[[k]])) {
bpc <- BPC[[classnames[[k]][j]]]
# points(bpc[,1]/60, bpc[,2], col = cols[i], pch = pch[i], type="l")

points(bpc[, 1] / 60, bpc[, 2], col = cols[classnames[[k]][j]], pch = pch[classnames[[k]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[k]][j]])
}
for (j in seq_along(classnames[[l]])) {
# i=class2names[j]

bpc <- BPC[[classnames[[l]][j]]]
points(bpc[, 1] / 60, -bpc[, 2], col = cols[classnames[[l]][j]], pch = pch[classnames[[l]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[l]][j]])
Expand All @@ -247,12 +247,12 @@ getBPC2s <- function(files, xset = NULL, pdfname = "BPCs.pdf", rt = c("raw", "co

for (j in seq_along(classnames[[k]])) {
bpc <- BPC[[classnames[[k]][j]]]
# points(bpc[,1]/60, bpc[,2], col = cols[i], pch = pch[i], type="l")

points(bpc[, 1] / 60, bpc[, 2], col = cols[classnames[[k]][j]], pch = pch[classnames[[k]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[k]][j]])
}
for (j in seq_along(classnames[[l]])) {
# i=class2names[j]

bpc <- BPC[[classnames[[l]][j]]]
points(bpc[, 1] / 60, -bpc[, 2], col = cols[classnames[[l]][j]], pch = pch[classnames[[l]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[l]][j]])
Expand All @@ -270,7 +270,7 @@ getBPC2s <- function(files, xset = NULL, pdfname = "BPCs.pdf", rt = c("raw", "co

for (j in seq_along(classnames[[k]])) {
bpc <- BPC[[classnames[[k]][j]]]
# points(bpc[,1]/60, bpc[,2], col = cols[i], pch = pch[i], type="l")

points(bpc[, 1] / 60, bpc[, 2], col = cols[classnames[[k]][j]], pch = pch[classnames[[k]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[k]][j]])
}
Expand Down Expand Up @@ -332,12 +332,12 @@ getTIC2s <- function(files, xset = NULL, pdfname = "TICs.pdf", rt = c("raw", "co
colvect <- NULL
for (j in seq_along(classnames[[k]])) {
tic <- TIC[[classnames[[k]][j]]]
# points(tic[,1]/60, tic[,2], col = cols[i], pch = pch[i], type="l")

points(tic[, 1] / 60, tic[, 2], col = cols[classnames[[k]][j]], pch = pch[classnames[[k]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[k]][j]])
}
for (j in seq_along(classnames[[l]])) {
# i=class2names[j]

tic <- TIC[[classnames[[l]][j]]]
points(tic[, 1] / 60, -tic[, 2], col = cols[classnames[[l]][j]], pch = pch[classnames[[l]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[l]][j]])
Expand All @@ -354,12 +354,12 @@ getTIC2s <- function(files, xset = NULL, pdfname = "TICs.pdf", rt = c("raw", "co
colvect <- NULL
for (j in seq_along(classnames[[k]])) {
tic <- TIC[[classnames[[k]][j]]]
# points(tic[,1]/60, tic[,2], col = cols[i], pch = pch[i], type="l")

points(tic[, 1] / 60, tic[, 2], col = cols[classnames[[k]][j]], pch = pch[classnames[[k]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[k]][j]])
}
for (j in seq_along(classnames[[l]])) {
# i=class2names[j]

tic <- TIC[[classnames[[l]][j]]]
points(tic[, 1] / 60, -tic[, 2], col = cols[classnames[[l]][j]], pch = pch[classnames[[l]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[l]][j]])
Expand All @@ -374,7 +374,7 @@ getTIC2s <- function(files, xset = NULL, pdfname = "TICs.pdf", rt = c("raw", "co
colvect <- NULL
for (j in seq_along(classnames[[k]])) {
tic <- TIC[[classnames[[k]][j]]]
# points(tic[,1]/60, tic[,2], col = cols[i], pch = pch[i], type="l")

points(tic[, 1] / 60, tic[, 2], col = cols[classnames[[k]][j]], pch = pch[classnames[[k]][j]], type = "l")
colvect <- append(colvect, cols[classnames[[k]][j]])
}
Expand Down Expand Up @@ -445,9 +445,9 @@ plotUnknowns <- function(resGC, unkn = "", DB = NULL, fileFrom = NULL) {
# recordPlot
perpage <- 3 # if change change layout also!
dev.new(width = 21 / 2.54, height = 29.7 / 2.54, file = paste("Unknown_", unkn[l], ".pdf", sep = "")) # A4 pdf
# par(mfrow=c(perpage,2))

layout(matrix(c(1, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9), 6, 2, byrow = TRUE), widths = rep(c(1, 1), perpage), heights = rep(c(1, 5), perpage))
# layout.show(6)

oma.saved <- par("oma")
par(oma = rep.int(0, 4))
par(oma = oma.saved)
Expand All @@ -468,10 +468,10 @@ plotUnknowns <- function(resGC, unkn = "", DB = NULL, fileFrom = NULL) {
an <- resGC$xset[[c]]
if (fileFrom == "zipfile") {
an@xcmsSet@filepaths <- paste0("./", an@xcmsSet@phenoData[, "class"], "/", basename(an@xcmsSet@filepaths))
} # else {
# print(an@xcmsSet@filepaths)
# an@xcmsSet@filepaths <- paste0("./",basename(an@xcmsSet@filepaths))
# }
}



# Find the good annotation for this sample
for (a in seq_len(length(helpannotation))) {
if (gsub(filepattern, "", names(helpannotation)[a]) == paste0("./", sampname)) {
Expand Down

0 comments on commit bc6be48

Please sign in to comment.