Society Magazine

Use msConvert on a Mac with M1 Chip for Converting .d Files to mzML

By Mischieviousmum

Through an internet search I came upon this blog post: https://yufree.cn/en/2019/10/15/use-msconvert-in-linux-or-mac/ which was a great starting point for getting my Agilent .d files converted. Due to some minor differences, I had to alter the code a bit to make it suitable for my use. To use this code, you will need the Docker Engine which I found easiest to obtain by downloading and installing Docker Desktop. Once you have Docker Desktop running, open your terminal window and input the following code:

docker pull chambm/pwiz-skyline-i-agree-to-the-vendor-licenses

Then, you can use a for loop to convert all files in a given folder from .d to mzML files in the same folder using the following:

for f in /insert/your/file/pathway/here/*.ext; do

#Replace ‘.ext’ with your file extension. In this case, .d

  filename=$(basename -- "$f")

  docker run --platform linux/amd64 -it --rm -e "WINEDEBUG=-all" -v /insert/your/file/pathway/here:/data chambm/pwiz-skyline-i-agree-to-the-vendor-licenses wine msconvert /data/"$filename"

done

Because I’m running the Docker image on the M1 chip, I added the command ‘–platform linux/amd64’ to specify the platform.

Thank you to Yu Miao for the original code and idea to use Docker image. I was really lost!


Back to Featured Articles on Logo Paperblog