You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use msconvert to convert scans saved to .wiff files (from a SCIEX instrument) to .mzML. The following script is part of a GUI we use to process UVPD data measured on a modified SCIEX 5500, which works fine w/ the msconvert.exe found in ProteoWizard 3.0.11392, but does not work for any v3.0.2 variant. Specifically, when processing a .wiff and associated .wiff.scan file, the full filename of the first and last scans is truncated. All other scans are extracted and named normally.
Note that the filenames contain some verbose info about the filenames and a -### before the .wiff(.scan) extension. An example .wiff file for testing can be found at our GitHub.
Thanks!
importos, traceback, subprocess, timefromPyQt6.QtWidgetsimportQApplicationdefconvert_wiff_to_mzml(wiff_file, directory, mzml_directory):
''' Function to convert .wiff files to .mzml using msconvert input is .wiff file, directory that contains .wiff files, and directory to output mzml files to'''#check if required files are presentwiff_file_check=os.path.join(directory, wiff_file)
scan_file_check=f'{os.path.join(directory, wiff_file)}.scan'ifnotos.path.exists(wiff_file_check):
print(f'The corresponding .wiff file is missing from the directory. Please add the following file to the directory, and re-run the code:\n{os.path.basename(wiff_file_check)}\n\n')
QApplication.processEvents()
returnFalseifnotos.path.exists(scan_file_check):
print(f'The corresponding .scan file is missing from the directory. Please add the following file to the directory, and re-run the code:\n{os.path.basename(scan_file_check)}\n\n')
QApplication.processEvents()
returnFalsetry:
subprocess.run(['msconvert', os.path.join(directory, wiff_file), '-o', mzml_directory, '--mzML', '--64'])
os.remove(temp_command_file)
time.sleep(2)
returnTrueexceptFileNotFoundError:
print("msconvert (Part of proteowizard) could not be found. Did you add the required directories to your system's PATH?\n")
QApplication.processEvents()
returnFalseexceptsubprocess.CalledProcessErrorascpe:
print(f'Subprocess error converting {wiff_file} to mzML: {cpe}\nTraceback: {traceback.format_exc()}\n')
QApplication.processEvents()
returnFalseexceptExceptionase:
print(f'Unexpected error converting {wiff_file} to mzML: {e}\nTraceback: {traceback.format_exc()}\n')
QApplication.processEvents()
returnFalse
The text was updated successfully, but these errors were encountered:
Hi proteowizard friends,
We use msconvert to convert scans saved to .wiff files (from a SCIEX instrument) to .mzML. The following script is part of a GUI we use to process UVPD data measured on a modified SCIEX 5500, which works fine w/ the msconvert.exe found in ProteoWizard 3.0.11392, but does not work for any v3.0.2 variant. Specifically, when processing a .wiff and associated .wiff.scan file, the full filename of the first and last scans is truncated. All other scans are extracted and named normally.
Note that the filenames contain some verbose info about the filenames and a -### before the .wiff(.scan) extension. An example .wiff file for testing can be found at our GitHub.
Thanks!
The text was updated successfully, but these errors were encountered: