Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed May 22, 2023
1 parent d5388da commit f9d75e5
Show file tree
Hide file tree
Showing 6 changed files with 463 additions and 430 deletions.
26 changes: 13 additions & 13 deletions tools/camera_annotate/CAMERA_annotateDiffreport.r
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
# ----- PACKAGE -----
cat("\tSESSION INFO\n")

#Import the different functions
# Import the different functions
source_local <- function(fname) {
argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep = "/"))
argv <- commandArgs(trailingOnly = FALSE)
base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
source(paste(base_dir, fname, sep = "/"))
}
source_local("lib.r")

pkgs <- c("CAMERA", "multtest", "batch")
loadAndDisplayPackages(pkgs)
cat("\n\n");

cat("\n\n")
# ----- ARGUMENTS -----
cat("\tARGUMENTS INFO\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")

cat("\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 = FALSE, quote = FALSE, sep = "\t")

cat("\n\n")
# ----- PROCESSING INFILE -----
cat("\tINFILE PROCESSING INFO\n")

#image is an .RData file necessary to use xset variable given by previous tools
load(args$image); args$image <- NULL
# image is an .RData file necessary to use xset variable given by previous tools
load(args$image)
args$image <- NULL

cat("\n\n")

Expand All @@ -50,7 +50,7 @@ directory <- retrieveRawfileInTheWorkingDir(singlefile, zipfile)

# Because so far CAMERA isn't compatible with the new XCMSnExp object
if (exists("xdata")) {
xset <- getxcmsSetObject(xdata)
xset <- getxcmsSetObject(xdata)
}

cat("\n\n")
Expand All @@ -72,7 +72,7 @@ cat("\tXSET OBJECT INFO\n")
print(xa)
cat("\n\n")

#saving R data in .Rdata file to save the variables used in the present tool
# saving R data in .Rdata file to save the variables used in the present tool
objects2save <- c("xa", "variableMetadata", "diffrep", "cAnnot", "listOFargs", "zipfile", "singlefile")
save(list = objects2save[objects2save %in% ls()], file = "annotatediff.RData")

Expand Down
10 changes: 6 additions & 4 deletions tools/camera_combinexsannos/CAMERA_combinexsAnnos.r
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ cat("\tSESSION INFO\n")

#Import the different functions
source_local <- function(fname) {
argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep = "/"))
argv <- commandArgs(trailingOnly = FALSE)
base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
source(paste(base_dir, fname, sep = "/"))
}
source_local("lib.r")

pkgs <- c("CAMERA", "multtest", "batch")
loadAndDisplayPackages(pkgs)
cat("\n\n");
cat("\n\n")

# ----- ARGUMENTS -----
cat("\tARGUMENTS INFO\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")
write.table(as.matrix(args), col.names = FALSE, quote = FALSE, sep = "\t")

cat("\n\n");
cat("\n\n")


# ----- PROCESSING INFILE -----
Expand Down
Loading

0 comments on commit f9d75e5

Please sign in to comment.