0
  1. working with CMD, it works:
"C:\Program Files (x86)\ProteoWizard\ProteoWizard 3.0.21175.5b6d9afee\msconvert.exe" msconvert "C:\Users\Data\QC3.raw" -o "C:\Users\Data"
  1. working with R system(), I got a "127" error:
msconvertpath <- c("C:/Program Files (x86)/ProteoWizard/ProteoWizard 3.0.21175.5b6d9afee/msconvert.exe'")

file <- c("C:/Users/Data/QC1.raw")

outfile <- c("C:/Users/Data")

convert <- paste0(msconvertpath, '"', " msconvert ", '"', file, '"', " -o ", '"', outfile)

system(convert)

Thanks a lot for your help.

1 Answer 1

1

Check your variables in R:

> msconvertpath
[1] "C:/Program Files (x86)/ProteoWizard/ProteoWizard 3.0.21175.5b6d9afee/msconvert.exe'"

You can see an invalid (superfluous) single quote at the very end (before closing double quote), and

> convert
[1] "C:/Program Files (x86)/ProteoWizard/ProteoWizard 3.0.21175.5b6d9afee/msconvert.exe'\" msconvert \"C:/Users/Data/QC1.raw\" -o \"C:/Users/Data"
> 

You can see missing escaped double quotes (opening one for msconvertpath and closing one for outfile).

Adjusted code snippet could work:

msconvertpath <- c("C:/Program Files (x86)/ProteoWizard/ProteoWizard 3.0.21175.5b6d9afee/msconvert.exe")
### ^ removed invalid single quote at the very end (before closing double quote) 
afile <- c("C:/Users/Data/QC1.raw")
outfile <- c("C:/Users/Data")
convert <- paste0('"', msconvertpath, '"', " msconvert ", '"', afile, '"', " -o ", '"', outfile, '"')
### ^ added missing escaped double quotes
system(convert)

The convert variable looks syntactically acceptable now:

> convert
[1] "\"C:/Program Files (x86)/ProteoWizard/ProteoWizard 3.0.21175.5b6d9afee/msconvert.exe\" msconvert \"C:/Users/Data/QC1.raw\" -o \"C:/Users/Data\""
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.