Skip to content

Commit

Permalink
Checks added in case of singlefile NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienCode404 committed Oct 25, 2024
1 parent d078329 commit d83c1f0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion tools/camera/CAMERA_findAdducts.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args)
zipfile <- rawFilePath$zipfile
singlefile <- rawFilePath$singlefile
args <- rawFilePath$args
directory <- retrieveRawfileInTheWorkingDir(singlefile, zipfile)

print("singlefile :", singlefile)
if (!is.null(singlefile)) {
directory <- retrieveRawfileInTheWorkingDir(singlefile, zipfile)
}

# Check if the 'rules' argument in 'args' is NULL
if (is.null(args$rules)) {
Expand Down
6 changes: 5 additions & 1 deletion tools/camera/CAMERA_findIsotopes.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args)
zipfile <- rawFilePath$zipfile
singlefile <- rawFilePath$singlefile
args <- rawFilePath$args
directory <- retrieveRawfileInTheWorkingDir(singlefile, zipfile)

print("singlefile :", singlefile)
if (!is.null(singlefile)) {
directory <- retrieveRawfileInTheWorkingDir(singlefile, zipfile)
}

# Verify if the xa object is loaded
if (!exists("xa")) {
Expand Down
6 changes: 5 additions & 1 deletion tools/camera/CAMERA_groupCorr.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args)
zipfile <- rawFilePath$zipfile
singlefile <- rawFilePath$singlefile
args <- rawFilePath$args
directory <- retrieveRawfileInTheWorkingDir(singlefile, zipfile)

print("singlefile :", singlefile)
if (!is.null(singlefile)) {
directory <- retrieveRawfileInTheWorkingDir(singlefile, zipfile)
}

# Ensure the xa object is loaded
if (!exists("xa")) {
Expand Down
6 changes: 5 additions & 1 deletion tools/camera/CAMERA_groupFWHM.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args)
zipfile <- rawFilePath$zipfile
singlefile <- rawFilePath$singlefile
args <- rawFilePath$args
directory <- retrieveRawfileInTheWorkingDir(singlefile, zipfile)

print("singlefile :", singlefile)
if (!is.null(singlefile)) {
directory <- retrieveRawfileInTheWorkingDir(singlefile, zipfile)
}

# If the xdata object exists, convert it to xcmsSet
if (exists("xdata")) {
Expand Down

0 comments on commit d83c1f0

Please sign in to comment.