Version in base suite: 3.0.8-1 Base version: libpwizlite_3.0.8-1 Target version: libpwizlite_3.0.15-1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/libp/libpwizlite/libpwizlite_3.0.8-1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/libp/libpwizlite/libpwizlite_3.0.15-1.dsc .gitignore | 11 CMakeLists.txt | 349 - CMakeStuff/systemUname.cmake | 12 CMakeStuff/targz-source-package-creation.cmake | 37 CMakeStuff/toolchains/apple-macport-toolchain.cmake | 6 CMakeStuff/toolchains/mxe-toolchain-langella.cmake | 39 CMakeStuff/toolchains/mxe-toolchain-rusconi.cmake | 37 CMakeStuff/toolchains/unix-toolchain.cmake | 42 CMakeStuff/toolchains/win10-mingw64-toolchain.cmake | 88 CMakeStuff/toolchains/win10-ucrt64-toolchain.cmake | 104 debian/changelog | 102 debian/control | 7 debian/copyright | 3 maintainer-scripts/extract-files-from-proteowizard-source-tree.sh | 16 src/CMakeLists.txt | 90 src/pwiz/data/common/cv.cpp | 911 ++ src/pwiz/data/common/cv.hpp | 403 + src/pwiz/data/misc/FrequencyData.hpp | 2 src/pwiz/data/msdata/DefaultReaderList.cpp | 8 src/pwiz/data/msdata/IO-FRusconi-removed-all-mzmlb-related-code.cpp | 3099 ---------- src/pwiz/data/msdata/IO.cpp | 14 src/pwiz/data/msdata/MSData.cpp | 19 src/pwiz/data/msdata/MSData.hpp | 2 src/pwiz/data/msdata/Reader.cpp | 7 src/pwiz/data/msdata/Reader.hpp | 2 src/pwiz/data/msdata/Serializer_MGF.cpp | 30 src/pwiz/data/msdata/Serializer_mzXML.cpp | 34 src/pwiz/data/msdata/SpectrumListWrapper.hpp | 6 src/pwiz/data/msdata/SpectrumList_MGF.cpp | 82 src/pwiz/data/msdata/SpectrumList_mzXML.cpp | 83 src/pwiz/utility/chemistry/IsotopeCalculator.hpp | 2 src/pwiz/utility/chemistry/IsotopeEnvelopeEstimator.hpp | 2 src/pwiz/utility/chemistry/IsotopeTable.hpp | 2 src/pwiz/utility/findmf/base/base/scale.hpp | 6 src/pwiz/utility/findmf/base/filter/utilities/gauss.hpp | 10 src/pwiz/utility/findmf/base/resample/utilities/determinebinwidth.hpp | 2 src/pwiz/utility/math/Stats.hpp | 2 src/pwiz/utility/minimxml/SAXParser.cpp | 2 src/pwiz/utility/minimxml/XMLWriter.cpp | 2 src/pwiz/utility/misc/BinaryData.hpp | 24 src/pwiz/utility/misc/Container.hpp | 2 src/pwiz/utility/misc/Filesystem-303.cpp | 748 -- src/pwiz/utility/misc/Filesystem-reduced-to-min-for-build-in-win10-mingw64.cpp | 784 -- src/pwiz/utility/misc/Filesystem-works-with-mxe.cpp | 914 ++ src/pwiz/utility/misc/Filesystem.cpp | 169 src/pwiz/utility/misc/Filesystem.hpp | 47 src/pwiz/utility/misc/Image.hpp | 2 src/pwiz/utility/misc/Std.hpp | 1 src/pwiz/utility/misc/VendorReaderTestHarness.hpp | 3 src/pwiz/utility/misc/cpp_cli_utilities.hpp | 2 src/pwiz/utility/misc/unit.hpp | 6 51 files changed, 2955 insertions(+), 5422 deletions(-) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpal3tvjc5/libpwizlite_3.0.8-1.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpal3tvjc5/libpwizlite_3.0.15-1.dsc: no acceptable signature found diff -Nru libpwizlite-3.0.8/.gitignore libpwizlite-3.0.15/.gitignore --- libpwizlite-3.0.8/.gitignore 2024-05-15 21:36:13.000000000 +0000 +++ libpwizlite-3.0.15/.gitignore 2026-11-10 12:51:53.000000000 +0000 @@ -1,9 +1,8 @@ .cache +.kdev4/ + +build/ compile_commands.json -.ycm_extra_conf.py -development.kdev4 -.kdev4 -*-swp -*.swp +*.kdev4 +_clang-format CMakeLists.txt.user -CMakeStuff/toolchains/mxe-* diff -Nru libpwizlite-3.0.8/CMakeLists.txt libpwizlite-3.0.15/CMakeLists.txt --- libpwizlite-3.0.8/CMakeLists.txt 2024-05-16 12:27:13.000000000 +0000 +++ libpwizlite-3.0.15/CMakeLists.txt 2026-11-10 12:51:53.000000000 +0000 @@ -13,7 +13,7 @@ set(PWIZLITE_VERSION_MAJOR "3") set(PWIZLITE_VERSION_MINOR "0") -set(PWIZLITE_VERSION_PATCH "8") +set(PWIZLITE_VERSION_PATCH "15") set(PWIZLITE_VERSION "${PWIZLITE_VERSION_MAJOR}.${PWIZLITE_VERSION_MINOR}.${PWIZLITE_VERSION_PATCH}") message(STATUS "${BoldYellow}CMAKE_LIBRARY_ARCHITECTURE: ${CMAKE_LIBRARY_ARCHITECTURE}${ColourReset}") @@ -56,14 +56,13 @@ # youcompleteme (vim plugin). set(CMAKE_EXPORT_COMPILE_COMMANDS 1) -if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json" ) - execute_process( COMMAND cmake -E copy_if_different - ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json - ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json +if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json") + execute_process( + COMMAND cmake -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json + ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json ) endif() - # We want C++17 set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -81,13 +80,12 @@ add_definitions(-Wextra) if(WARN_AS_ERROR) - message(STATUS "${BoldYellow}Setting definition -Werror.${ColourReset}") - add_definitions(-Werror) + message(STATUS "${BoldYellow}Setting definition -Werror.${ColourReset}") + add_definitions(-Werror) endif() message(STATUS "${BoldRed}CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}${ColourReset}") - # Initialize a list variable that will be updated depending on the specific # platforms below. list(APPEND PLATFORM_SPECIFIC_LINK_LIBRARIES "") @@ -95,29 +93,31 @@ ############################################################# # Platform-specific CMake configuration if(MXE) - include(${CMAKE_TOOLCHAINS_PATH}/mxe-toolchain.cmake) + include(${CMAKE_TOOLCHAINS_PATH}/mxe-toolchain-$ENV{USER}.cmake) - # Set the name to the systemUname variable because in this situation that name - # is not found, it it passed as a flag in the command line. - set(SYSTEM_UNAME_S "mxe") + # Set the name to the systemUname variable because in this situation that name + # is not found, it it passed as a flag in the command line. + set(SYSTEM_UNAME_S "mxe") elseif(UNIX AND NOT APPLE) - include(${CMAKE_TOOLCHAINS_PATH}/unix-toolchain.cmake) + include(${CMAKE_TOOLCHAINS_PATH}/unix-toolchain.cmake) elseif(WIN32 OR _WIN32) - if(WIN10MINGW64) + if(WIN10UCRT64) + + message("Building on WIN10UCRT64") - # The file below will actually #define WIN10MINGW64 for - # consumption by the src/pwiz/utility/misc/Filesystem.cpp file ! - include(${CMAKE_TOOLCHAINS_PATH}/win10-mingw64-toolchain.cmake) + # The file below will actually #define WIN10UCRT64 for + # consumption by the src/pwiz/utility/misc/Filesystem.cpp file ! + include(${CMAKE_TOOLCHAINS_PATH}/win10-ucrt64-toolchain.cmake) - endif() + endif() elseif(APPLE) - include(${CMAKE_TOOLCHAINS_PATH}/apple-macport-toolchain.cmake) + include(${CMAKE_TOOLCHAINS_PATH}/apple-macport-toolchain.cmake) endif() @@ -127,177 +127,236 @@ message(STATUS "${BoldYellow}The build toolchain is: ${SYSTEM_UNAME_S}${ColourReset}") message("") - ############################################################# ############################################################# # Essential software configuration message(STATUS "CMAKE_CURRENT_BINARY_DIR: " ${CMAKE_CURRENT_BINARY_DIR}) if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release CACHE STRING - "Type of build, options are: None, Debug, Release, RelWithDebInfo, MinSizeRel." - FORCE) + set(CMAKE_BUILD_TYPE + Release + CACHE STRING "Type of build, options are: None, Debug, Release, RelWithDebInfo, MinSizeRel." FORCE + ) endif(NOT CMAKE_BUILD_TYPE) if(CMAKE_BUILD_TYPE MATCHES "Release") - message(STATUS "Compiling in release mode.") - add_definitions("-DQT_NO_DEBUG_OUTPUT") + message(STATUS "Compiling in release mode.") + add_definitions("-DQT_NO_DEBUG_OUTPUT") endif() if(CMAKE_BUILD_TYPE MATCHES "Debug") - message(STATUS "Compiling in debug mode: ${MAKE_TEST}.") - message(STATUS "Add definition -ggdb3 to format debug output for GDB.") - add_definitions(-ggdb3) + message(STATUS "Compiling in debug mode: ${MAKE_TEST}.") + message(STATUS "Add definition -ggdb3 to format debug output for GDB.") + add_definitions(-ggdb3) endif() if(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo") - message(STATUS "Compiling in release with debug info mode.") -endif( CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo" ) + message(STATUS "Compiling in release with debug info mode.") +endif(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo") message(STATUS "${BoldYellow}CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}.${ColourReset}") - # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Set the CMAKE_PREFIX_PATH for the find_library fonction when using non # standard install location if(CMAKE_INSTALL_PREFIX) - set(CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}" ${CMAKE_PREFIX_PATH}) + set(CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}" ${CMAKE_PREFIX_PATH}) endif() # Subdirectories message(STATUS "Adding subdirectory src for PROJECT: ${PROJECT}") add_subdirectory(src) - -############################################################# -########################### -# CREATE THE SOURCE PACKAGE -include(${CMAKE_UTILS_PATH}/targz-source-package-creation.cmake) - -add_custom_target(archive - cpack -G TGZ --config CPackSourceConfig.cmake && mv - ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${PWIZLITE_VERSION}.tar.gz - ${CMAKE_SOURCE_DIR}/../tarballs && ln -sf - ${CMAKE_SOURCE_DIR}/../tarballs/${CMAKE_PROJECT_NAME}-${PWIZLITE_VERSION}.tar.gz - ${CMAKE_SOURCE_DIR}/../${CMAKE_PROJECT_NAME}_${PWIZLITE_VERSION}.orig.tar.gz && ln -sf - ${CMAKE_SOURCE_DIR}/../tarballs/${CMAKE_PROJECT_NAME}-${PWIZLITE_VERSION}.tar.gz - ${CMAKE_SOURCE_DIR}/../tarballs/${CMAKE_PROJECT_NAME}_${PWIZLITE_VERSION}.orig.tar.gz - - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Creating .tar.gz" VERBATIM -) - - # There are situations where we do not want CPack processing. # For that, configure the build using -DNO_CPACK=1. if(NOT NO_CPACK) - message("STATUS: Now managing the CPack process") + message("STATUS: Now managing the CPack process") - set(CPACK_CMAKE_GENERATOR "Unix Makefiles") - set(CPACK_GENERATOR "STGZ;TGZ;TZ") - set(CPACK_OUTPUT_CONFIG_FILE "./CPackConfig.cmake") - #set(CPACK_PACKAGE_DESCRIPTION_FILE ${LIBODSSTREAM_SOURCE_DIR}/COPYING) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A library that contains a subset of the ProteoWizard libpwiz library with code mainly aimed at loading MS files (XML-based and MGF).") - set(CPACK_PACKAGE_EXECUTABLES "libpwizlite") - set(CPACK_SOURCE_PACKAGE_FILE_NAME "libpwizlite-${PWIZLITE_VERSION}") - set(CPACK_SYSTEM_NAME "Linux-i686") - set(CPACK_PACKAGE_FILE_NAME "libpwizlite-${PWIZLITE_VERSION}-${CPACK_SYSTEM_NAME}") - set(CPACK_PACKAGE_INSTALL_DIRECTORY "libpwizlite ${PWIZLITE_VERSION}") - set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "libpwizlite ${PWIZLITE_VERSION}") - set(CPACK_PACKAGE_NAME "libpwizlite") - set(CPACK_PACKAGE_VENDOR "PAPPSO") - set(CPACK_PACKAGE_VERSION ${PWIZLITE_VERSION}) - set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/debian/copyright) - set(CPACK_SOURCE_GENERATOR "TGZ;TZ") - set(CPACK_SOURCE_OUTPUT_CONFIG_FILE "./CPackSourceConfig.cmake") - set(CPACK_SOURCE_STRIP_FILES "") - set(CPACK_SYSTEM_NAME "Linux-i686") - set(CPACK_TOPLEVEL_TAG "Linux-i686") - set(CPACK_SOURCE_PACKAGE_FILE_NAME "libpwizlite-${PWIZLITE_VERSION}") - - - set(CPACK_SOURCE_IGNORE_FILES - ".*\\\\.tar\\\\.gz" - "moc_.*cxx" - "\\\\.#.*" - ".*\\\\.aux" - ".*\\\\.bbl" - ".*\\\\.blg" - ".*\\\\.log" - ".*\\\\.out" - ".*\\\\.toc" - "/devel_archives/" - "/doc\\\\/html/" - "/doc\\\\/latex/" - "Makefile" - "install_manifest.txt" - "CMakeCache.txt" - "CPackConfig.cmake" - "CPackSourceConfig.cmake" - "/CMakeFiles/" - "/_CPack_Packages/" - "/Debug/" - "/Release/" - "/tests/" - "/\\\\.externalToolBuilders/" - "/\\\\.git/" - "/\\\\.kdev4/" - "/\\\\.settings/" - "Makefile" - "\\\\.gitignore" - "\\\\.cdtbuild" - "\\\\.cdtproject" - "\\\\.project" - "\\\\.cproject" - "/win32/" - "/win64/" - "/build/" - "/buildwin64/" - "/cbuild/" - "/wbuild/" - "/bin/" - "/buildmingw/" - "test\\\\.ods" - "buildwin32.cmd" - "libpwizlite.so" - "OpenDocument-v1.0-os.pdf" + set(CPACK_CMAKE_GENERATOR "Unix Makefiles") + set(CPACK_GENERATOR "STGZ;TGZ;TZ") + set(CPACK_OUTPUT_CONFIG_FILE "./CPackConfig.cmake") + #set(CPACK_PACKAGE_DESCRIPTION_FILE ${LIBODSSTREAM_SOURCE_DIR}/COPYING) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY + "A library that contains a subset of the ProteoWizard libpwiz library with code mainly aimed at loading MS files (XML-based and MGF)." + ) + set(CPACK_PACKAGE_EXECUTABLES "libpwizlite") + set(CPACK_SOURCE_PACKAGE_FILE_NAME "libpwizlite-${PWIZLITE_VERSION}") + set(CPACK_SYSTEM_NAME "Linux-i686") + set(CPACK_PACKAGE_FILE_NAME "libpwizlite-${PWIZLITE_VERSION}-${CPACK_SYSTEM_NAME}") + set(CPACK_PACKAGE_INSTALL_DIRECTORY "libpwizlite ${PWIZLITE_VERSION}") + set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "libpwizlite ${PWIZLITE_VERSION}") + set(CPACK_PACKAGE_NAME "libpwizlite") + set(CPACK_PACKAGE_VENDOR "PAPPSO") + set(CPACK_PACKAGE_VERSION ${PWIZLITE_VERSION}) + set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/debian/copyright) + set(CPACK_SOURCE_GENERATOR "TGZ;TZ") + set(CPACK_SOURCE_OUTPUT_CONFIG_FILE "./CPackSourceConfig.cmake") + set(CPACK_SOURCE_STRIP_FILES "") + set(CPACK_SYSTEM_NAME "Linux-i686") + set(CPACK_TOPLEVEL_TAG "Linux-i686") + set(CPACK_SOURCE_PACKAGE_FILE_NAME "libpwizlite-${PWIZLITE_VERSION}") + + set(CPACK_SOURCE_IGNORE_FILES + "\\\\.cache/" + ".*\\\\.tar\\\\.gz" + "moc_.*cxx" + "\\\\.#.*" + ".*\\\\.aux" + ".*\\\\.bbl" + ".*\\\\.blg" + ".*\\\\.log" + ".*\\\\.out" + ".*\\\\.toc" + "/devel_archives/" + "/doc\\\\/html/" + "/doc\\\\/latex/" + "Makefile" + "install_manifest.txt" + "CMakeCache.txt" + "CMakeLists.txt.user" + "CPackConfig.cmake" + "CPackSourceConfig.cmake" + "/CMakeFiles/" + "/_CPack_Packages/" + "/Debug/" + "/Release/" + "/tests/" + "/\\\\.externalToolBuilders/" + "/\\\\.git/" + "/\\\\.kdev4/" + "development.kdev4" + "/\\\\.settings/" + "Makefile" + "\\\\.cdtbuild" + "\\\\.cdtproject" + "\\\\.project" + "\\\\.cproject" + "/win32/" + "/win64/" + "/build/" + "/buildwin64/" + "/cbuild/" + "/wbuild/" + "/bin/" + "/buildmingw/" + "test\\\\.ods" + "buildwin32.cmd" + "libpwizlite.so" + "OpenDocument-v1.0-os.pdf" + "debian/" + "compile_commands.json" ) + set(CPACK_PACKAGE_EXECUTABLES "libpwizlite" "libpwizlite") - set(CPACK_PACKAGE_EXECUTABLES "libpwizlite" "libpwizlite") - - - # for debian package : - set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Olivier Langella ") - set(DEBIAN_PACKAGE_BUILDS_DEPENDS "Olivier Langella ") - - - - # to create a TGZ archive of the source code type shell command - # cpack -G TGZ --config CPackSourceConfig.cmake - - - add_custom_target(targz - cpack -G TGZ --config CPackSourceConfig.cmake && tar xvfz libpwizlite-${PWIZLITE_VERSION}.tar.gz - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Creating .tar.gz" VERBATIM + # for debian package : + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Olivier Langella ") + set(DEBIAN_PACKAGE_BUILDS_DEPENDS "Olivier Langella ") + + set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}") + set(CPACK_DEBSOURCE_PACKAGE_FILE_NAME "lib${CMAKE_PROJECT_NAME}_${CPACK_PACKAGE_VERSION}.orig") + include(CPack) + + # to create a TGZ archive of the source code type shell command + # cpack -G TGZ --config CPackSourceConfig.cmake + + add_custom_target( + targz + cpack + -G + TGZ + --config + CPackSourceConfig.cmake + && + tar + xvfz + libpwizlite-${PWIZLITE_VERSION}.tar.gz + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Creating .tar.gz" + VERBATIM ) + add_custom_target( + deb + ln + -s + libpwizlite-${PWIZLITE_VERSION}.tar.gz + libpwizlite_${PWIZLITE_VERSION}.orig.tar.gz + && + cp + -r + ${CMAKE_SOURCE_DIR}/debian + libpwizlite-${PWIZLITE_VERSION} + && + cd + libpwizlite-${PWIZLITE_VERSION} + && + dpkg-buildpackage + -B + DEPENDS targz + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Creating Debian package" + VERBATIM + ) - add_custom_target(deb - ln -s libpwizlite-${PWIZLITE_VERSION}.tar.gz libpwizlite_${PWIZLITE_VERSION}.orig.tar.gz && cd libpwizlite-${PWIZLITE_VERSION} && dpkg-buildpackage -B - DEPENDS targz - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Creating Debian package" VERBATIM + add_custom_target( + debsrc + ln + -s + libpwizlite-${PWIZLITE_VERSION}.tar.gz + libpwizlite_${PWIZLITE_VERSION}.orig.tar.gz + && + cd + libpwizlite-${PWIZLITE_VERSION} + && + debuild + -S + -sa + DEPENDS targz + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Creating Debian package" + VERBATIM ) else() - message("STATUS: Not including CPack") + message("STATUS: Not including CPack") endif(NOT NO_CPACK) +############################################################# +########################### +# CREATE THE SOURCE PACKAGE +include(${CMAKE_UTILS_PATH}/targz-source-package-creation.cmake) +message("Including file : ${CMAKE_UTILS_PATH}/targz-source-package-creation.cmake") +message("After file inclusion CPACK_SOURCE_IGNORE_FILES: ${CPACK_SOURCE_IGNORE_FILES}") + +add_custom_target( + archive + cpack + -G + TGZ + --config + CPackSourceConfig.cmake + && + mv + ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${PWIZLITE_VERSION}.tar.gz + ${CMAKE_SOURCE_DIR}/../tarballs + && + ln + -sf + ${CMAKE_SOURCE_DIR}/../tarballs/${CMAKE_PROJECT_NAME}-${PWIZLITE_VERSION}.tar.gz + ${CMAKE_SOURCE_DIR}/../${CMAKE_PROJECT_NAME}_${PWIZLITE_VERSION}.orig.tar.gz + && + ln + -sf + ${CMAKE_SOURCE_DIR}/../tarballs/${CMAKE_PROJECT_NAME}-${PWIZLITE_VERSION}.tar.gz + ${CMAKE_SOURCE_DIR}/../tarballs/${CMAKE_PROJECT_NAME}_${PWIZLITE_VERSION}.orig.tar.gz + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Creating .tar.gz" + VERBATIM +) diff -Nru libpwizlite-3.0.8/CMakeStuff/systemUname.cmake libpwizlite-3.0.15/CMakeStuff/systemUname.cmake --- libpwizlite-3.0.8/CMakeStuff/systemUname.cmake 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/CMakeStuff/systemUname.cmake 2026-11-10 12:51:53.000000000 +0000 @@ -3,16 +3,16 @@ macro(get_uname_string) -execute_process(COMMAND uname -s OUTPUT_VARIABLE SYSTEM_UNAME_S) +execute_process(COMMAND uname -s OUTPUT_VARIABLE SYSTEM_UNAME_S) -if(${SYSTEM_UNAME_S} MATCHES "MINGW64_NT-10.*") - message(STATUS "System detected as Windows10 with MINGW64, setting WIN32 AND WIN10MINGW64") +if(${SYSTEM_UNAME_S} MATCHES "MSYS_NT-10.0-*") + message(STATUS "System detected as Windows10 with UCRT64, setting WIN32 AND WIN10UCRT64") # Note that WIN32 is set even on 64 bits systems. set(WIN32 1) # This setting is only for CMake consumption - set(WIN10MINGW64 1) - # This definition is to be able to test #ifdef WIN10MINGW64 in source code files - add_definitions(-DWIN10MINGW64) + set(WIN10UCRT64 1) + # This definition is to be able to test #ifdef WIN10UCRT64 in source code files + add_definitions(-DWIN10UCRT64) #else() #message(STATUS "System is not Windows.") endif() diff -Nru libpwizlite-3.0.8/CMakeStuff/targz-source-package-creation.cmake libpwizlite-3.0.15/CMakeStuff/targz-source-package-creation.cmake --- libpwizlite-3.0.8/CMakeStuff/targz-source-package-creation.cmake 2024-05-15 21:57:40.000000000 +0000 +++ libpwizlite-3.0.15/CMakeStuff/targz-source-package-creation.cmake 2026-11-10 12:51:53.000000000 +0000 @@ -1,36 +1,9 @@ -# Packager - -# Note how the doc/user-manual/DC-user-manual is listed here: -# this is a generated file (configure_file) that needs not be -# in the tarball. However, because it is a configure_file it is -# generated right while doing 'cmake archive', so it is not -# possible that it be absent from source dir!set(CPACK_PACKAGE_NAME "massxpert2") set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME}) -set(CPACK_PACKAGE_VENDOR "msXpertSuite") +set(CPACK_PACKAGE_VENDOR "pappso") set(CPACK_PACKAGE_VERSION "${PWIZLITE_VERSION}") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Dumbed-down library from the ProteoWizard libpwiz source code for use with libpappsomspp") -set(CPACK_SOURCE_GENERATOR "TGZ") -set(CPACK_SOURCE_IGNORE_FILES - ".git/" - ".gitattributes" - - "CMakeStuff/toolchains/mxe-toolchain.cmake" - - ".cache" - "compile_commands.json" - - ${CPACK_PACKAGE_NAME}.kdev4 - ".kdev4" - "development.kdev4" - "Session.vim" - "debian" - - ${CPACK_SOURCE_IGNORE_FILES} +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY + "Dumbed-down library from the ProteoWizard libpwiz source code for use with libpappsomspp" ) +set(CPACK_SOURCE_GENERATOR "TGZ") -set(CPACK_SOURCE_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") - -include(CPack) - - +set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") diff -Nru libpwizlite-3.0.8/CMakeStuff/toolchains/apple-macport-toolchain.cmake libpwizlite-3.0.15/CMakeStuff/toolchains/apple-macport-toolchain.cmake --- libpwizlite-3.0.8/CMakeStuff/toolchains/apple-macport-toolchain.cmake 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/CMakeStuff/toolchains/apple-macport-toolchain.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# https://github.com/TRIQS/triqs/issues/523 -add_definitions(-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) - -# Only for Apple macport -set(CMAKE_MACOSX_RPATH 0) - diff -Nru libpwizlite-3.0.8/CMakeStuff/toolchains/mxe-toolchain-langella.cmake libpwizlite-3.0.15/CMakeStuff/toolchains/mxe-toolchain-langella.cmake --- libpwizlite-3.0.8/CMakeStuff/toolchains/mxe-toolchain-langella.cmake 1970-01-01 00:00:00.000000000 +0000 +++ libpwizlite-3.0.15/CMakeStuff/toolchains/mxe-toolchain-langella.cmake 2026-11-10 12:51:53.000000000 +0000 @@ -0,0 +1,39 @@ +# File:///home/langella/developpement/git/pappsomspp/CMakeStuff/toolchains/mxe-toolchain.cmake# +# This file should be included if the command line reads like this: +# x86_64-w64-mingw32.shared-cmake -DCMAKE_BUILD_TYPE=Release -DMXE=1 .. + +message("MXE (M cross environment) https://mxe.cc/") +message("Please run the configuration like this:") +message("x86_64-w64-mingw32.shared-cmake -DMXEOLIVIER=1 -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release ../../development") + + +set(MXE_ROOT_DIR "/opt/mxe") +set(MXE_SHIPPED_DLLS_DIR "${MXE_ROOT_DIR}/dlls-and-stuff-for-packages") + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES /opt/mxe/usr/x86_64-w64-mingw32.shared/include) +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES /opt/mxe/usr/x86_64-w64-mingw32.shared/include) + +if(WIN32 OR _WIN32) + message(STATUS "Building with WIN32 defined.") +endif() + +message(STATUS "${BoldGreen}Setting definition -DPMSPP_LIBRARY for symbol DLL export.${ColourReset}") +add_definitions(-DPMSPP_LIBRARY) + + +find_package(ZLIB REQUIRED) + + +find_package(Boost 1.85 COMPONENTS iostreams thread filesystem chrono REQUIRED) + +## We can build the package setup executable with this specific command. +add_custom_target(dllinstall + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/src/libpwizlite.dll ${MXE_SHIPPED_DLLS_DIR} + COMMENT "Build and copy the dll file to its MXE destination." + DEPENDS ${CORE_SOURCE_LIB} ${GUI_SOURCE_LIB} + VERBATIM) + +# On Win10 all the code is relocatable. +remove_definitions(-fPIC) + + diff -Nru libpwizlite-3.0.8/CMakeStuff/toolchains/mxe-toolchain-rusconi.cmake libpwizlite-3.0.15/CMakeStuff/toolchains/mxe-toolchain-rusconi.cmake --- libpwizlite-3.0.8/CMakeStuff/toolchains/mxe-toolchain-rusconi.cmake 1970-01-01 00:00:00.000000000 +0000 +++ libpwizlite-3.0.15/CMakeStuff/toolchains/mxe-toolchain-rusconi.cmake 2026-11-10 12:51:53.000000000 +0000 @@ -0,0 +1,37 @@ +# This file should be included if the command line reads like this: +# x86_64-w64-mingw32.shared-cmake -DCMAKE_BUILD_TYPE=Release -DMXE=1 .. + +message("MXE (M cross environment) https://mxe.cc/") +message("Please run the configuration like this:") +message("x86_64-w64-mingw32.shared-cmake -DMXE=1 -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release ../../development") + +set(HOME_DEVEL_DIR "/home/rusconi/devel") + +set(MXE_ROOT_DIR "${HOME_DEVEL_DIR}/mxe") +set(MXE_SHIPPED_DLLS_DIR "${MXE_ROOT_DIR}/dll-set-for-packages") + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${HOME_DEVEL_DIR}/mxe/usr/x86_64-w64-mingw32.shared/include) +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${HOME_DEVEL_DIR}/mxe/usr/x86_64-w64-mingw32.shared/include) + +if(WIN32 OR _WIN32) + message(STATUS "Building with WIN32 defined.") +endif() + +message(STATUS "${BoldGreen}Setting definition -DPMSPP_LIBRARY for symbol DLL export.${ColourReset}") +add_definitions(-DPMSPP_LIBRARY) + + +find_package(ZLIB REQUIRED) + + +find_package(Boost REQUIRED COMPONENTS iostreams thread filesystem chrono) + +## We can build the package setup executable with this specific command. +add_custom_target(dllinstall + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/src/libpwizlite.dll ${MXE_SHIPPED_DLLS_DIR} + COMMENT "Build and copy the dll file to its MXE destination." + DEPENDS pwizlite-shared + VERBATIM) + +# On Win10 all the code is relocatable. +remove_definitions(-fPIC) diff -Nru libpwizlite-3.0.8/CMakeStuff/toolchains/unix-toolchain.cmake libpwizlite-3.0.15/CMakeStuff/toolchains/unix-toolchain.cmake --- libpwizlite-3.0.8/CMakeStuff/toolchains/unix-toolchain.cmake 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/CMakeStuff/toolchains/unix-toolchain.cmake 2026-11-10 12:51:53.000000000 +0000 @@ -5,40 +5,28 @@ set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES /usr/include) set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES /usr/include) - find_package(ZLIB REQUIRED) - -find_package(Boost COMPONENTS iostreams thread filesystem chrono REQUIRED ) - - -include(FindHDF5) -find_package(HDF5 COMPONENTS CXX) - -#message(STATUS "HDF5_LIBRARIES: ${HDF5_LIBRARIES}") -message(STATUS "HDF5_CXX_LIBRARIES: ${HDF5_CXX_LIBRARIES}") -#message(STATUS "HDF5_INCLUDE_DIRS: ${HDF5_INCLUDE_DIRS}") -message(STATUS "HDF5_CXX_INCLUDE_DIRS: ${HDF5_CXX_INCLUDE_DIRS}") - -# On GNU/Linux, we can use mzMLb. -# add_definitions(-DWITHOUT_MZMLB) +find_package(Boost REQUIRED COMPONENTS iostreams thread filesystem chrono) add_definitions(-fPIC) # Install cmake module -install(FILES ${CMAKE_MODULE_PATH}/FindPwizLite.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pwizlite) +install( + FILES ${CMAKE_MODULE_PATH}/FindPwizLite.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pwizlite +) # Install cmake config -configure_file (${CMAKE_MODULE_PATH}/PwizLiteConfig.cmake.in - ${CMAKE_BINARY_DIR}/PwizLiteConfig.cmake) -install(FILES ${CMAKE_BINARY_DIR}/PwizLiteConfig.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pwizlite) +configure_file(${CMAKE_MODULE_PATH}/PwizLiteConfig.cmake.in ${CMAKE_BINARY_DIR}/PwizLiteConfig.cmake) +install( + FILES ${CMAKE_BINARY_DIR}/PwizLiteConfig.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pwizlite +) # Install the PkgConfig config file -configure_file (${CMAKE_MODULE_PATH}/pkgconfig/libpwizlite.pc.in - ${CMAKE_BINARY_DIR}/libpwizlite.pc) -install(FILES ${CMAKE_BINARY_DIR}/libpwizlite.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - - +configure_file(${CMAKE_MODULE_PATH}/pkgconfig/libpwizlite.pc.in ${CMAKE_BINARY_DIR}/libpwizlite.pc) +install( + FILES ${CMAKE_BINARY_DIR}/libpwizlite.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff -Nru libpwizlite-3.0.8/CMakeStuff/toolchains/win10-mingw64-toolchain.cmake libpwizlite-3.0.15/CMakeStuff/toolchains/win10-mingw64-toolchain.cmake --- libpwizlite-3.0.8/CMakeStuff/toolchains/win10-mingw64-toolchain.cmake 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/CMakeStuff/toolchains/win10-mingw64-toolchain.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -message("\n${BoldRed}WIN10-MINGW64 environment${ColourReset}\n") -message("Please run the configuration like this:") -message("cmake -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release ../development") - - -set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "c:/msys64/mingw64/include") -set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "c:/msys64/mingw64/bin") - - -if(WIN32 OR _WIN32) - message(STATUS "Building with WIN32 or _WIN32 defined and WIN10MINGW64 defined also.") -endif() - - -find_package(ZLIB REQUIRED) - - -find_package(Boost COMPONENTS iostreams thread filesystem chrono REQUIRED ) - -# Sadly, this configuration makes the pwizlite link with the static -# library, which we want to avoid so that the behaviour is identical -# to what happens on GNU/Linux. -# include(FindHDF5) -# find_package(HDF5 COMPONENTS CXX) - -#message(STATUS "HDF5_LIBRARIES: ${HDF5_LIBRARIES}") -message(STATUS "HDF5_CXX_LIBRARIES: ${HDF5_CXX_LIBRARIES}") -#message(STATUS "HDF5_INCLUDE_DIRS: ${HDF5_INCLUDE_DIRS}") -message(STATUS "HDF5_CXX_INCLUDE_DIRS: ${HDF5_CXX_INCLUDE_DIRS}") - - -set(hdf5_FOUND 1) -set(hdf5_INCLUDE_DIRS "C:/msys64/ucrt64/include") -set(hdf5_LIBRARIES "C:/msys64/ucrt64/bin/libhdf5_cpp-310.dll") -if(NOT TARGET hdf5::hdf5_cpp) - add_library(hdf5::hdf5_cpp UNKNOWN IMPORTED) - set_target_properties(hdf5::hdf5_cpp PROPERTIES - IMPORTED_LOCATION "${hdf5_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${hdf5_INCLUDE_DIRS}" - ) -endif() - -# F. Rusconi -# At the moment, mzMLb does not work on Win10 because the -# link step fails with tons of undefined references to libhdf5. -# I tried hard but failed to make that work. -# -# So the procedure as follows: -# -set(hdf5_LIBRARIES "") -set(hdf5_INCLUDE_DIRS "") -add_definitions(-DWITHOUT_MZMLB) -# -# Move pwiz/data/msdata/IO-FRusconi-removed-all-mzmlb-related-code.cpp -# to -# pwiz/data/msdata/IO.cpp -# -# In the src/CMakeLists.txt, comment out file -# pwiz/data/msdata/mzmlb/Connection_mzMLb.cpp -# from the list of source files. - -# see https://cmake.org/pipermail/cmake/2015-December/062166.html -set(CMAKE_NO_SYSTEM_FROM_IMPORTED 1) - -# Specific library to link to: -message(STATUS "Add psapi.dll as a win64-specific link-time dependency.") -list(APPEND PLATFORM_SPECIFIC_LINK_LIBRARIES "psapi") - -# On Win10 all the code is relocatable. -remove_definitions(-fPIC) - -# Install cmake module -install(FILES ${CMAKE_MODULE_PATH}/FindPwizLite.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pwizlite) - -# Install cmake config -configure_file (${CMAKE_MODULE_PATH}/PwizLiteConfig.cmake.in - ${CMAKE_BINARY_DIR}/PwizLiteConfig.cmake) -install(FILES ${CMAKE_BINARY_DIR}/PwizLiteConfig.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pwizlite) - -# Install the PkgConfig config file -configure_file (${CMAKE_MODULE_PATH}/pkgconfig/libpwizlite.pc.in - ${CMAKE_BINARY_DIR}/libpwizlite.pc) -install(FILES ${CMAKE_BINARY_DIR}/libpwizlite.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - - diff -Nru libpwizlite-3.0.8/CMakeStuff/toolchains/win10-ucrt64-toolchain.cmake libpwizlite-3.0.15/CMakeStuff/toolchains/win10-ucrt64-toolchain.cmake --- libpwizlite-3.0.8/CMakeStuff/toolchains/win10-ucrt64-toolchain.cmake 1970-01-01 00:00:00.000000000 +0000 +++ libpwizlite-3.0.15/CMakeStuff/toolchains/win10-ucrt64-toolchain.cmake 2026-11-10 12:51:53.000000000 +0000 @@ -0,0 +1,104 @@ +message("\n${BoldRed} Start WIN10-WIN10UCRT64 environment configuration${ColourReset}\n") +message("Please run the configuration like this:") +message("cmake -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release ../development") + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "c:/msys64/ucrt64/include") +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "c:/msys64/ucrt64/bin") + + +set(HOME_DEVEL_DIR "$ENV{HOME}/devel") +set(WIN10_SHIPPED_DLLS_DIR "${HOME_DEVEL_DIR}/dll-set-for-packages") + +if(WIN32 OR _WIN32) + message(STATUS "Building with WIN32 or _WIN32 defined and WIN10UCRT64 defined also.") +endif() + + +find_package(ZLIB REQUIRED) + + +find_package(Boost COMPONENTS iostreams thread filesystem chrono REQUIRED ) + +# Sadly, this configuration makes the pwizlite link with the static +# library, which we want to avoid so that the behaviour is identical +# to what happens on GNU/Linux. +# include(FindHDF5) +# find_package(HDF5 COMPONENTS CXX) + +#message(STATUS "HDF5_LIBRARIES: ${HDF5_LIBRARIES}") +#message(STATUS "HDF5_CXX_LIBRARIES: ${HDF5_CXX_LIBRARIES}") +#message(STATUS "HDF5_INCLUDE_DIRS: ${HDF5_INCLUDE_DIRS}") +#message(STATUS "HDF5_CXX_INCLUDE_DIRS: ${HDF5_CXX_INCLUDE_DIRS}") + +message(STATUS "Add HDF5 libs as a win64-specific link-time dependency.") +set(hdf5_FOUND 1) +set(hdf5_INCLUDE_DIRS "C:/msys64/ucrt64/include") + +add_library(hdf5::generic UNKNOWN IMPORTED) + set_target_properties(hdf5::generic PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${hdf5_INCLUDE_DIRS} + IMPORTED_LOCATION "C:/msys64/ucrt64/bin/libhdf5-310.dll") + +add_library(hdf5::cxx UNKNOWN IMPORTED) + set_target_properties(hdf5::cxx PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${hdf5_INCLUDE_DIRS} + IMPORTED_LOCATION "C:/msys64/ucrt64/bin/libhdf5_cpp-310.dll") + +add_library(hdf5::hdf5_cpp INTERFACE IMPORTED) +set_property(TARGET hdf5::hdf5_cpp PROPERTY + INTERFACE_LINK_LIBRARIES hdf5::generic hdf5::cxx) + + +# F. Rusconi +# At the moment, mzMLb does not work on Win10 because the +# link step fails with tons of undefined references to libhdf5. +# I tried hard but failed to make that work. +# +# So the procedure as follows: +# +# set(hdf5_LIBRARIES "") +# set(hdf5_INCLUDE_DIRS "") +# add_definitions(-DWITHOUT_MZMLB) +# +# Move pwiz/data/msdata/IO-FRusconi-removed-all-mzmlb-related-code.cpp +# to +# pwiz/data/msdata/IO.cpp +# +# In the src/CMakeLists.txt, comment out file +# pwiz/data/msdata/mzmlb/Connection_mzMLb.cpp +# from the list of source files. + +# see https://cmake.org/pipermail/cmake/2015-December/062166.html +set(CMAKE_NO_SYSTEM_FROM_IMPORTED 1) + +# Specific library to link to: +message(STATUS "Add psapi.dll as a win64-specific link-time dependency.") +list(APPEND PLATFORM_SPECIFIC_LINK_LIBRARIES "psapi") +# Install cmake module +install(FILES ${CMAKE_MODULE_PATH}/FindPwizLite.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pwizlite) + +# Install cmake config +configure_file (${CMAKE_MODULE_PATH}/PwizLiteConfig.cmake.in + ${CMAKE_BINARY_DIR}/PwizLiteConfig.cmake) +install(FILES ${CMAKE_BINARY_DIR}/PwizLiteConfig.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pwizlite) + +# Install the PkgConfig config file +configure_file (${CMAKE_MODULE_PATH}/pkgconfig/libpwizlite.pc.in + ${CMAKE_BINARY_DIR}/libpwizlite.pc) +install(FILES ${CMAKE_BINARY_DIR}/libpwizlite.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +message("\n${BoldRed} Done WIN10-WIN10UCRT64 environment configuration${ColourReset}\n") + + +add_custom_target(dllinstall + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/src/libpwizlite.dll ${WIN10_SHIPPED_DLLS_DIR} + COMMENT "Build and copy the dll file to its WIN10 destination." + DEPENDS pwizlite-shared + VERBATIM) + +# On Win10 all the code is relocatable. +remove_definitions(-fPIC) + diff -Nru libpwizlite-3.0.8/debian/changelog libpwizlite-3.0.15/debian/changelog --- libpwizlite-3.0.8/debian/changelog 2024-05-16 12:24:07.000000000 +0000 +++ libpwizlite-3.0.15/debian/changelog 2026-11-10 11:28:57.000000000 +0000 @@ -1,3 +1,104 @@ +libpwizlite (3.0.15-1) stable; urgency=medium + + * No more two different versions of d/control for sid and trixie. + * Remove versioning from find_package(Boost) in unix-toolchain.cmake. + + -- Filippo Rusconi Tue, 10 Nov 2026 12:28:57 +0100 + +libpwizlite (3.0.14-2~trixie+1) trixie; urgency=medium + + * New version for new Debian package, backport to trixie. + + -- Olivier Langella Fri, 20 Mar 2026 14:51:12 +0100 + +libpwizlite (3.0.14-2) unstable; urgency=medium + + * Try to actually fix use unversioned libboost package names + (closes: #1128107, thanks to Anton Gladky . + + -- Filippo Rusconi Mon, 09 Mar 2026 11:11:19 +0100 + +libpwizlite (3.0.14-1) unstable; urgency=medium + + * New version reverting changes in Filesystem.cpp. + * In d/control, use unversioned libboost package names + (closes: #1128107, thanks to Anton Gladky . + + -- Filippo Rusconi Mon, 23 Feb 2026 13:36:50 +0100 + +libpwizlite (3.0.13-1~trixie+1) trixie; urgency=medium + + * New version for new Debian package, backport to trixie. + + -- Olivier Langella Tue, 02 Dec 2025 10:03:54 +0100 + +libpwizlite (3.0.13-1) trixie; urgency=low + + * Implement back the ability to build for WIN10-MSYS2. + + -- Filippo Rusconi Mon, 01 Dec 2025 12:36:21 +0100 + +libpwizlite (3.0.12-1~trixie+1) trixie; urgency=medium + + * New version for new Debian package, backport to trixie. + + -- Olivier Langella Mon, 17 Nov 2025 13:17:47 +0100 + +libpwizlite (3.0.12-1) unstable; urgency=low + + * New upstream version to force passage to testing. + + -- Filippo Rusconi Fri, 07 Nov 2025 10:07:49 +0100 + +libpwizlite (3.0.11-1) unstable; urgency=low + + * Minor updates to the build framework. + + -- Filippo Rusconi Tue, 21 Oct 2025 18:40:25 +0200 + +libpwizlite (3.0.10-2~trixie+1) trixie; urgency=medium + + * New version for new Debian package, backport to trixie. + + -- Olivier Langella Sat, 04 Oct 2025 12:55:21 +0200 + +libpwizlite (3.0.10-1~trixie+1) trixie; urgency=medium + + * New version for new Debian package, backport to trixie. + + -- Olivier Langella Sat, 20 Sep 2025 07:06:57 +0200 + +libpwizlite (3.0.10-1) unstable; urgency=low + + * New updated source tree using the github git repos (git clone of master + today, commit 15279682f644e55e27333dead7929c8533854916), + then used the maintainer-scripts/extract-files-from-proteowizard-source-tree.sh. + * This new version that fixes the build with boost1.88. + * Took advantage to remove support for MZMLb, which is not needed + # pwiz/data/msdata/mzmlb/Connection_mzMLb.cpp in src/CMakeLists.txt + and adding flag with add_definitions(-DWITHOUT_MZ5 -DWITHOUT_MZMLB) + * Standards-Version: 4.7.2 (no specific modifs performed). + + -- Filippo Rusconi Sun, 07 Sep 2025 15:57:48 +0200 + +libpwizlite (3.0.9-1~bookworm+1) bookworm; urgency=medium + + * New version for new Debian package, backport to bookworm. + + -- Olivier Langella Thu, 26 Jun 2025 10:26:03 +0200 + +libpwizlite (3.0.9-1) unstable; urgency=low + + * New version for new Debian package. + + -- Filippo Rusconi Thu, 29 May 2025 06:09:05 +0200 + +libpwizlite (3.0.8-1~bookworm+1) bookworm; urgency=medium + + * debian package for PAPPSO bookworm repository + + -- Olivier Langella Tue, 28 May 2024 14:40:23 +0200 + libpwizlite (3.0.8-1) unstable; urgency=low * New upstream version with small glitch. @@ -127,4 +228,3 @@ package name custompwiz, but libpwizlite seems more adequate. -- Filippo Rusconi Thu, 28 May 2020 20:39:58 +0200 - diff -Nru libpwizlite-3.0.8/debian/control libpwizlite-3.0.15/debian/control --- libpwizlite-3.0.8/debian/control 2024-05-16 12:24:07.000000000 +0000 +++ libpwizlite-3.0.15/debian/control 2026-11-10 11:28:57.000000000 +0000 @@ -11,10 +11,11 @@ libboost-filesystem-dev, libboost-iostreams-dev, libboost-chrono-dev, + libboost-random-dev, zlib1g-dev, - python3-docutils, - libhdf5-dev -Standards-Version: 4.6.2 +# For rst2man + python3-docutils +Standards-Version: 4.7.2 Section: libs Homepage: https://salsa.debian.org/debichem-team/libpwizlite Vcs-Browser: https://salsa.debian.org/debichem-team/libpwizlite diff -Nru libpwizlite-3.0.8/debian/copyright libpwizlite-3.0.15/debian/copyright --- libpwizlite-3.0.8/debian/copyright 2024-05-16 12:24:07.000000000 +0000 +++ libpwizlite-3.0.15/debian/copyright 2026-11-10 11:28:57.000000000 +0000 @@ -16,7 +16,6 @@ src/pwiz/data/msdata/DefaultReaderList.*pp src/pwiz/data/msdata/Diff.hpp src/pwiz/data/msdata/IO.*pp - src/pwiz/data/msdata/IO-FRusconi*.cpp src/pwiz/data/msdata/LegacyAdapter.*pp src/pwiz/data/msdata/MSData.*pp src/pwiz/data/msdata/MSDataFile.*pp @@ -64,8 +63,6 @@ Files: src/pwiz/utility/misc/CharIndexedVector.hpp - src/pwiz/utility/misc/Filesystem-303.cpp - src/pwiz/utility/misc/Filesystem-reduced-to-min-for-build-in-win10-mingw64.cpp Copyright: 2008 Vanderbilt University - Nashville, TN 37232 2008 Spielberg Family Center for Applied Proteomics 2003 Cedars Sinai Medical Center, Los Angeles, California 90048 diff -Nru libpwizlite-3.0.8/maintainer-scripts/extract-files-from-proteowizard-source-tree.sh libpwizlite-3.0.15/maintainer-scripts/extract-files-from-proteowizard-source-tree.sh --- libpwizlite-3.0.8/maintainer-scripts/extract-files-from-proteowizard-source-tree.sh 2024-05-15 21:37:41.000000000 +0000 +++ libpwizlite-3.0.15/maintainer-scripts/extract-files-from-proteowizard-source-tree.sh 2026-11-10 12:51:53.000000000 +0000 @@ -25,7 +25,7 @@ printf "\nNote that you must be located in the directory that is up one depth from the source directory of interest, providing a relative path to it. The - destination directory might be absolute." + destination directory might be absolute." printf "A typical invocation might be:\n" printf "$0 \n\n" @@ -105,9 +105,9 @@ for file in $(find ${src_tree_dir} -type f) -do +do - printf "Working on ${file}... \n" + printf "Working on ${file}... " dir_name=$(dirname ${file}) base_name=$(basename ${file}) @@ -127,16 +127,12 @@ printf "mkdir -p ${dest_tree_dir}/${dir_name}\n" mkdir -p ${dest_tree_dir}/${dir_name} - printf "cp ${file} ${dest_tree_dir}/${file}\n" - cp ${file} ${dest_tree_dir}/${file} + printf "cp -v ${file} ${dest_tree_dir}/${file}\n" + cp -v ${file} ${dest_tree_dir}/${file} else -<<<<<<< HEAD - printf "Dry run, should be copying ${file} to ${dest_tree_dir}/${file}.\n" -======= - printf "Dry run, not copying ${file} to ${dest_tree_dir}/${file}.\n" ->>>>>>> 4b1f6a2 (Reinstate the script.) + printf "Dry run, would be copying ${file} to ${dest_tree_dir}/${file}.\n" fi diff -Nru libpwizlite-3.0.8/src/CMakeLists.txt libpwizlite-3.0.15/src/CMakeLists.txt --- libpwizlite-3.0.8/src/CMakeLists.txt 2024-05-15 21:36:35.000000000 +0000 +++ libpwizlite-3.0.15/src/CMakeLists.txt 2026-11-10 12:51:53.000000000 +0000 @@ -9,17 +9,19 @@ find_package(ZLIB REQUIRED) - # BOOST if(NOT Boost_FOUND) message(STATUS "Boost not yet found. Searching for it.") - find_package(Boost COMPONENTS iostreams thread filesystem chrono REQUIRED) + find_package( + Boost + COMPONENTS iostreams thread filesystem chrono + REQUIRED + ) endif() message(STATUS "Boost_LIBRARIES found ${Boost_LIB_VERSION}") message(STATUS "Boost_INCLUDES: ${Boost_INCLUDE_DIRS}") message(STATUS "Boost_LIB_DIRS: ${Boost_LIBRARY_DIRS}") - set(pwizlite_RCCS libpwizliteresources.qrc) # File list @@ -42,11 +44,7 @@ pwiz/data/msdata/Version.cpp pwiz/data/msdata/BinaryDataEncoder.cpp pwiz/data/msdata/DefaultReaderList.cpp - # This file contains all the new mzMLb code. See below. pwiz/data/msdata/IO.cpp - # If the mzMLb format is not necessary, the variant below of the IO.cpp file - # works fine in conjunction with the -DWITHOUT_MZMLB define. - # pwiz/data/msdata/IO-FRusconi-removed-all-mzmlb-related-code.cpp pwiz/data/msdata/Index_mzML.cpp pwiz/data/msdata/MSData.cpp pwiz/data/msdata/MSDataFile.cpp @@ -59,7 +57,9 @@ pwiz/data/msdata/SpectrumList_MGF.cpp pwiz/data/msdata/SpectrumList_MSn.cpp pwiz/data/msdata/SpectrumWorkerThreads.cpp - pwiz/data/msdata/mzmlb/Connection_mzMLb.cpp + # Remove this source file and add definition -DWITHOUT_MZMLB in + # src/CMakeLists.txt to build without mzMLb. + # pwiz/data/msdata/mzmlb/Connection_mzMLb.cpp pwiz/utility/minimxml/SAXParser.cpp pwiz/utility/minimxml/XMLWriter.cpp pwiz/utility/misc/Base64.cpp @@ -70,68 +70,70 @@ pwiz/utility/misc/BinaryData.cpp pwiz/utility/misc/IntegerSet.cpp pwiz/utility/misc/String.cpp - pwiz/utility/misc/Filesystem.cpp) + pwiz/utility/misc/Filesystem.cpp +) -add_definitions(-DWITHOUT_MZ5 - ${HDF5_CFLAGS}) +add_definitions(-DWITHOUT_MZ5 -DWITHOUT_MZMLB) # Build the static lib -add_library(pwizlite-static STATIC ${pwizlite_SRCS}) +add_library( + pwizlite-static STATIC + ${pwizlite_SRCS} +) + +target_include_directories( + pwizlite-static + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/boost +) -target_include_directories(pwizlite-static PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/boost) +set_target_properties(pwizlite-static PROPERTIES OUTPUT_NAME pwizlite CLEAN_DIRECT_OUTPUT 1) -set_target_properties(pwizlite-static - PROPERTIES OUTPUT_NAME pwizlite - CLEAN_DIRECT_OUTPUT 1 - ) - -target_link_libraries(pwizlite-static +target_link_libraries( + pwizlite-static Boost::iostreams Boost::filesystem Boost::thread Boost::chrono ZLIB::ZLIB ${PLATFORM_SPECIFIC_LINK_LIBRARIES} +) - -Wl,--no-as-needed - hdf5::hdf5_cpp - -Wl,--as-needed) - - -add_library(pwizlite-shared SHARED ${pwizlite_SRCS} ${pwizlite_RCC_SRCS}) -set_target_properties(pwizlite-shared +add_library( + pwizlite-shared SHARED + ${pwizlite_SRCS} ${pwizlite_RCC_SRCS} +) +set_target_properties( + pwizlite-shared PROPERTIES OUTPUT_NAME pwizlite - CLEAN_DIRECT_OUTPUT 1 - VERSION ${PWIZLITE_VERSION} - SOVERSION ${PWIZLITE_VERSION_MAJOR} - ) - -target_include_directories(pwizlite-shared PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/boost) + CLEAN_DIRECT_OUTPUT 1 + VERSION ${PWIZLITE_VERSION} + SOVERSION ${PWIZLITE_VERSION_MAJOR} +) + +target_include_directories( + pwizlite-shared + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/boost +) -target_link_libraries(pwizlite-shared +target_link_libraries( + pwizlite-shared Boost::iostreams Boost::filesystem Boost::thread Boost::chrono ZLIB::ZLIB ${PLATFORM_SPECIFIC_LINK_LIBRARIES} - - -Wl,--no-as-needed - hdf5::hdf5_cpp - -Wl,--as-needed) - +) # Install lib -install(TARGETS pwizlite-shared pwizlite-static +install( + TARGETS pwizlite-shared pwizlite-static LIBRARY NAMELINK_SKIP ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - # This one is for WIN32 + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # This one is for WIN32 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ) +) if(MXE) target_compile_definitions(pwizlite-shared PUBLIC MXE) diff -Nru libpwizlite-3.0.8/src/pwiz/data/common/cv.cpp libpwizlite-3.0.15/src/pwiz/data/common/cv.cpp --- libpwizlite-3.0.8/src/pwiz/data/common/cv.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/common/cv.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -117,6 +117,7 @@ {NCIT_Property_or_Attribute, "NCIT:0320189", "Property or Attribute", "A distinguishing quality or prominent aspect of a person, object, action, process, or substance.", false}, {NCIT_Temporal_Qualifier, "NCIT:0321514", "Temporal Qualifier", "Terms used to indicate units of time or other terms associated with time.", false}, {NCIT_Duration, "NCIT:0325330", "Duration", "The period of time during which something continues.", false}, + {NCIT_Number, "NCIT:0325337", "Number", "A numeral or string of numerals expressing value, quantity, or identification.", false}, {NCIT_Action, "NCIT:0325404", "Action", "A thing done.", false}, {NCIT_Characteristic, "NCIT:0325447", "Characteristic", "The distinguishing qualities or prominent aspect of a person, object, action, process, or substance.", false}, {NCIT_Qualifier, "NCIT:0341009", "Qualifier", "A term that helps define and render a concept unique.", false}, @@ -245,7 +246,7 @@ {MS_pulse_counting, "MS:1000118", "pulse counting", "Definition to do.", false}, {MS_time_digital_converter, "MS:1000119", "time-digital converter", "A device for converting a signal of sporadic pluses into a digital representation of their time indices.", false}, {MS_transient_recorder, "MS:1000120", "transient recorder", "A detector acquisition mode used for detecting transient signals.", false}, - {MS_SCIEX_instrument_model, "MS:1000121", "SCIEX instrument model", "The brand of instruments from the joint venture between Applied Biosystems and MDS Analytical Technologies (formerly MDS SCIEX). Previously branded as \\\"Applied Biosystems|MDS SCIEX\\\".", false}, + {MS_SCIEX_instrument_model, "MS:1000121", "SCIEX instrument model", "SCIEX instrument model.", false}, {MS_Bruker_Daltonics_instrument_model, "MS:1000122", "Bruker Daltonics instrument model", "Bruker Daltonics' instrument model.", false}, {MS_IonSpec_instrument_model, "MS:1000123", "IonSpec instrument model", "IonSpec corporation instrument model.", false}, {MS_Shimadzu_instrument_model, "MS:1000124", "Shimadzu instrument model", "Shimadzu corporation instrument model.", false}, @@ -518,6 +519,7 @@ {MS_ion_pair_formation_OBSOLETE, "MS:1000391", "ion-pair formation", "The reaction of a molecule to form both a positive ion and negative ion fragment among the products.", true}, {MS_ionization_efficiency, "MS:1000392", "ionization efficiency", "The ratio of the number of ions formed to the number of electrons, molecules or photons used.", false}, {MS_laser_desorption_ionization, "MS:1000393", "laser desorption ionization", "The formation of gas-phase ions by the interaction of a pulsed laser with a solid or liquid material.", false}, + {MS_no_sequence_database, "MS:1000394", "no sequence database", "No reference sequence database was used in the search process to determine the identified peptide sequence, for example as with de novo sequencing.", false}, {MS_liquid_secondary_ionization, "MS:1000395", "liquid secondary ionization", "The ionization of any species by the interaction of a focused beam of ions with a sample that is dissolved in a solvent matrix. See also fast atom bombardment and secondary ionization.", false}, {MS_membrane_inlet, "MS:1000396", "membrane inlet", "A semi-permeable membrane separator that permits the passage of gas sample directly to the mass spectrometer ion source.", false}, {MS_microelectrospray, "MS:1000397", "microelectrospray", "Electrospray ionization at a solvent flow rate of 300-800 nL/min where the flow is a result of a mechanical pump. See nanoelectrospray.", false}, @@ -623,8 +625,8 @@ {MS_zoom_scan, "MS:1000497", "zoom scan", "Special scan mode where data with improved resolution is acquired. This is typically achieved by scanning a more narrow m/z window or scanning with a lower scan rate.", false}, {MS_full_scan_OBSOLETE, "MS:1000498", "full scan", "Feature of the ion trap mass spectrometer where MS data is acquired over a mass range.", true}, {MS_spectrum_attribute, "MS:1000499", "spectrum attribute", "Nonphysical characteristic attributed to a spectrum.", false}, - {MS_scan_window_upper_limit, "MS:1000500", "scan window upper limit", "The lower m/z bound of a mass spectrometer scan window.", false}, - {MS_scan_window_lower_limit, "MS:1000501", "scan window lower limit", "The upper m/z bound of a mass spectrometer scan window.", false}, + {MS_scan_window_upper_limit, "MS:1000500", "scan window upper limit", "The upper m/z bound of a mass spectrometer scan window.", false}, + {MS_scan_window_lower_limit, "MS:1000501", "scan window lower limit", "The lower m/z bound of a mass spectrometer scan window.", false}, {MS_dwell_time, "MS:1000502", "dwell time", "The time spent gathering data across a peak.", false}, {MS_scan_attribute, "MS:1000503", "scan attribute", "Nonphysical characteristic attributed to a spectrum acquisition scan.", false}, {MS_base_peak_m_z, "MS:1000504", "base peak m/z", "M/z value of the signal of highest intensity in the mass spectrum.", false}, @@ -783,6 +785,7 @@ {MS_QSTAR_XL, "MS:1000657", "QSTAR XL", "Applied Biosystems|MDS SCIEX QSTAR XL.", false}, {MS_4800_Proteomics_Analyzer, "MS:1000658", "4800 Proteomics Analyzer", "Applied Biosystems|MDS SCIEX 4800 Proteomics Analyzer.", false}, {MS_4000_Series_Explorer_Software, "MS:1000659", "4000 Series Explorer Software", "SCIEX or Applied Biosystems software for data acquisition and analysis.", false}, + {MS_Xevo_MRT_MS, "MS:1000660", "Xevo MRT MS", "Waters Corporation Xevo MRT Mass Spectrometer.", false}, {MS_GPS_Explorer, "MS:1000661", "GPS Explorer", "SCIEX or Applied Biosystems software for data acquisition and analysis.", false}, {MS_LightSight_Software, "MS:1000662", "LightSight Software", "SCIEX or Applied Biosystems|MDS SCIEX software metabolite identification.", false}, {MS_ProteinPilot_Software, "MS:1000663", "ProteinPilot Software", "SCIEX or Applied Biosystems|MDS SCIEX software for protein ID and quant.", false}, @@ -952,6 +955,7 @@ {MS_isolation_window_target_m_z, "MS:1000827", "isolation window target m/z", "The primary or reference m/z about which the isolation window is defined.", false}, {MS_isolation_window_lower_offset, "MS:1000828", "isolation window lower offset", "The extent of the isolation window in m/z below the isolation window target m/z. The lower and upper offsets may be asymmetric about the target m/z.", false}, {MS_isolation_window_upper_offset, "MS:1000829", "isolation window upper offset", "The extent of the isolation window in m/z above the isolation window target m/z. The lower and upper offsets may be asymmetric about the target m/z.", false}, + {MS_precision, "MS:1000830", "precision", "Precision is the degree of how close repeated measurements are to each other. This can, for example, be expressed using the standard deviation.", false}, {MS_sample_preparation, "MS:1000831", "sample preparation", "Properties of the preparation steps which took place before the measurement was performed.", false}, {MS_MALDI_matrix_application, "MS:1000832", "MALDI matrix application", "Attributes to describe the technique how the sample is prepared with the matrix solution.", false}, {MS_matrix_application_type, "MS:1000833", "matrix application type", "Describes the technique how the matrix is put on the sample target.", false}, @@ -989,7 +993,7 @@ {MS_empirical_formula, "MS:1000865", "empirical formula", "A chemical formula which expresses the proportions of the elements present in a substance.", false}, {MS_molecular_formula, "MS:1000866", "molecular formula", "A chemical compound formula expressing the number of atoms of each element present in a compound, without indicating how they are linked.", false}, {MS_structural_formula, "MS:1000867", "structural formula", "A chemical formula showing the number of atoms of each element in a molecule, their spatial arrangement, and their linkage to each other.", false}, - {MS_SMILES_formula, "MS:1000868", "SMILES formula", "The simplified molecular input line entry specification or SMILES is a specification for unambiguously describing the structure of a chemical compound using a short ASCII string.", false}, + {MS_SMILES_string, "MS:1000868", "SMILES string", "The simplified molecular input line entry specification or SMILES is a specification for unambiguously describing the structure of a chemical compound using a short ASCII string.", false}, {MS_collision_gas_pressure, "MS:1000869", "collision gas pressure", "The gas pressure of the collision gas used for collisional excitation.", false}, {MS_4000_QTRAP_OBSOLETE, "MS:1000870", "4000 QTRAP", "SCIEX or Applied Biosystems|MDS SCIEX QTRAP 4000.", true}, {MS_SRM_software, "MS:1000871", "SRM software", "Software used to predict, select, or optimize transitions or analyze the results of selected reaction monitoring runs.", false}, @@ -1158,7 +1162,7 @@ {MS_retention_time_s__OBSOLETE, "MS:1001114", "retention time(s)", "Retention time of the spectrum from the source file.", true}, {MS_scan_number_s__OBSOLETE, "MS:1001115", "scan number(s)", "OBSOLETE: use spectrumID attribute of SpectrumIdentificationResult. Take from mzData.", true}, {MS_single_protein_identification_statistic, "MS:1001116", "single protein identification statistic", "Results specific for one protein as part of a protein ambiguity group (a result not valid for all the other proteins in the protein ambiguity group).", false}, - {MS_theoretical_mass, "MS:1001117", "theoretical mass", "The theoretical neutral mass of the molecule (e.g. the peptide sequence and its modifications) not including its charge carrier.", false}, + {MS_theoretical_neutral_mass, "MS:1001117", "theoretical neutral mass", "The theoretical neutral mass of the molecule (e.g. the peptide sequence and its modifications) not including its charge carrier.", false}, {MS_param__b_ion, "MS:1001118", "param: b ion", "Parameter information, type of product: b ion with charge on the N-terminal side.", false}, {MS_param__c_ion, "MS:1001119", "param: c ion", "Parameter information, type of product: c ion with charge on the N-terminal side.", false}, {MS_SEQUEST_FormatAndLinks, "MS:1001120", "SEQUEST:FormatAndLinks", "", false}, @@ -1222,6 +1226,8 @@ {MS_database_EST, "MS:1001178", "database EST", "Expressed sequence tag nucleotide sequence database.", false}, {MS_Cleavage_agent_regular_expression, "MS:1001180", "Cleavage agent regular expression", "Regular expressions for cleavage enzymes.", false}, {MS_search_statistics, "MS:1001184", "search statistics", "The details of the actual run of the search.", false}, + {MS_Mobilion_MBI_format, "MS:1001185", "Mobilion MBI format", "Mobilion MBI file format.", false}, + {MS_Mobilion_MBI_nativeID_format, "MS:1001186", "Mobilion MBI nativeID format", "Native format defined by frame=xsd:nonNegativeInteger scan=xsd:nonNegativeInteger.", false}, {MS_modification_specificity_peptide_N_term, "MS:1001189", "modification specificity peptide N-term", "As parameter for search engine: apply the modification only at the N-terminus of a peptide.", false}, {MS_modification_specificity_peptide_C_term, "MS:1001190", "modification specificity peptide C-term", "As parameter for search engine: apply the modification only at the C-terminus of a peptide.", false}, {MS_p_value_OBSOLETE, "MS:1001191", "p-value", "Quality estimation by p-value.", true}, @@ -2353,7 +2359,7 @@ {MS_site_global_FDR, "MS:1002339", "site:global FDR", "Estimation of global false discovery rate of peptides with a post-translational modification.", false}, {MS_ProteomeXchange_project_tag, "MS:1002340", "ProteomeXchange project tag", "Tag that can be added to a ProteomeXchange dataset, to enable the grouping of datasets. One tag can be used for indicating that a given dataset is part of a bigger project, like e.g. the Human Proteome Project.", false}, {MS_second_pass_peptide_identification, "MS:1002341", "second-pass peptide identification", "A putative identified peptide found in a second-pass search of protein sequences selected from a first-pass search.", false}, - {MS_MZmine, "MS:1002342", "MZmine", "A framework for differential analysis of mass spectrometry data.", false}, + {MS_mzmine, "MS:1002342", "mzmine", "A framework for differential analysis of mass spectrometry data.", false}, {MS_ion_stability_type_OBSOLETE, "MS:1002343", "ion stability type", "Stability type of the ion.", true}, {MS_Maltcms, "MS:1002344", "Maltcms", "Modular Application Toolkit for Chromatography Mass-Spectrometry is an application framework mainly for developers.", false}, {MS_PSM_level_attribute, "MS:1002345", "PSM-level attribute", "Attribute of a single peptide-spectrum match.", false}, @@ -2725,6 +2731,9 @@ {MS_list_of_integers, "MS:1002712", "list of integers", "A list of xsd:integer.", false}, {MS_list_of_floats, "MS:1002713", "list of floats", "A list of xsd:float.", false}, {MS_FLASHDeconv, "MS:1002714", "FLASHDeconv", "Ultrafast, High-Quality Feature Deconvolution for Top-Down Proteomics.", false}, + {MS_temperature_chromatogram, "MS:1002715", "temperature chromatogram", "Representation of temperature versus time.", false}, + {MS_measured_element, "MS:1002716", "measured element", "The component or dimension of an object being measured, for example the temperature of an instrument component over time.", false}, + {MS_Waters_DATA_Convert, "MS:1002717", "Waters DATA Convert", "Software for processing and exporting Waters MassLynx and waters_connect data.", false}, {MS_Pegasus_BT, "MS:1002719", "Pegasus BT", "LECO bench-top GC time-of-flight mass spectrometer.", false}, {MS_MSPathFinder, "MS:1002720", "MSPathFinder", "PNNL top-down/bottom-up analysis software for identifying peptides and proteoforms in fragmentation mass spectra.", false}, {MS_MSPathFinder_SpecEValue, "MS:1002721", "MSPathFinder:SpecEValue", "MSPathFinder spectral E-value.", false}, @@ -2998,6 +3007,8 @@ {MS_IdentiPy_hyperscore, "MS:1002989", "IdentiPy:hyperscore", "The IdentiPy result 'hyperscore'.", false}, {MS_ms_deisotope, "MS:1002990", "ms_deisotope", "ms_deisotope, a library for deisotoping and charge state deconvolution of mass spectra.", false}, {MS_python_psims, "MS:1002991", "python-psims", "python-psims, a library for generating mzML and mzIdentML.", false}, + {MS_Orbitrap_Exploris_GC_MS, "MS:1002992", "Orbitrap Exploris GC-MS", "Thermo Scientific Orbitrap Exploris GC-MS.", false}, + {MS_Q_Exactive_Focus, "MS:1002993", "Q Exactive Focus", "Q Exactive Focus Hybrid Quadrupole-Orbitrap Mass Spectrometer.", false}, {MS_Andromeda_PEP, "MS:1002995", "Andromeda:PEP", "Posterior error probability of the best identified peptide of the Andromeda search engine.", false}, {MS_Andromeda_apl_file_format, "MS:1002996", "Andromeda:apl file format", "Peak list file format of the Andromeda search engine.", false}, {MS_ProteomeXchange_dataset_identifier_reanalysis_number, "MS:1002997", "ProteomeXchange dataset identifier reanalysis number", "Index number of a reanalysis within a ProteomeXchange reprocessed dataset identifier container (RPXD).", false}, @@ -3333,7 +3344,7 @@ {MS_noncovalently_associated_peptides_search, "MS:1003330", "noncovalently associated peptides search", "Noncovalently associated peptides search performed. Noncovalently associated peptides are two different peptides which were not crosslinked but stayed associated with each other throughout the workflow, due to noncovalent interactions.", false}, {MS_noncovalently_associated_peptides_spectrum_identification_item, "MS:1003331", "noncovalently associated peptides spectrum identification item", "Noncovalently associated peptides spectrum identification item.", false}, {MS_identification_based_on_multiple_spectra, "MS:1003332", "identification based on multiple spectra", "Provides an identifier to encode identifications based on multiple spectra.", false}, - {MS_regular_expression_for_encoding_identifications_based_on_multiple_spectra_, "MS:1003333", "regular expression for encoding identifications based on multiple spectra.", "^(?[0-9]+)(?::(?P|C))$", false}, + {MS_regular_expression_for_encoding_identifications_based_on_multiple_spectra_, "MS:1003333", "regular expression for encoding identifications based on multiple spectra.", "^(?[0-9]+)(?::(?P|C))?$", false}, {MS_parent_term_for_PSM_level_scores_for_identifications_based_on_multiple_spectra, "MS:1003334", "parent term for PSM-level scores for identifications based on multiple spectra", "Parent term for PSM-level scores for identifications based on multiple spectra.", false}, {MS_regular_expression_for_PSM_level_scores_for_identifications_based_on_multiple_spectra, "MS:1003335", "regular expression for PSM-level scores for identifications based on multiple spectra", "^(?[0-9]+):(?[-+]?[0-9]+(?:[.][0-9]+)?(?:[Ee][-+]?[0-9]+))$", false}, {MS_posterior_error_probability_from_identification_based_on_multiple_spectra, "MS:1003336", "posterior error probability from identification based on multiple spectra", "PEP score for identifications based on multiple spectra.", false}, @@ -3403,6 +3414,52 @@ {MS_rmzqc, "MS:1003400", "rmzqc", "An R package for reading, validating, and writing mzQC files.", false}, {MS_jmzqc, "MS:1003401", "jmzqc", "A Java package for reading, validating, and writing mzQC files.", false}, {MS_pymzqc, "MS:1003402", "pymzqc", "A Python package for reading, validating, and writing mzQC files.", false}, + {MS_InChI, "MS:1003403", "InChI", "IUPAC International Chemical Identifier.", false}, + {MS_timsTOF_HT, "MS:1003404", "timsTOF HT", "Bruker Daltonics' timsTOF HT.", false}, + {MS_mzRecal, "MS:1003405", "mzRecal", "MS1 recalibration using identified peptides as internal calibrants.", false}, + {MS_spectrum_clustering_software, "MS:1003406", "spectrum clustering software", "Software designed to group multiple mass spectra by high similarity, generally with the goal of grouping replicate spectra derived from the same analyte.", false}, + {MS_Scout, "MS:1003407", "Scout", "Identifying crosslinked peptides in complex protein mixtures", false}, + {MS_Scout_score, "MS:1003408", "Scout score", "Scout identification search engine score", false}, + {MS_Stellar, "MS:1003409", "Stellar", "Thermo Scientific Stellar mass spectrometer contains a quadrupole mass filter, a collision cell, and a quadrupole linear ion trap mass analyzer.", false}, + {MS_electron_beam_energy, "MS:1003410", "electron beam energy", "The kinetic energy of the electron beam used in dissociation methods induced by a free electron beam, such as electron-capture dissociation (ECD), electron-detachment dissociation (EDD), and electron-activated dissociation (EAD).", false}, + {MS_Orbitrap_IQ_X, "MS:1003411", "Orbitrap IQ-X", "Thermo Scientific Orbitrap IQ-X mass spectrometer with Tribrid architecture consisting of quadrupole mass filter, linear ion trap and Orbitrap mass analyzers.", false}, + {MS_timsTOF_Ultra_2, "MS:1003412", "timsTOF Ultra 2", "Bruker Daltonics timsTOF Ultra 2.", false}, + {MS_Kojak, "MS:1003413", "Kojak", "Kojak open-source crosslinked peptide sequence search engine developed at the Institute for Systems Biology.", false}, + {MS_Kojak_score, "MS:1003414", "Kojak:score", "The Kojak score for an individual peptide sequence, similar to Comet:xcorr.", false}, + {MS_Kojak_expectation_value, "MS:1003415", "Kojak:expectation value", "The Kojak expectation value for an individual peptide sequence.", false}, + {MS_Kojak_matched_ions, "MS:1003416", "Kojak:matched ions", "The number of matched ions for an individual peptide sequence in a Kojak result.", false}, + {MS_Kojak_consecutive_matched_ions, "MS:1003417", "Kojak:consecutive matched ions", "The highest run of consecutive matched ions for an individual peptide sequence in a Kojak result.", false}, + {MS_Kojak_delta_score, "MS:1003418", "Kojak:delta score", "The difference between the top Kojak score and the next best Kojak score for a PSM.", false}, + {MS_Kojak_rank, "MS:1003419", "Kojak:rank", "The rank of an individual peptide from the first pass of the Kojak scoring algorithm. Applies only to sequences in a crosslinked result.", false}, + {MS_Kojak_score_xlink, "MS:1003420", "Kojak:score xlink", "The Kojak score for a crosslinked pair of peptide sequences, similar to Comet:xcorr.", false}, + {MS_Kojak_expectation_value_xlink, "MS:1003421", "Kojak:expectation value xlink", "The Kojak expectation value for a crosslinked pair of peptide sequences.", false}, + {MS_Kojak_matched_ions_xlink, "MS:1003422", "Kojak:matched ions xlink", "The number of matched ions for a crosslinked pair of peptide sequences in a Kojak result.", false}, + {MS_Orbitrap_Exploris_GC_240, "MS:1003423", "Orbitrap Exploris GC 240", "Orbitrap Exploris GC 240 Mass Spectrometer.", false}, + {MS_selected_fragment_theoretical_m_z_observed_intensity_spectrum, "MS:1003424", "selected fragment theoretical m/z observed intensity spectrum", "Spectrum for which the peaks are limited to a subset of known product ions that are important for subsequent identification, whose m/z values are corrected to theoretical values, and intensity values are experimentally derived.", false}, + {MS_quantms, "MS:1003425", "quantms", "Cloud-based pipeline for quantitative proteomics that enables the reanalysis of public proteomics data.", false}, + {MS_xQuest_xProphet, "MS:1003426", "xQuest/xProphet", "A software to identify cross-linked peptides from LC-MS/MS spectra.", false}, + {MS_PeakView, "MS:1003427", "PeakView", "A software for spectral analysis and data interrogation in qualitative review of LC-MS and MS/MS data.", false}, + {MS_Perseus, "MS:1003428", "Perseus", "A software for interpreting protein quantification, interaction and post-translational modification data.", false}, + {MS_FragPipe, "MS:1003429", "FragPipe", "A computational platform for analyzing mass spectrometry-based proteomics data.", false}, + {MS_OpenMS, "MS:1003430", "OpenMS", "A software for LC-MS data management and analysis.", false}, + {MS_pLink, "MS:1003431", "pLink", "A tool for the analysis of chemically cross-linked proteins using mass spectrometry.", false}, + {MS_pLink2, "MS:1003432", "pLink2", "Upgraded version of pLink tool, provides a graphical user interface and faster with newly designed index structure.", false}, + {MS_Andromeda_delta_score, "MS:1003433", "Andromeda:delta score", "Score difference to the second best identified peptide with a different amino acid sequence.", false}, + {MS_AlphaLP, "MS:1003434", "AlphaLP", "A serine protease that hydrolyzes peptide bonds at the C-terminus of threonine, alanine, serine, and valine. (EC:3.4.21.12)", false}, + {MS______TSAV__, "MS:1003435", "(?<=[TSAV])", "Regular expression for alphaLP.", false}, + {MS_lowest_observed_ion_mobility, "MS:1003437", "lowest observed ion mobility", "Lowest ion mobility value observed in the ion mobility measurement array.", false}, + {MS_highest_observed_ion_mobility, "MS:1003438", "highest observed ion mobility", "Highest ion mobility value observed in the ion mobility measurement array.", false}, + {MS_ion_mobility_frame_representation, "MS:1003439", "ion mobility frame representation", "Representation of one or more spectra acquired across an ion mobility dimension.", false}, + {MS_ion_mobility_profile_frame, "MS:1003440", "ion mobility profile frame", "An ion mobility frame where the ion mobility dimension is continuous.", false}, + {MS_ion_mobility_centroid_frame, "MS:1003441", "ion mobility centroid frame", "An ion mobility frame where the ion mobility dimension is processed into discrete peaks of zero width.", false}, + {MS_Orbitrap_Astral_Zoom, "MS:1003442", "Orbitrap Astral Zoom", "Thermo Scientific Orbitrap Astral Zoom mass spectrometer contains three mass analyzers: a quadrupole analyzer, an Orbitrap analyzer, and an Astral analyzer.", false}, + {MS_ZenoTOF_8600, "MS:1003443", "ZenoTOF 8600", "SCIEX ZenoTOF 8600 system.", false}, + {MS_ZenoTOF_7600_, "MS:1003444", "ZenoTOF 7600+", "SCIEX ZenoTOF 7600+ system.", false}, + {MS_SCIEX_7500_, "MS:1003445", "SCIEX 7500+", "SCIEX 7500+ system.", false}, + {MS_SCIEX_OS, "MS:1003446", "SCIEX OS", "SCIEX OS software.", false}, + {MS_SCIEX_MS_Data_Converter, "MS:1003447", "SCIEX MS Data Converter", "A software for converting SCIEX wiff or wiff2 format to mzML.", false}, + {MS_SCIEX_WIFF2_format, "MS:1003448", "SCIEX WIFF2 format", "SCIEX WIFF2 file format.", false}, + {NCIT_Number_of_Occurrences, "NCIT:3150827", "Number of Occurrences", "The number of times something happened.", false}, {MS_PSI_MS_CV_Quality_Control_Vocabulary, "MS:4000000", "PSI-MS CV Quality Control Vocabulary", "PSI Quality Control controlled vocabulary term.", false}, {MS_QC_metric, "MS:4000001", "QC metric", "Parent term for QC metrics, each metric MUST have this as an ancestor in its is_a relations.", false}, {MS_QC_metric_value_type, "MS:4000002", "QC metric value type", "The QC metric type describes what type the corresponding metric is. Possible types are single value, n-tuple, table, or matrix.", false}, @@ -3427,15 +3484,22 @@ {MS_MS2_metric, "MS:4000022", "MS2 metric", "QC metric based on MS2 events.", false}, {MS_sample_preparation_metric, "MS:4000023", "sample preparation metric", "QC metric related to the sample preparation.", false}, {MS_environment_metric, "MS:4000024", "environment metric", "QC metric related to measurements of the ambient environment, such as the laboratory.", false}, + {MS_precursor_ion_current_chromatogram, "MS:4000025", "precursor ion current chromatogram", "Representation of the ion current assigned to detected precursors in the series of all MS1 spectra versus time.", false}, + {MS_fragment_ppm_deviation_median, "MS:4000026", "fragment ppm deviation median", "The median of the distribution of observed fragment mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied.", false}, + {MS_fragment_ppm_deviation_mean, "MS:4000027", "fragment ppm deviation mean", "The mean of the distribution of observed fragment mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied", false}, + {MS_fragment_ppm_deviation_sigma, "MS:4000028", "fragment ppm deviation sigma", "The standard deviation of the distribution of observed fragment mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied", false}, + {MS_area_under_TIC_in_MS1, "MS:4000029", "area under TIC in MS1", "The area under the total ion current chromatogram (MS:1000235) of all MS1 spectra.", false}, + {MS_area_under_TIC_in_MS2, "MS:4000030", "area under TIC in MS2", "The area under the total ion current chromatogram (MS:1000235) of all MS2 spectra.", false}, + {MS_peak_area_of_MS1_vs_MS2_signal_ratio, "MS:4000031", "peak area of MS1 vs MS2 signal ratio", "The ratio of the area under TIC of MS1 (MS:4000029) divided by the area under the TIC of MS2 (MS:4000030).", false}, {MS_XIC50_fraction, "MS:4000050", "XIC50 fraction", "The number of XIC that account for the top half of all XIC-FWHM divided by the number of all XIC.", false}, {MS_XIC_FWHM_quantiles, "MS:4000051", "XIC-FWHM quantiles", "The first to n-th quantile of peak widths for XICs. A metric's value triplet represents the related QuaMeter metrics of XIC-FWHM-Q1,Q2,Q3.", false}, - {MS_XIC_Height_quartile_ratios, "MS:4000052", "XIC-Height quartile ratios", "The log ratio of successive XIC height quartiles. The metric's value triplet represents the log ratios of XIC-height-Q2 to XIC-height-Q1, XIC-height-Q3 to XIC-height-Q2, XIC-height max to XIC-height-Q3.", false}, + {MS_obsolete_XIC_Height_quartile_ratios_OBSOLETE, "MS:4000052", "obsolete XIC-Height quartile ratios", "OBSOLETE. The log ratio of successive XIC height quartiles. The metric's value triplet represents the log ratios of XIC-height-Q2 to XIC-height-Q1, XIC-height-Q3 to XIC-height-Q2, XIC-height max to XIC-height-Q3.", true}, {MS_chromatography_duration, "MS:4000053", "chromatography duration", "The retention time duration of the chromatography in seconds.", false}, - {MS_TIC_quarters_RT_fraction, "MS:4000054", "TIC quarters RT fraction", "The interval when the respective quarter of the TIC accumulates divided by retention time duration.", false}, - {MS_MS1_quarter_RT_fraction, "MS:4000055", "MS1 quarter RT fraction", "The interval used for acquisition of the first, second, third, and fourth quarter of all MS1 events divided by retention time duration.", false}, - {MS_MS2_quarter_RT_fraction, "MS:4000056", "MS2 quarter RT fraction", "The interval used for acquisition of the first, second, third, and fourth quarter of all MS2 events divided by retention time duration.", false}, - {MS_MS1_TIC_change_quartile_ratios, "MS:4000057", "MS1 TIC-change quartile ratios", "The log ratios of successive TIC-change quartiles. The TIC changes are the list of MS1 total ion current (TIC) value changes from one to the next scan, produced when each MS1 TIC is subtracted from the preceding MS1 TIC. The metric's value triplet represents the log ratio of the TIC-change Q2 to Q1, Q3 to Q2, TIC-change-max to Q3", false}, - {MS_MS1_TIC_quartile_ratios, "MS:4000058", "MS1 TIC quartile ratios", "The log ratios of successive TIC quartiles. The metric's value triplet represents the log ratios of TIC-Q2 to TIC-Q1, TIC-Q3 to TIC-Q2, TIC-max to TIC-Q3.", false}, + {MS_obsolete_TIC_quarters_RT_fraction_OBSOLETE, "MS:4000054", "obsolete TIC quarters RT fraction", "OBSOLETE. The interval when the respective quarter of the TIC accumulates divided by retention time duration.", true}, + {MS_obsolete_MS1_quarter_RT_fraction_OBSOLETE, "MS:4000055", "obsolete MS1 quarter RT fraction", "OBSOLETE. The interval used for acquisition of the first, second, third, and fourth quarter of all MS1 events divided by retention time duration.", true}, + {MS_obsolete_MS2_quarter_RT_fraction_OBSOLETE, "MS:4000056", "obsolete MS2 quarter RT fraction", "OBSOLETE. The interval used for acquisition of the first, second, third, and fourth quarter of all MS2 events divided by retention time duration.", true}, + {MS_obsolete_MS1_TIC_change_quartile_ratios_OBSOLETE, "MS:4000057", "obsolete MS1 TIC-change quartile ratios", "OBSOLETE. The log ratios of successive TIC-change quartiles. The TIC changes are the list of MS1 total ion current (TIC) value changes from one to the next scan, produced when each MS1 TIC is subtracted from the preceding MS1 TIC. The metric's value triplet represents the log ratio of the TIC-change Q2 to Q1, Q3 to Q2, TIC-change-max to Q3", true}, + {MS_obsolete_MS1_TIC_quartile_ratios_OBSOLETE, "MS:4000058", "obsolete MS1 TIC quartile ratios", "OBSOLETE. The log ratios of successive TIC quartiles. The metric's value triplet represents the log ratios of TIC-Q2 to TIC-Q1, TIC-Q3 to TIC-Q2, TIC-max to TIC-Q3.", true}, {MS_number_of_MS1_spectra, "MS:4000059", "number of MS1 spectra", "The number of MS1 events in the run.", false}, {MS_number_of_MS2_spectra, "MS:4000060", "number of MS2 spectra", "The number of MS2 events in the run.", false}, {MS_MS1_density_quantiles, "MS:4000061", "MS1 density quantiles", "The first to n-th quantile of MS1 peak density (scan peak counts). A value triplet represents the original QuaMeter metrics, the quartiles of MS1 density. The number of values in the tuple implies the quantile mode.", false}, @@ -3554,6 +3618,18 @@ {MS_mean_MS2_precursor_charge_in_identified_spectra, "MS:4000174", "mean MS2 precursor charge in identified spectra", "Mean MS2 precursor charge in identified spectra. The used type of identification should be noted in the metadata or analysis methods section of the recording file for the respective run. In case of multiple acceptance criteria (FDR) available in proteomics, PSM-level FDR should be used for better comparability.", false}, {MS_median_MS2_precursor_charge_in_all_spectra, "MS:4000175", "median MS2 precursor charge in all spectra", "Median MS2 precursor charge in all spectra", false}, {MS_median_MS2_precursor_charge_in_identified_spectra, "MS:4000176", "median MS2 precursor charge in identified spectra", "Median MS2 precursor charge in identified spectra. The used type of identification should be noted in the metadata or analysis methods section of the recording file for the respective run. In case of multiple acceptance criteria (FDR) available in proteomics, PSM-level FDR should be used for better comparability.", false}, + {MS_contaminant_protein_abundance_fraction, "MS:4000177", "contaminant protein abundance fraction", "The fraction of total protein abundance in a mass spectrometry run or a group of runs which can be attributed to a user-defined list of contaminant proteins (e.g. using the cRAP contaminant database).", false}, + {MS_precursor_ppm_deviation_mean, "MS:4000178", "precursor ppm deviation mean", "The mean of the distribution of observed precursor mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied", false}, + {MS_precursor_ppm_deviation_sigma, "MS:4000179", "precursor ppm deviation sigma", "The standard deviation of the distribution of observed precursor mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied", false}, + {MS_table_of_missed_cleavage_counts, "MS:4000180", "table of missed cleavage counts", "The number of identified peptides with corresponding number of missed cleavages after user-defined acceptance criteria are applied. The number of missed cleavages per peptide is given in the 'number of missed cleavages' column, the respective count of such peptides identified in the 'Number of Occurrences' column. The highest 'missed cleavages' row is to be interpreted as that number of missed cleavages or higher.", false}, + {MS_obsolete_identified_MS2_quarter_RT_fraction_OBSOLETE, "MS:4000181", "obsolete identified MS2 quarter RT fraction", "OBSOLETE. The interval used for acquisition of the first, second, third, and fourth quarter of all identified MS2 events divided by retention time duration.", true}, + {MS_XIC_Height_quantile_ratios, "MS:4000182", "XIC-Height quantile ratios", "The log ratio of successive XIC height quantiles. A value triplet represents the original QuaMeter metrics, the log ratios of XIC-Height-Q2 to XIC-Height-Q1, XIC-Height-Q3 to XIC-Height-Q2, XIC-Height max to XIC-Height-Q3. The number of values in the tuple implies the quantile mode.", false}, + {MS_TIC_quantile_RT_fraction, "MS:4000183", "TIC quantile RT fraction", "The interval when the respective quantile of the TIC accumulates divided by retention time duration. The number of values in the tuple implies the quantile mode.", false}, + {MS_MS1_quantile_RT_fraction, "MS:4000184", "MS1 quantile RT fraction", "The interval used for acquisition of quantiles of all MS1 events divided by retention time duration. The number of values in the tuple implies the quantile mode.", false}, + {MS_MS2_quantile_RT_fraction, "MS:4000185", "MS2 quantile RT fraction", "The interval used for acquisition of quantiles of all MS2 events divided by retention time duration. The number of values in the tuple implies the quantile mode.", false}, + {MS_MS1_TIC_change_quantile_ratios, "MS:4000186", "MS1 TIC-change quantile ratios", "The log ratios of successive TIC-change quantiles. The TIC changes are the list of MS1 total ion current (TIC) value changes from one to the next scan, produced when each MS1 TIC is subtracted from the preceding MS1 TIC. A value triplet represents the original QuaMeter metrics, the log ratio of the TIC-change Q2 to Q1, Q3 to Q2, TIC-change-max to Q3. The number of values in the tuple implies the quantile mode.", false}, + {MS_MS1_TIC_quantile_ratios, "MS:4000187", "MS1 TIC quantile ratios", "The log ratios of successive TIC quantiles. A value triplet represents the original QuaMeter metrics, the log ratios of TIC-Q2 to TIC-Q1, TIC-Q3 to TIC-Q2, TIC-max to TIC-Q3. The number of values in the tuple implies the quantile mode.", false}, + {MS_identified_MS2_quantile_RT_fraction, "MS:4000188", "identified MS2 quantile RT fraction", "The interval used for acquisition of quantiles of all identified MS2 events, after user-defined acceptance criteria are applied, divided by retention time duration. The number of values in the tuple implies the quantile mode. In case of multiple acceptance criteria (FDR) available in proteomics, PSM-level FDR should be used for better comparability.", false}, {UNIMOD_unimod_root_node, "UNIMOD:0", "unimod root node", "The root node of the unimod modifications ontology.", false}, {UNIMOD_Acetyl, "UNIMOD:1", "Acetyl", "Acetylation.", false}, {UNIMOD_Amidated, "UNIMOD:2", "Amidated", "Amidation.", false}, @@ -5063,9 +5139,9 @@ {UNIMOD_Xlink_DSPP_331_, "UNIMOD:2060", "Xlink:DSPP[331]", "Tris-quenched monolink of DSPP/TBDSPP crosslinker.", false}, {UNIMOD_Xlink_DSPP_226_, "UNIMOD:2061", "Xlink:DSPP[226]", "Ammonia-quenched monolink of DSPP/TBDSPP crosslinker.", false}, {UNIMOD_DBIA, "UNIMOD:2062", "DBIA", "Desthiobiotinylation of cysteine with DBIA probe.", false}, - {UNIMOD_Mono_N___propargyl_L_Gln_desthiobiotin, "UNIMOD:2067", "Mono_Nγ-propargyl-L-Gln_desthiobiotin", "Monomodification of Nγ-propargyl-L-Gln probe with clicked desthiobiotin-azide.", false}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "UNIMOD:2068", "Di_L-Glu_Nγ-propargyl-L-Gln_desthiobiotin", "Dimodification of L-Glu and Nγ-propargyl-L-Gln probe with clicked desthiobiotin-azide.", false}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "UNIMOD:2069", "Di_L-Gln_Nγ-propargyl-L-Gln_desthiobiotin", "Dimodification of L-Gln and Nγ-propargyl-L-Gln probe with clicked desthiobiotin-azide.", false}, + {UNIMOD_Mono_Ngamma_propargyl_L_Gln_desthiobiotin, "UNIMOD:2067", "Mono_Ngamma-propargyl-L-Gln_desthiobiotin", "Monomodification of Ngamma-propargyl-L-Gln probe with clicked desthiobiotin-azide.", false}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "UNIMOD:2068", "Di_L-Glu_Ngamma-propargyl-L-Gln_desthiobiotin", "Dimodification of L-Glu and Ngamma-propargyl-L-Gln probe with clicked desthiobiotin-azide.", false}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "UNIMOD:2069", "Di_L-Gln_Ngamma-propargyl-L-Gln_desthiobiotin", "Dimodification of L-Gln and Ngamma-propargyl-L-Gln probe with clicked desthiobiotin-azide.", false}, {UNIMOD_L_Gln, "UNIMOD:2070", "L-Gln", "Monomodification with glutamine.", false}, {UNIMOD_Glyceroyl, "UNIMOD:2072", "Glyceroyl", "Glyceroylation.", false}, {UNIMOD_N6pAMP, "UNIMOD:2073", "N6pAMP", "Plain N6-Propargyl-AMP modified proteins without any clicked enrichment tag.", false}, @@ -5077,6 +5153,35 @@ {UNIMOD_Pyro_QQTGG, "UNIMOD:2083", "Pyro-QQTGG", "SUMOylation leaving Pyro-QQTGG.", false}, {UNIMOD_NQTGG, "UNIMOD:2084", "NQTGG", "SUMOylation leaving NQTGG.", false}, {UNIMOD_DVFQQQTGG, "UNIMOD:2085", "DVFQQQTGG", "SUMOylation by Endogenous SUMO2/3 following Lys C and Asp-N serial digestion.", false}, + {UNIMOD_iST_NHS_specific_cysteine_modification, "UNIMOD:2086", "iST-NHS specific cysteine modification", "Preomics iST-NHS Kit specific cysteine modification.", false}, + {UNIMOD_Label_13C_2_15N_1_, "UNIMOD:2088", "Label:13C(2)15N(1)", "13C(2) 15N(1) Silac label.", false}, + {UNIMOD_DPIA, "UNIMOD:2106", "DPIA", "Desthiobiotinylation of cysteine with DPIA (Desthiobiotin polyethyleneoxide iodoacetamide) probe.", false}, + {UNIMOD_Acetoacetyl, "UNIMOD:2107", "Acetoacetyl", "Acetoacetylation.", false}, + {UNIMOD_Isovaleryl, "UNIMOD:2108", "Isovaleryl", "Isovalerylation.", false}, + {UNIMOD_2_methylbutyryl, "UNIMOD:2109", "2-methylbutyryl", "2-methylbutyrylation.", false}, + {UNIMOD_Tiglyl, "UNIMOD:2110", "Tiglyl", "Tiglylation.", false}, + {UNIMOD_3_methylglutaryl, "UNIMOD:2111", "3-methylglutaryl", "3-methylglutarylation.", false}, + {UNIMOD_3_methylglutaconyl, "UNIMOD:2112", "3-methylglutaconyl", "3-methylglutaconylation.", false}, + {UNIMOD_3_hydroxy_3_methylglutaryl, "UNIMOD:2113", "3-hydroxy-3-methylglutaryl", "3-hydroxy-3-methylglutarylation.", false}, + {UNIMOD_Lactylation, "UNIMOD:2114", "Lactylation", "Lactylation(Lac).", false}, + {UNIMOD_Pyruvoyl, "UNIMOD:2115", "Pyruvoyl", "Pyruvoylation.", false}, + {UNIMOD_Glyoxylyl, "UNIMOD:2116", "Glyoxylyl", "Glyoxylylation.", false}, + {UNIMOD_Itaconatyl, "UNIMOD:2117", "Itaconatyl", "Itaconatylation.", false}, + {UNIMOD_Itaconyl, "UNIMOD:2118", "Itaconyl", "Itaconylation.", false}, + {UNIMOD_ValGly, "UNIMOD:2119", "ValGly", "UFMylation residue.", false}, + {UNIMOD_Pentanoyl, "UNIMOD:2120", "Pentanoyl", "Pentanoylation.", false}, + {UNIMOD_Hexanoyl, "UNIMOD:2121", "Hexanoyl", "Hexanoylation.", false}, + {UNIMOD_Label_13C_6_15N_2__TMT6plex, "UNIMOD:2122", "Label:13C(6)15N(2)+TMT6plex", "Sixplex Tandem Mass Tag 13C(6) 15N(2) Silac label.", false}, + {UNIMOD_Label_13C_6_15N_2__TMTpro, "UNIMOD:2123", "Label:13C(6)15N(2)+TMTpro", "TMTpro Tandem Mass Tag 13C(6) 15N(2) Silac label.", false}, + {UNIMOD_2PCA_triazole_ethanethiol, "UNIMOD:2126", "2PCA-triazole-ethanethiol", "Cleaved 2PCA clicked to biotin-SS-azide.", false}, + {UNIMOD_Desthiobiotin_Phenol, "UNIMOD:2127", "Desthiobiotin-Phenol", "Desthiobiotin-Phenol.", false}, + {UNIMOD_Cys_vinyl_sulfone_amine_probe_addition, "UNIMOD:2128", "Cys-vinyl sulfone amine probe addition", "Michael addition of a vinyl sulfone amine desthiobiotin probe to cysteine.", false}, + {UNIMOD_Cys__fGly_diol, "UNIMOD:2129", "Cys->fGly-diol", "Formylglycinediol, activated in sulfatases.", false}, + {UNIMOD_Cys__sulfo_fGly_dio, "UNIMOD:2130", "Cys->sulfo-fGly-dio", "Sulphated formylglycinediol, activated in sulfatases.", false}, + {UNIMOD_Cys__Ser_O_sulfate, "UNIMOD:2131", "Cys->Ser-O-sulfate", "Serine O-sulfate.", false}, + {UNIMOD_b_type_ion, "UNIMOD:2132", "b-type-ion", "Dehydration of C-terminus as reaction inside the mass spectrometer.", false}, + {UNIMOD_PnTAG, "UNIMOD:2135", "PnTAG", "6-Phosphonohexanoylation.", false}, + {UNIMOD_DMA_PEG3, "UNIMOD:2136", "DMA-PEG3", "DimethylaminoPEG3ylation.", false}, {UO_unit, "UO:0000000", "unit", "A unit of measurement is a standardized quantity of a physical quality.", false}, {UO_length_unit, "UO:0000001", "length unit", "A unit which is a standard measure of the distance between two points.", false}, {UO_mass_unit, "UO:0000002", "mass unit", "A unit which is a standard measure of the amount of matter/energy of a physical object.", false}, @@ -5546,6 +5651,7 @@ {NCIT_Statistical_Technique, NCIT_Technique}, {NCIT_Temporal_Qualifier, NCIT_Qualifier}, {NCIT_Duration, NCIT_Temporal_Qualifier}, + {NCIT_Number, NCIT_Property_or_Attribute}, {NCIT_Action, NCIT_Activity}, {NCIT_Characteristic, NCIT_Property_or_Attribute}, {NCIT_Qualifier, NCIT_Property_or_Attribute}, @@ -5802,6 +5908,7 @@ {MS_electron_ionization, MS_ionization_type}, {MS_ionization_efficiency, MS_source_attribute}, {MS_laser_desorption_ionization, MS_desorption_ionization}, + {MS_no_sequence_database, MS_database_file_formats}, {MS_liquid_secondary_ionization, MS_ionization_type}, {MS_membrane_inlet, MS_inlet_type}, {MS_microelectrospray, MS_electrospray_ionization}, @@ -6030,6 +6137,7 @@ {MS_4000_Series_Explorer_Software, MS_acquisition_software}, {MS_4000_Series_Explorer_Software, MS_analysis_software}, {MS_4000_Series_Explorer_Software, MS_data_processing_software}, + {MS_Xevo_MRT_MS, MS_Waters_instrument_model}, {MS_GPS_Explorer, MS_SCIEX_software}, {MS_GPS_Explorer, MS_acquisition_software}, {MS_GPS_Explorer, MS_analysis_software}, @@ -6286,6 +6394,7 @@ {MS_isolation_window_target_m_z, MS_isolation_window_attribute}, {MS_isolation_window_lower_offset, MS_isolation_window_attribute}, {MS_isolation_window_upper_offset, MS_isolation_window_attribute}, + {MS_precision, MS_mass_analyzer_attribute}, {MS_sample_preparation, MS_object_attribute}, {MS_matrix_solution, MS_MALDI_matrix_application}, {MS_matrix_solution_concentration, MS_MALDI_matrix_application}, @@ -6318,7 +6427,7 @@ {MS_empirical_formula, MS_chemical_formula}, {MS_molecular_formula, MS_chemical_formula}, {MS_structural_formula, MS_chemical_formula}, - {MS_SMILES_formula, MS_chemical_formula}, + {MS_SMILES_string, MS_structural_formula}, {MS_collision_gas_pressure, MS_precursor_activation_attribute}, {MS_4000_QTRAP_OBSOLETE, MS_SCIEX_instrument_model}, {MS_SRM_software, MS_software}, @@ -6486,7 +6595,7 @@ {MS_c_terminal_flanking_residue, MS_peptide_sequence_level_identification_attribute}, {MS_retention_time_s__OBSOLETE, MS_peptide_sequence_level_identification_attribute}, {MS_single_protein_identification_statistic, MS_protein_level_identification_attribute}, - {MS_theoretical_mass, MS_peptide_sequence_level_identification_attribute}, + {MS_theoretical_neutral_mass, MS_peptide_sequence_level_identification_attribute}, {MS_param__b_ion, MS_ion_series_considered_in_search}, {MS_param__c_ion, MS_ion_series_considered_in_search}, {MS_SEQUEST_FormatAndLinks, MS_SEQUEST_modeCV}, @@ -6554,6 +6663,8 @@ {MS_database_EST, MS_database_type_nucleotide}, {MS_Cleavage_agent_regular_expression, MS_regular_expression}, {MS_search_statistics, MS_spectrum_identification_result_details}, + {MS_Mobilion_MBI_format, MS_mass_spectrometer_file_format}, + {MS_Mobilion_MBI_nativeID_format, MS_native_spectrum_identifier_format}, {MS_modification_specificity_peptide_N_term, MS_modification_specificity_rule}, {MS_modification_specificity_peptide_C_term, MS_modification_specificity_rule}, {MS_p_value_OBSOLETE, MS_peptide_sequence_level_identification_statistic}, @@ -6817,6 +6928,7 @@ {MS_X_Tandem, MS_analysis_software}, {MS_SpectraST, MS_analysis_software}, {MS_SpectraST, MS_library_creation_software}, + {MS_SpectraST, MS_spectrum_clustering_software}, {MS_Mascot_Parser, MS_analysis_software}, {MS_null_terminated_ASCII_string, MS_binary_data_type}, {MS_SCIEX_TOF_TOF_nativeID_format, MS_native_spectrum_identifier_format}, @@ -7619,6 +7731,7 @@ {MS_Comet_spscore, MS_PSM_level_search_engine_specific_statistic}, {MS_Comet_sprank, MS_PSM_level_search_engine_specific_statistic}, {MS_Comet_expectation_value, MS_search_engine_specific_score}, + {MS_Comet_expectation_value, MS_PSM_level_search_engine_specific_statistic}, {MS_Comet_matched_ions, MS_PSM_level_search_engine_specific_statistic}, {MS_Comet_total_ions, MS_PSM_level_search_engine_specific_statistic}, {MS_PSM_FDR_threshold, MS_PSM_level_statistical_threshold}, @@ -7704,8 +7817,8 @@ {MS_site_global_FDR, MS_spectrum_identification_result_details}, {MS_ProteomeXchange_project_tag, MS_external_reference_identifier}, {MS_second_pass_peptide_identification, MS_peptide_sequence_level_identification_attribute}, - {MS_MZmine, MS_analysis_software}, - {MS_MZmine, MS_data_processing_software}, + {MS_mzmine, MS_analysis_software}, + {MS_mzmine, MS_data_processing_software}, {MS_Maltcms, MS_analysis_software}, {MS_Maltcms, MS_data_processing_software}, {MS_PSM_level_attribute, MS_single_identification_result_attribute}, @@ -8103,6 +8216,10 @@ {MS_list_of_floats, MS_list_of_type}, {MS_FLASHDeconv, MS_analysis_software}, {MS_FLASHDeconv, MS_data_processing_software}, + {MS_temperature_chromatogram, MS_chromatogram_type}, + {MS_Waters_DATA_Convert, MS_Waters_software}, + {MS_Waters_DATA_Convert, MS_analysis_software}, + {MS_Waters_DATA_Convert, MS_data_processing_software}, {MS_Pegasus_BT, MS_LECO_instrument_model}, {MS_MSPathFinder, MS_analysis_software}, {MS_MSPathFinder_SpecEValue, MS_PSM_level_e_value}, @@ -8353,6 +8470,7 @@ {MS_TopMG_spectral_p_value, MS_PSM_level_p_value}, {MS_TopMG_spectral_p_value, MS_PSM_level_search_engine_specific_statistic}, {MS_collisional_cross_sectional_area, MS_molecular_entity_property}, + {MS_collisional_cross_sectional_area, MS_ion_selection_attribute}, {MS_hr_ms_compound_identification_confidence_level, MS_small_molecule_identification_attribute}, {MS_isotopic_ion_MS_peak, MS_peak}, {MS_isotopomer_MS_peak, MS_isotopic_ion_MS_peak}, @@ -8405,6 +8523,8 @@ {MS_IdentiPy_hyperscore, MS_search_engine_specific_score}, {MS_ms_deisotope, MS_data_processing_software}, {MS_python_psims, MS_conversion_software}, + {MS_Orbitrap_Exploris_GC_MS, MS_Thermo_Scientific_instrument_model}, + {MS_Q_Exactive_Focus, MS_Thermo_Scientific_instrument_model}, {MS_Andromeda_PEP, MS_PSM_level_search_engine_specific_statistic}, {MS_Andromeda_apl_file_format, MS_mass_spectrometer_file_format}, {MS_ProteomeXchange_dataset_identifier_reanalysis_number, MS_external_reference_identifier}, @@ -8485,6 +8605,7 @@ {MS_spectrum_origin_type, MS_spectrum_origin_attribute}, {MS_observed_spectrum, MS_spectrum_origin_type}, {MS_predicted_spectrum, MS_spectrum_origin_type}, + {MS_predicted_spectrum, MS_spectrum_aggregation_type}, {MS_demultiplexed_spectrum, MS_spectrum_origin_type}, {MS_uninterpreted_spectrum, MS_spectrum}, {MS_interpreted_spectrum, MS_spectrum}, @@ -8589,7 +8710,7 @@ {MS_library_spectrum_comment, MS_library_spectrum_attribute}, {MS_proforma_peptidoform_sequence, MS_peptidoform_sequence}, {MS_numeric_attribute, MS_object_attribute}, - {MS_combined_dissociation_method, MS_dissociation_method}, + {MS_combined_dissociation_method, MS_precursor_activation_attribute}, {MS_electron_transfer_collision_induced_dissociation, MS_combined_dissociation_method}, {MS_Synapt_XS, MS_Waters_instrument_model}, {MS_SELECT_SERIES_Cyclic_IMS, MS_Waters_instrument_model}, @@ -8682,6 +8803,7 @@ {MS_Xevo_G2_XS_QTof, MS_Waters_instrument_model}, {MS_DIA_NN, MS_quantitation_software_name}, {MS_DIA_NN, MS_analysis_software}, + {MS_DIA_NN, MS_library_creation_software}, {MS_pre_decharged_charge_state, MS_peak_attribute}, {MS_library_spectrum_cross_reference, MS_library_spectrum_attribute}, {MS_related_spectrum, MS_library_spectrum_cross_reference}, @@ -8841,6 +8963,70 @@ {MS_rmzqc, MS_quality_control_software}, {MS_jmzqc, MS_quality_control_software}, {MS_pymzqc, MS_quality_control_software}, + {MS_InChI, MS_spectrum_identification_result_details}, + {MS_InChI, MS_structural_formula}, + {MS_timsTOF_HT, MS_Bruker_Daltonics_timsTOF_series}, + {MS_mzRecal, MS_data_processing_software}, + {MS_spectrum_clustering_software, MS_software}, + {MS_Scout, MS_analysis_software}, + {MS_Scout_score, MS_PSM_level_search_engine_specific_statistic}, + {MS_Stellar, MS_Thermo_Scientific_instrument_model}, + {MS_electron_beam_energy, MS_precursor_activation_attribute}, + {MS_Orbitrap_IQ_X, MS_Thermo_Scientific_instrument_model}, + {MS_timsTOF_Ultra_2, MS_Bruker_Daltonics_timsTOF_series}, + {MS_Kojak, MS_analysis_software}, + {MS_Kojak_score, MS_PSM_level_search_engine_specific_statistic}, + {MS_Kojak_expectation_value, MS_search_engine_specific_score}, + {MS_Kojak_expectation_value, MS_PSM_level_search_engine_specific_statistic}, + {MS_Kojak_matched_ions, MS_PSM_level_search_engine_specific_statistic}, + {MS_Kojak_consecutive_matched_ions, MS_PSM_level_search_engine_specific_statistic}, + {MS_Kojak_delta_score, MS_PSM_level_search_engine_specific_statistic}, + {MS_Kojak_rank, MS_PSM_level_search_engine_specific_statistic}, + {MS_Kojak_score_xlink, MS_PSM_level_search_engine_specific_statistic}, + {MS_Kojak_expectation_value_xlink, MS_search_engine_specific_score}, + {MS_Kojak_expectation_value_xlink, MS_PSM_level_search_engine_specific_statistic}, + {MS_Kojak_matched_ions_xlink, MS_PSM_level_search_engine_specific_statistic}, + {MS_Orbitrap_Exploris_GC_240, MS_Thermo_Scientific_instrument_model}, + {MS_selected_fragment_theoretical_m_z_observed_intensity_spectrum, MS_spectrum_origin_type}, + {MS_quantms, MS_analysis_software}, + {MS_quantms, MS_quantitation_software_name}, + {MS_xQuest_xProphet, MS_quantitation_software_name}, + {MS_xQuest_xProphet, MS_analysis_software}, + {MS_PeakView, MS_quantitation_software_name}, + {MS_PeakView, MS_analysis_software}, + {MS_Perseus, MS_quantitation_software_name}, + {MS_Perseus, MS_analysis_software}, + {MS_FragPipe, MS_quantitation_software_name}, + {MS_FragPipe, MS_analysis_software}, + {MS_OpenMS, MS_quantitation_software_name}, + {MS_OpenMS, MS_analysis_software}, + {MS_pLink, MS_quantitation_software_name}, + {MS_pLink, MS_analysis_software}, + {MS_pLink2, MS_pLink}, + {MS_pLink2, MS_quantitation_software_name}, + {MS_pLink2, MS_analysis_software}, + {MS_Andromeda_delta_score, MS_PSM_level_search_engine_specific_statistic}, + {MS_AlphaLP, MS_cleavage_agent_name}, + {MS______TSAV__, MS_Cleavage_agent_regular_expression}, + {MS_lowest_observed_ion_mobility, MS_chromatogram_attribute}, + {MS_lowest_observed_ion_mobility, MS_spectrum_property}, + {MS_highest_observed_ion_mobility, MS_chromatogram_attribute}, + {MS_highest_observed_ion_mobility, MS_spectrum_property}, + {MS_ion_mobility_frame_representation, MS_spectrum_attribute}, + {MS_ion_mobility_profile_frame, MS_ion_mobility_frame_representation}, + {MS_ion_mobility_centroid_frame, MS_ion_mobility_frame_representation}, + {MS_Orbitrap_Astral_Zoom, MS_Thermo_Scientific_instrument_model}, + {MS_ZenoTOF_8600, MS_SCIEX_instrument_model}, + {MS_ZenoTOF_7600_, MS_SCIEX_instrument_model}, + {MS_SCIEX_7500_, MS_SCIEX_instrument_model}, + {MS_SCIEX_OS, MS_SCIEX_software}, + {MS_SCIEX_OS, MS_acquisition_software}, + {MS_SCIEX_OS, MS_analysis_software}, + {MS_SCIEX_OS, MS_data_processing_software}, + {MS_SCIEX_MS_Data_Converter, MS_SCIEX_software}, + {MS_SCIEX_MS_Data_Converter, MS_data_processing_software}, + {MS_SCIEX_WIFF2_format, MS_mass_spectrometer_file_format}, + {NCIT_Number_of_Occurrences, NCIT_Number}, {MS_single_value, MS_QC_metric_value_type}, {MS_n_tuple, MS_QC_metric_value_type}, {MS_table, MS_QC_metric_value_type}, @@ -8861,15 +9047,24 @@ {MS_MS2_metric, MS_MS_metric}, {MS_sample_preparation_metric, MS_QC_metric}, {MS_environment_metric, MS_QC_metric}, + {MS_precursor_ion_current_chromatogram, MS_ion_current_chromatogram}, + {MS_precursor_ion_current_chromatogram, MS_n_tuple}, + {MS_fragment_ppm_deviation_median, MS_single_value}, + {MS_fragment_ppm_deviation_mean, MS_single_value}, + {MS_fragment_ppm_deviation_sigma, MS_single_value}, + {MS_area_under_TIC_in_MS1, MS_single_value}, + {MS_area_under_TIC_in_MS2, MS_single_value}, + {MS_peak_area_of_MS1_vs_MS2_signal_ratio, MS_single_value}, + {MS_peak_area_of_MS1_vs_MS2_signal_ratio, MS_simple_ratio_of_two_values}, {MS_XIC50_fraction, MS_single_value}, {MS_XIC_FWHM_quantiles, MS_n_tuple}, - {MS_XIC_Height_quartile_ratios, MS_n_tuple}, + {MS_obsolete_XIC_Height_quartile_ratios_OBSOLETE, MS_n_tuple}, {MS_chromatography_duration, MS_single_value}, - {MS_TIC_quarters_RT_fraction, MS_n_tuple}, - {MS_MS1_quarter_RT_fraction, MS_n_tuple}, - {MS_MS2_quarter_RT_fraction, MS_n_tuple}, - {MS_MS1_TIC_change_quartile_ratios, MS_n_tuple}, - {MS_MS1_TIC_quartile_ratios, MS_n_tuple}, + {MS_obsolete_TIC_quarters_RT_fraction_OBSOLETE, MS_n_tuple}, + {MS_obsolete_MS1_quarter_RT_fraction_OBSOLETE, MS_n_tuple}, + {MS_obsolete_MS2_quarter_RT_fraction_OBSOLETE, MS_n_tuple}, + {MS_obsolete_MS1_TIC_change_quartile_ratios_OBSOLETE, MS_n_tuple}, + {MS_obsolete_MS1_TIC_quartile_ratios_OBSOLETE, MS_n_tuple}, {MS_number_of_MS1_spectra, MS_single_value}, {MS_number_of_MS2_spectra, MS_single_value}, {MS_MS1_density_quantiles, MS_n_tuple}, @@ -8883,6 +9078,7 @@ {MS_m_z_acquisition_range, MS_n_tuple}, {MS_retention_time_acquisition_range, MS_n_tuple}, {MS_number_of_chromatograms, MS_single_value}, + {MS_observed_mass_accuracy, MS_single_value}, {MS_QC_sample_metric, MS_QC_metric_category}, {MS_high_complexity_QC_sample_metric, MS_QC_sample_metric}, {MS_low_complexity_QC_sample_metric, MS_QC_sample_metric}, @@ -8951,6 +9147,7 @@ {MS_MS2_ion_collection_time_sigma, MS_single_value}, {MS_MS2_ion_collection_time_low_outliers, MS_n_tuple}, {MS_MS2_ion_collection_time_high_outliers, MS_n_tuple}, + {MS_outlier_threshold_criterion, MS_QC_non_metric_term}, {MS_Tukey_s_fence, MS_outlier_threshold_criterion}, {MS_Tukey_s_fence_high_outliers, MS_outlier_threshold_criterion}, {MS_Tukey_s_fence_low_outliers, MS_outlier_threshold_criterion}, @@ -8962,72 +9159,42 @@ {MS_iRT_calibration_adjusted_r_squared, MS_single_value}, {MS_MsQuality, MS_analysis_software}, {MS_MS2_precursor_median_m_z_of_identified_quantification_data_points, MS_single_value}, - {MS_MS2_precursor_median_m_z_of_identified_quantification_data_points, MS_ID_based_metric}, - {MS_MS2_precursor_median_m_z_of_identified_quantification_data_points, MS_ion_source_metric}, {MS_interquartile_RT_period_for_identified_quantification_data_points, MS_single_value}, - {MS_interquartile_RT_period_for_identified_quantification_data_points, MS_ID_based_metric}, - {MS_interquartile_RT_period_for_identified_quantification_data_points, MS_chromatogram_metric}, {MS_rate_of_the_interquartile_RT_period_for_identified_quantification_data_points, MS_single_value}, - {MS_rate_of_the_interquartile_RT_period_for_identified_quantification_data_points, MS_ID_based_metric}, - {MS_rate_of_the_interquartile_RT_period_for_identified_quantification_data_points, MS_chromatogram_metric}, {MS_area_under_TIC, MS_single_value}, - {MS_area_under_TIC, MS_ID_free_metric}, - {MS_area_under_TIC, MS_chromatogram_metric}, {MS_area_under_TIC_RT_quantiles, MS_n_tuple}, - {MS_area_under_TIC_RT_quantiles, MS_ID_free_metric}, - {MS_area_under_TIC_RT_quantiles, MS_chromatogram_metric}, - {MS_extent_of_identified_MS2_precursor_intensity, MS_QC_metric}, {MS_extent_of_identified_MS2_precursor_intensity, MS_single_value}, - {MS_extent_of_identified_MS2_precursor_intensity, MS_ID_based_metric}, - {MS_median_of_TIC_values_in_the_RT_range_in_which_the_middle_half_of_quantification_data_points_are_identified, MS_QC_metric}, {MS_median_of_TIC_values_in_the_RT_range_in_which_the_middle_half_of_quantification_data_points_are_identified, MS_single_value}, - {MS_median_of_TIC_values_in_the_RT_range_in_which_the_middle_half_of_quantification_data_points_are_identified, MS_ID_based_metric}, - {MS_median_of_TIC_values_in_the_shortest_RT_range_in_which_half_of_the_quantification_data_points_are_identified, MS_QC_metric}, {MS_median_of_TIC_values_in_the_shortest_RT_range_in_which_half_of_the_quantification_data_points_are_identified, MS_single_value}, - {MS_median_of_TIC_values_in_the_shortest_RT_range_in_which_half_of_the_quantification_data_points_are_identified, MS_ID_based_metric}, - {MS_MS2_precursor_intensity_range, MS_QC_metric}, {MS_MS2_precursor_intensity_range, MS_n_tuple}, - {MS_MS2_precursor_intensity_range, MS_ID_free_metric}, {MS_identified_MS2_precursor_intensity_distribution, MS_n_tuple}, - {MS_identified_MS2_precursor_intensity_distribution, MS_ID_based_metric}, {MS_unidentified_MS2_precursor_intensity_distribution, MS_n_tuple}, - {MS_unidentified_MS2_precursor_intensity_distribution, MS_ID_based_metric}, {MS_identified_MS2_precursor_intensity_distribution_mean, MS_single_value}, - {MS_identified_MS2_precursor_intensity_distribution_mean, MS_ID_based_metric}, {MS_unidentified_MS2_precursor_intensity_distribution_mean, MS_single_value}, - {MS_unidentified_MS2_precursor_intensity_distribution_mean, MS_ID_based_metric}, {MS_identified_MS2_precursor_intensity_distribution_sigma, MS_single_value}, {MS_unidentified_MS2_precursor_intensity_distribution_sigma, MS_single_value}, - {MS_ratio_of_1__over_2__of_all_MS2_known_precursor_charges, MS_QC_metric}, {MS_ratio_of_1__over_2__of_all_MS2_known_precursor_charges, MS_single_value}, - {MS_ratio_of_1__over_2__of_all_MS2_known_precursor_charges, MS_ID_free_metric}, - {MS_ratio_of_1__over_2__of_identified_MS2_known_precursor_charges, MS_QC_metric}, {MS_ratio_of_1__over_2__of_identified_MS2_known_precursor_charges, MS_single_value}, - {MS_ratio_of_1__over_2__of_identified_MS2_known_precursor_charges, MS_ID_based_metric}, - {MS_ratio_of_3__over_2__of_all_MS2_known_precursor_charges, MS_QC_metric}, {MS_ratio_of_3__over_2__of_all_MS2_known_precursor_charges, MS_single_value}, - {MS_ratio_of_3__over_2__of_all_MS2_known_precursor_charges, MS_ID_free_metric}, - {MS_ratio_of_3__over_2__of_identified_MS2_known_precursor_charges, MS_QC_metric}, {MS_ratio_of_3__over_2__of_identified_MS2_known_precursor_charges, MS_single_value}, - {MS_ratio_of_3__over_2__of_identified_MS2_known_precursor_charges, MS_ID_based_metric}, - {MS_ratio_of_4__over_2__of_all_MS2_known_precursor_charges, MS_QC_metric}, {MS_ratio_of_4__over_2__of_all_MS2_known_precursor_charges, MS_single_value}, - {MS_ratio_of_4__over_2__of_all_MS2_known_precursor_charges, MS_ID_free_metric}, - {MS_ratio_of_4__over_2__of_identified_MS2_known_precursor_charges, MS_QC_metric}, {MS_ratio_of_4__over_2__of_identified_MS2_known_precursor_charges, MS_single_value}, - {MS_ratio_of_4__over_2__of_identified_MS2_known_precursor_charges, MS_ID_based_metric}, - {MS_mean_MS2_precursor_charge_in_all_spectra, MS_QC_metric}, {MS_mean_MS2_precursor_charge_in_all_spectra, MS_single_value}, - {MS_mean_MS2_precursor_charge_in_all_spectra, MS_ID_free_metric}, - {MS_mean_MS2_precursor_charge_in_identified_spectra, MS_QC_metric}, {MS_mean_MS2_precursor_charge_in_identified_spectra, MS_single_value}, - {MS_mean_MS2_precursor_charge_in_identified_spectra, MS_ID_based_metric}, - {MS_median_MS2_precursor_charge_in_all_spectra, MS_QC_metric}, {MS_median_MS2_precursor_charge_in_all_spectra, MS_single_value}, - {MS_median_MS2_precursor_charge_in_all_spectra, MS_ID_free_metric}, - {MS_median_MS2_precursor_charge_in_identified_spectra, MS_QC_metric}, {MS_median_MS2_precursor_charge_in_identified_spectra, MS_single_value}, - {MS_median_MS2_precursor_charge_in_identified_spectra, MS_ID_based_metric}, + {MS_contaminant_protein_abundance_fraction, MS_single_value}, + {MS_precursor_ppm_deviation_mean, MS_single_value}, + {MS_precursor_ppm_deviation_sigma, MS_single_value}, + {MS_table_of_missed_cleavage_counts, MS_table}, + {MS_obsolete_identified_MS2_quarter_RT_fraction_OBSOLETE, MS_n_tuple}, + {MS_XIC_Height_quantile_ratios, MS_n_tuple}, + {MS_TIC_quantile_RT_fraction, MS_n_tuple}, + {MS_MS1_quantile_RT_fraction, MS_n_tuple}, + {MS_MS2_quantile_RT_fraction, MS_n_tuple}, + {MS_MS1_TIC_change_quantile_ratios, MS_n_tuple}, + {MS_MS1_TIC_quantile_ratios, MS_n_tuple}, + {MS_identified_MS2_quantile_RT_fraction, MS_n_tuple}, {UNIMOD_Acetyl, UNIMOD_unimod_root_node}, {UNIMOD_Amidated, UNIMOD_unimod_root_node}, {UNIMOD_Biotin, UNIMOD_unimod_root_node}, @@ -10536,9 +10703,9 @@ {UNIMOD_Xlink_DSPP_331_, UNIMOD_unimod_root_node}, {UNIMOD_Xlink_DSPP_226_, UNIMOD_unimod_root_node}, {UNIMOD_DBIA, UNIMOD_unimod_root_node}, - {UNIMOD_Mono_N___propargyl_L_Gln_desthiobiotin, UNIMOD_unimod_root_node}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, UNIMOD_unimod_root_node}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, UNIMOD_unimod_root_node}, + {UNIMOD_Mono_Ngamma_propargyl_L_Gln_desthiobiotin, UNIMOD_unimod_root_node}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, UNIMOD_unimod_root_node}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, UNIMOD_unimod_root_node}, {UNIMOD_L_Gln, UNIMOD_unimod_root_node}, {UNIMOD_Glyceroyl, UNIMOD_unimod_root_node}, {UNIMOD_N6pAMP, UNIMOD_unimod_root_node}, @@ -10550,6 +10717,35 @@ {UNIMOD_Pyro_QQTGG, UNIMOD_unimod_root_node}, {UNIMOD_NQTGG, UNIMOD_unimod_root_node}, {UNIMOD_DVFQQQTGG, UNIMOD_unimod_root_node}, + {UNIMOD_iST_NHS_specific_cysteine_modification, UNIMOD_unimod_root_node}, + {UNIMOD_Label_13C_2_15N_1_, UNIMOD_unimod_root_node}, + {UNIMOD_DPIA, UNIMOD_unimod_root_node}, + {UNIMOD_Acetoacetyl, UNIMOD_unimod_root_node}, + {UNIMOD_Isovaleryl, UNIMOD_unimod_root_node}, + {UNIMOD_2_methylbutyryl, UNIMOD_unimod_root_node}, + {UNIMOD_Tiglyl, UNIMOD_unimod_root_node}, + {UNIMOD_3_methylglutaryl, UNIMOD_unimod_root_node}, + {UNIMOD_3_methylglutaconyl, UNIMOD_unimod_root_node}, + {UNIMOD_3_hydroxy_3_methylglutaryl, UNIMOD_unimod_root_node}, + {UNIMOD_Lactylation, UNIMOD_unimod_root_node}, + {UNIMOD_Pyruvoyl, UNIMOD_unimod_root_node}, + {UNIMOD_Glyoxylyl, UNIMOD_unimod_root_node}, + {UNIMOD_Itaconatyl, UNIMOD_unimod_root_node}, + {UNIMOD_Itaconyl, UNIMOD_unimod_root_node}, + {UNIMOD_ValGly, UNIMOD_unimod_root_node}, + {UNIMOD_Pentanoyl, UNIMOD_unimod_root_node}, + {UNIMOD_Hexanoyl, UNIMOD_unimod_root_node}, + {UNIMOD_Label_13C_6_15N_2__TMT6plex, UNIMOD_unimod_root_node}, + {UNIMOD_Label_13C_6_15N_2__TMTpro, UNIMOD_unimod_root_node}, + {UNIMOD_2PCA_triazole_ethanethiol, UNIMOD_unimod_root_node}, + {UNIMOD_Desthiobiotin_Phenol, UNIMOD_unimod_root_node}, + {UNIMOD_Cys_vinyl_sulfone_amine_probe_addition, UNIMOD_unimod_root_node}, + {UNIMOD_Cys__fGly_diol, UNIMOD_unimod_root_node}, + {UNIMOD_Cys__sulfo_fGly_dio, UNIMOD_unimod_root_node}, + {UNIMOD_Cys__Ser_O_sulfate, UNIMOD_unimod_root_node}, + {UNIMOD_b_type_ion, UNIMOD_unimod_root_node}, + {UNIMOD_PnTAG, UNIMOD_unimod_root_node}, + {UNIMOD_DMA_PEG3, UNIMOD_unimod_root_node}, {UO_length_unit, UO_unit}, {UO_mass_unit, UO_unit}, {UO_time_unit, UO_unit}, @@ -11085,6 +11281,7 @@ {MS_native_spectrum_identifier_format__combined_spectra, MS_source_data_file}, {MS_identification_parameter, MS_spectrum_interpretation}, {MS_crosslinking_result_details, MS_spectrum_interpretation}, + {MS_measured_element, MS_binary_data_array}, {MS_adduct_ion_attribute, MS_adduct_ion}, {MS_external_reference_data, MS_Proteomics_Standards_Initiative_Mass_Spectrometry_Vocabularies}, {MS_named_element, MS_Proteomics_Standards_Initiative_Mass_Spectrometry_Vocabularies}, @@ -11246,11 +11443,14 @@ {MS_flow_rate_array, "has_units", UO_microliters_per_minute}, {MS_pressure_array, "has_units", UO_pascal}, {MS_temperature_array, "has_units", UO_kelvin}, + {MS_temperature_array, "has_units", UO_degree_Celsius}, {MS_elution_time, "has_units", UO_second}, {MS_elution_time, "has_units", UO_minute}, {MS_isolation_window_target_m_z, "has_units", MS_m_z}, {MS_isolation_window_lower_offset, "has_units", MS_m_z}, {MS_isolation_window_upper_offset, "has_units", MS_m_z}, + {MS_precision, "has_units", MS_m_z}, + {MS_precision, "has_units", UO_parts_per_million}, {MS_matrix_solution_concentration, "has_units", UO_gram_per_liter}, {MS_wavelength_OBSOLETE, "has_units", UO_nanometer}, {MS_focus_diameter_x, "has_units", UO_micrometer}, @@ -11281,7 +11481,7 @@ {MS_release_date, "has_structured_representation_in_format", MS_mzIdentML_format}, {MS_retention_time_s__OBSOLETE, "has_units", UO_second}, {MS_retention_time_s__OBSOLETE, "has_units", UO_minute}, - {MS_theoretical_mass, "has_units", UO_dalton}, + {MS_theoretical_neutral_mass, "has_units", UO_dalton}, {MS_SEQUEST_xcorr, "has_order", MS_higher_score_better}, {MS_DB_MW_filter_maximum, "has_units", UO_dalton}, {MS_DB_MW_filter_maximum, "has_units", UO_kilodalton}, @@ -11426,6 +11626,7 @@ {MS_protein_group_level_probability, "has_domain", MS_value_between_0_and_1_inclusive}, {MS_PIA_protein_score, "has_order", MS_higher_score_better}, {MS_count_of_identified_proteins, "has_metric_category", MS_ID_based_metric}, + {MS_count_of_identified_proteins, "has_units", UO_count_unit}, {MS_protein_group_level_global_FNR, "has_domain", MS_value_between_0_and_1_inclusive}, {MS_peptide_sequence_level_global_FNR, "has_domain", MS_value_between_0_and_1_inclusive}, {MS_PSM_level_global_FNR, "has_domain", MS_value_between_0_and_1_inclusive}, @@ -11535,7 +11736,9 @@ {MS_average_m_z_deviation, "has_units", MS_m_z}, {MS_average_m_z_deviation, "has_units", UO_parts_per_million}, {MS_count_of_identified_peptidoforms, "has_metric_category", MS_ID_based_metric}, + {MS_count_of_identified_peptidoforms, "has_units", UO_count_unit}, {MS_count_of_identified_spectra, "has_metric_category", MS_ID_based_metric}, + {MS_count_of_identified_spectra, "has_units", UO_count_unit}, {MS_related_spectrum_keys, "has_value_type", MS_list_of_integers}, {MS_similar_spectrum_keys, "has_value_type", MS_list_of_integers}, {MS_spectrum_cluster_member_spectrum_keys, "has_value_type", MS_list_of_integers}, @@ -11543,6 +11746,7 @@ {MS_other_attribute_value, "has_value_type", MS_list_of_integers}, {MS_other_attribute_value, "has_value_type", MS_list_of_floats}, {MS_Luciphor_deltaScore, "has_regexp", MS_regular_expression_for_modification_localization_scoring}, + {MS_contributing_replicate_spectrum_keys, "has_value_type", MS_list_of_integers}, {MS_number_of_identified_protein_groups, "has_metric_category", MS_ID_based_metric}, {MS_number_of_identified_protein_groups, "has_units", UO_count_unit}, {MS_number_of_identified_proteoforms, "has_metric_category", MS_ID_based_metric}, @@ -11556,46 +11760,90 @@ {MS_specification_document_extension_version, "has_regexp", MS_semantic_version_regexp}, {MS_crosslinker_cleavage_characteristics, "has_regexp", MS_crosslinker_cleavage_regular_expression}, {MS_SelexION_separation_voltage, "has_units", UO_volt}, + {MS_Scout_score, "has_order", MS_Scout}, + {MS_electron_beam_energy, "has_units", UO_electronvolt}, + {MS_Kojak_score, "has_order", MS_higher_score_better}, + {MS_Kojak_expectation_value, "has_order", MS_lower_score_better}, + {MS_Kojak_matched_ions, "has_order", MS_higher_score_better}, + {MS_Kojak_consecutive_matched_ions, "has_order", MS_higher_score_better}, + {MS_Kojak_delta_score, "has_order", MS_higher_score_better}, + {MS_Kojak_rank, "has_order", MS_lower_score_better}, + {MS_Kojak_score_xlink, "has_order", MS_higher_score_better}, + {MS_Kojak_expectation_value_xlink, "has_order", MS_lower_score_better}, + {MS_Kojak_matched_ions_xlink, "has_order", MS_higher_score_better}, + {MS_Andromeda_delta_score, "has_order", MS_higher_score_better}, + {MS_AlphaLP, "has_regexp", MS______TSAV__}, + {MS_lowest_observed_ion_mobility, "has_units", UO_millisecond}, + {MS_lowest_observed_ion_mobility, "has_units", UO_second}, + {MS_lowest_observed_ion_mobility, "has_units", MS_volt_second_per_square_centimeter}, + {MS_highest_observed_ion_mobility, "has_units", UO_millisecond}, + {MS_highest_observed_ion_mobility, "has_units", UO_second}, + {MS_highest_observed_ion_mobility, "has_units", MS_volt_second_per_square_centimeter}, + {MS_precursor_ion_current_chromatogram, "has_metric_category", MS_ID_free_metric}, + {MS_precursor_ion_current_chromatogram, "has_metric_category", MS_single_run_based_metric}, + {MS_precursor_ion_current_chromatogram, "has_metric_category", MS_chromatogram_metric}, + {MS_precursor_ion_current_chromatogram, "has_metric_category", MS_XIC_metric}, + {MS_precursor_ion_current_chromatogram, "has_metric_category", MS_MS1_metric}, + {MS_fragment_ppm_deviation_median, "has_metric_category", MS_ID_based_metric}, + {MS_fragment_ppm_deviation_median, "has_metric_category", MS_MS2_metric}, + {MS_fragment_ppm_deviation_median, "has_units", UO_parts_per_million}, + {MS_fragment_ppm_deviation_median, "has_value_concept", MS_accuracy}, + {MS_fragment_ppm_deviation_mean, "has_metric_category", MS_ID_based_metric}, + {MS_fragment_ppm_deviation_mean, "has_metric_category", MS_MS2_metric}, + {MS_fragment_ppm_deviation_mean, "has_units", UO_parts_per_million}, + {MS_fragment_ppm_deviation_mean, "has_value_concept", MS_accuracy}, + {MS_fragment_ppm_deviation_sigma, "has_metric_category", MS_ID_based_metric}, + {MS_fragment_ppm_deviation_sigma, "has_metric_category", MS_MS2_metric}, + {MS_fragment_ppm_deviation_sigma, "has_units", UO_parts_per_million}, + {MS_fragment_ppm_deviation_sigma, "has_value_concept", MS_precision}, + {MS_area_under_TIC_in_MS1, "has_metric_category", MS_ID_free_metric}, + {MS_area_under_TIC_in_MS1, "has_metric_category", MS_chromatogram_metric}, + {MS_area_under_TIC_in_MS1, "has_metric_category", MS_MS1_metric}, + {MS_area_under_TIC_in_MS2, "has_metric_category", MS_ID_free_metric}, + {MS_area_under_TIC_in_MS2, "has_metric_category", MS_chromatogram_metric}, + {MS_area_under_TIC_in_MS2, "has_metric_category", MS_MS2_metric}, + {MS_peak_area_of_MS1_vs_MS2_signal_ratio, "has_metric_category", MS_ID_free_metric}, + {MS_peak_area_of_MS1_vs_MS2_signal_ratio, "has_metric_category", MS_chromatogram_metric}, {MS_XIC50_fraction, "has_metric_category", MS_ID_free_metric}, {MS_XIC50_fraction, "has_metric_category", MS_single_run_based_metric}, - {MS_XIC50_fraction, "has_value_concept", UO_fraction}, + {MS_XIC50_fraction, "has_units", UO_fraction}, {MS_XIC_FWHM_quantiles, "has_metric_category", MS_ID_free_metric}, {MS_XIC_FWHM_quantiles, "has_metric_category", MS_single_run_based_metric}, {MS_XIC_FWHM_quantiles, "has_metric_category", MS_XIC_metric}, {MS_XIC_FWHM_quantiles, "has_units", UO_second}, {MS_XIC_FWHM_quantiles, "has_value_concept", MS_full_width_at_half_maximum}, - {MS_XIC_Height_quartile_ratios, "has_metric_category", MS_ID_free_metric}, - {MS_XIC_Height_quartile_ratios, "has_metric_category", MS_single_run_based_metric}, - {MS_XIC_Height_quartile_ratios, "has_metric_category", MS_XIC_metric}, - {MS_XIC_Height_quartile_ratios, "has_value_concept", UO_fraction}, + {MS_obsolete_XIC_Height_quartile_ratios_OBSOLETE, "has_metric_category", MS_ID_free_metric}, + {MS_obsolete_XIC_Height_quartile_ratios_OBSOLETE, "has_metric_category", MS_single_run_based_metric}, + {MS_obsolete_XIC_Height_quartile_ratios_OBSOLETE, "has_metric_category", MS_XIC_metric}, + {MS_obsolete_XIC_Height_quartile_ratios_OBSOLETE, "has_units", UO_fraction}, {MS_chromatography_duration, "has_metric_category", MS_ID_free_metric}, {MS_chromatography_duration, "has_metric_category", MS_single_run_based_metric}, {MS_chromatography_duration, "has_metric_category", MS_retention_time_metric}, {MS_chromatography_duration, "has_units", UO_second}, {MS_chromatography_duration, "has_value_concept", NCIT_Duration}, - {MS_TIC_quarters_RT_fraction, "has_metric_category", MS_ID_free_metric}, - {MS_TIC_quarters_RT_fraction, "has_metric_category", MS_single_run_based_metric}, - {MS_TIC_quarters_RT_fraction, "has_metric_category", MS_retention_time_metric}, - {MS_TIC_quarters_RT_fraction, "has_metric_category", MS_chromatogram_metric}, - {MS_TIC_quarters_RT_fraction, "has_units", UO_fraction}, - {MS_MS1_quarter_RT_fraction, "has_metric_category", MS_ID_free_metric}, - {MS_MS1_quarter_RT_fraction, "has_metric_category", MS_single_run_based_metric}, - {MS_MS1_quarter_RT_fraction, "has_metric_category", MS_retention_time_metric}, - {MS_MS1_quarter_RT_fraction, "has_metric_category", MS_MS1_metric}, - {MS_MS1_quarter_RT_fraction, "has_units", UO_fraction}, - {MS_MS2_quarter_RT_fraction, "has_metric_category", MS_ID_free_metric}, - {MS_MS2_quarter_RT_fraction, "has_metric_category", MS_single_run_based_metric}, - {MS_MS2_quarter_RT_fraction, "has_metric_category", MS_retention_time_metric}, - {MS_MS2_quarter_RT_fraction, "has_metric_category", MS_MS2_metric}, - {MS_MS2_quarter_RT_fraction, "has_units", UO_fraction}, - {MS_MS1_TIC_change_quartile_ratios, "has_metric_category", MS_ID_free_metric}, - {MS_MS1_TIC_change_quartile_ratios, "has_metric_category", MS_single_run_based_metric}, - {MS_MS1_TIC_change_quartile_ratios, "has_metric_category", MS_chromatogram_metric}, - {MS_MS1_TIC_change_quartile_ratios, "has_metric_category", MS_MS1_metric}, - {MS_MS1_TIC_quartile_ratios, "has_metric_category", MS_ID_free_metric}, - {MS_MS1_TIC_quartile_ratios, "has_metric_category", MS_single_run_based_metric}, - {MS_MS1_TIC_quartile_ratios, "has_metric_category", MS_chromatogram_metric}, - {MS_MS1_TIC_quartile_ratios, "has_metric_category", MS_MS1_metric}, + {MS_obsolete_TIC_quarters_RT_fraction_OBSOLETE, "has_metric_category", MS_ID_free_metric}, + {MS_obsolete_TIC_quarters_RT_fraction_OBSOLETE, "has_metric_category", MS_single_run_based_metric}, + {MS_obsolete_TIC_quarters_RT_fraction_OBSOLETE, "has_metric_category", MS_retention_time_metric}, + {MS_obsolete_TIC_quarters_RT_fraction_OBSOLETE, "has_metric_category", MS_chromatogram_metric}, + {MS_obsolete_TIC_quarters_RT_fraction_OBSOLETE, "has_units", UO_fraction}, + {MS_obsolete_MS1_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_ID_free_metric}, + {MS_obsolete_MS1_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_single_run_based_metric}, + {MS_obsolete_MS1_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_retention_time_metric}, + {MS_obsolete_MS1_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_MS1_metric}, + {MS_obsolete_MS1_quarter_RT_fraction_OBSOLETE, "has_units", UO_fraction}, + {MS_obsolete_MS2_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_ID_free_metric}, + {MS_obsolete_MS2_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_single_run_based_metric}, + {MS_obsolete_MS2_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_retention_time_metric}, + {MS_obsolete_MS2_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_MS2_metric}, + {MS_obsolete_MS2_quarter_RT_fraction_OBSOLETE, "has_units", UO_fraction}, + {MS_obsolete_MS1_TIC_change_quartile_ratios_OBSOLETE, "has_metric_category", MS_ID_free_metric}, + {MS_obsolete_MS1_TIC_change_quartile_ratios_OBSOLETE, "has_metric_category", MS_single_run_based_metric}, + {MS_obsolete_MS1_TIC_change_quartile_ratios_OBSOLETE, "has_metric_category", MS_chromatogram_metric}, + {MS_obsolete_MS1_TIC_change_quartile_ratios_OBSOLETE, "has_metric_category", MS_MS1_metric}, + {MS_obsolete_MS1_TIC_quartile_ratios_OBSOLETE, "has_metric_category", MS_ID_free_metric}, + {MS_obsolete_MS1_TIC_quartile_ratios_OBSOLETE, "has_metric_category", MS_single_run_based_metric}, + {MS_obsolete_MS1_TIC_quartile_ratios_OBSOLETE, "has_metric_category", MS_chromatogram_metric}, + {MS_obsolete_MS1_TIC_quartile_ratios_OBSOLETE, "has_metric_category", MS_MS1_metric}, {MS_number_of_MS1_spectra, "has_metric_category", MS_ID_free_metric}, {MS_number_of_MS1_spectra, "has_metric_category", MS_single_run_based_metric}, {MS_number_of_MS1_spectra, "has_metric_category", MS_MS1_metric}, @@ -11641,7 +11889,7 @@ {MS_MS_run_duration, "has_value_concept", NCIT_Duration}, {MS_spectra_half_TIC, "has_column", UO_fraction}, {MS_spectra_half_TIC, "has_metric_category", MS_ID_free_metric}, - {MS_spectra_half_TIC, "has_metric_category", MS_MS2_metric}, + {MS_spectra_half_TIC, "has_metric_category", MS_MS_metric}, {MS_spectra_half_TIC, "has_metric_category", MS_single_run_based_metric}, {MS_spectra_half_TIC, "has_optional_column", MS_universal_spectrum_identifier}, {MS_spectra_half_TIC, "has_optional_column", MS_native_spectrum_identifier_format}, @@ -11871,18 +12119,36 @@ {MS_iRT_calibration_formula, "has_metric_category", MS_retention_time_metric}, {MS_iRT_calibration_adjusted_r_squared, "has_metric_category", MS_ID_based_metric}, {MS_iRT_calibration_adjusted_r_squared, "has_metric_category", MS_retention_time_metric}, + {MS_MS2_precursor_median_m_z_of_identified_quantification_data_points, "has_metric_category", MS_ID_based_metric}, + {MS_MS2_precursor_median_m_z_of_identified_quantification_data_points, "has_metric_category", MS_ion_source_metric}, {MS_MS2_precursor_median_m_z_of_identified_quantification_data_points, "has_metric_category", MS_MS2_metric}, {MS_MS2_precursor_median_m_z_of_identified_quantification_data_points, "has_units", MS_m_z}, + {MS_interquartile_RT_period_for_identified_quantification_data_points, "has_metric_category", MS_ID_based_metric}, + {MS_interquartile_RT_period_for_identified_quantification_data_points, "has_metric_category", MS_chromatogram_metric}, {MS_interquartile_RT_period_for_identified_quantification_data_points, "has_units", UO_second}, + {MS_rate_of_the_interquartile_RT_period_for_identified_quantification_data_points, "has_metric_category", MS_ID_based_metric}, + {MS_rate_of_the_interquartile_RT_period_for_identified_quantification_data_points, "has_metric_category", MS_chromatogram_metric}, {MS_rate_of_the_interquartile_RT_period_for_identified_quantification_data_points, "has_units", UO_hertz}, + {MS_area_under_TIC, "has_metric_category", MS_ID_free_metric}, + {MS_area_under_TIC, "has_metric_category", MS_chromatogram_metric}, + {MS_area_under_TIC_RT_quantiles, "has_metric_category", MS_ID_free_metric}, + {MS_area_under_TIC_RT_quantiles, "has_metric_category", MS_chromatogram_metric}, + {MS_extent_of_identified_MS2_precursor_intensity, "has_metric_category", MS_ID_based_metric}, {MS_extent_of_identified_MS2_precursor_intensity, "has_metric_category", MS_MS2_metric}, + {MS_median_of_TIC_values_in_the_RT_range_in_which_the_middle_half_of_quantification_data_points_are_identified, "has_metric_category", MS_ID_based_metric}, + {MS_median_of_TIC_values_in_the_shortest_RT_range_in_which_half_of_the_quantification_data_points_are_identified, "has_metric_category", MS_ID_based_metric}, + {MS_MS2_precursor_intensity_range, "has_metric_category", MS_ID_free_metric}, {MS_MS2_precursor_intensity_range, "has_metric_category", MS_MS2_metric}, + {MS_identified_MS2_precursor_intensity_distribution, "has_metric_category", MS_ID_based_metric}, {MS_identified_MS2_precursor_intensity_distribution, "has_metric_category", MS_MS2_metric}, {MS_identified_MS2_precursor_intensity_distribution, "has_units", MS_intensity_unit}, + {MS_unidentified_MS2_precursor_intensity_distribution, "has_metric_category", MS_ID_based_metric}, {MS_unidentified_MS2_precursor_intensity_distribution, "has_metric_category", MS_MS2_metric}, {MS_unidentified_MS2_precursor_intensity_distribution, "has_units", MS_intensity_unit}, + {MS_identified_MS2_precursor_intensity_distribution_mean, "has_metric_category", MS_ID_based_metric}, {MS_identified_MS2_precursor_intensity_distribution_mean, "has_metric_category", MS_MS2_metric}, {MS_identified_MS2_precursor_intensity_distribution_mean, "has_units", MS_intensity_unit}, + {MS_unidentified_MS2_precursor_intensity_distribution_mean, "has_metric_category", MS_ID_based_metric}, {MS_unidentified_MS2_precursor_intensity_distribution_mean, "has_metric_category", MS_MS2_metric}, {MS_unidentified_MS2_precursor_intensity_distribution_mean, "has_units", MS_intensity_unit}, {MS_identified_MS2_precursor_intensity_distribution_sigma, "has_metric_category", MS_ID_based_metric}, @@ -11891,36 +12157,100 @@ {MS_unidentified_MS2_precursor_intensity_distribution_sigma, "has_metric_category", MS_ID_based_metric}, {MS_unidentified_MS2_precursor_intensity_distribution_sigma, "has_metric_category", MS_MS2_metric}, {MS_unidentified_MS2_precursor_intensity_distribution_sigma, "has_units", MS_intensity_unit}, + {MS_ratio_of_1__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_ID_free_metric}, {MS_ratio_of_1__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_single_run_based_metric}, {MS_ratio_of_1__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_ion_source_metric}, {MS_ratio_of_1__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_MS2_metric}, + {MS_ratio_of_1__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_ID_based_metric}, {MS_ratio_of_1__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_single_run_based_metric}, {MS_ratio_of_1__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_ion_source_metric}, {MS_ratio_of_1__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_MS2_metric}, + {MS_ratio_of_3__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_ID_free_metric}, {MS_ratio_of_3__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_single_run_based_metric}, {MS_ratio_of_3__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_ion_source_metric}, {MS_ratio_of_3__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_MS2_metric}, + {MS_ratio_of_3__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_ID_based_metric}, {MS_ratio_of_3__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_single_run_based_metric}, {MS_ratio_of_3__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_ion_source_metric}, {MS_ratio_of_3__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_MS2_metric}, + {MS_ratio_of_4__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_ID_free_metric}, {MS_ratio_of_4__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_single_run_based_metric}, {MS_ratio_of_4__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_ion_source_metric}, {MS_ratio_of_4__over_2__of_all_MS2_known_precursor_charges, "has_metric_category", MS_MS2_metric}, + {MS_ratio_of_4__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_ID_based_metric}, {MS_ratio_of_4__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_single_run_based_metric}, {MS_ratio_of_4__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_ion_source_metric}, {MS_ratio_of_4__over_2__of_identified_MS2_known_precursor_charges, "has_metric_category", MS_MS2_metric}, + {MS_mean_MS2_precursor_charge_in_all_spectra, "has_metric_category", MS_ID_free_metric}, {MS_mean_MS2_precursor_charge_in_all_spectra, "has_metric_category", MS_single_run_based_metric}, {MS_mean_MS2_precursor_charge_in_all_spectra, "has_metric_category", MS_ion_source_metric}, {MS_mean_MS2_precursor_charge_in_all_spectra, "has_metric_category", MS_MS2_metric}, + {MS_mean_MS2_precursor_charge_in_identified_spectra, "has_metric_category", MS_ID_based_metric}, {MS_mean_MS2_precursor_charge_in_identified_spectra, "has_metric_category", MS_single_run_based_metric}, {MS_mean_MS2_precursor_charge_in_identified_spectra, "has_metric_category", MS_ion_source_metric}, {MS_mean_MS2_precursor_charge_in_identified_spectra, "has_metric_category", MS_MS2_metric}, + {MS_median_MS2_precursor_charge_in_all_spectra, "has_metric_category", MS_ID_free_metric}, {MS_median_MS2_precursor_charge_in_all_spectra, "has_metric_category", MS_single_run_based_metric}, {MS_median_MS2_precursor_charge_in_all_spectra, "has_metric_category", MS_ion_source_metric}, {MS_median_MS2_precursor_charge_in_all_spectra, "has_metric_category", MS_MS2_metric}, + {MS_median_MS2_precursor_charge_in_identified_spectra, "has_metric_category", MS_ID_based_metric}, {MS_median_MS2_precursor_charge_in_identified_spectra, "has_metric_category", MS_single_run_based_metric}, {MS_median_MS2_precursor_charge_in_identified_spectra, "has_metric_category", MS_ion_source_metric}, {MS_median_MS2_precursor_charge_in_identified_spectra, "has_metric_category", MS_MS2_metric}, + {MS_contaminant_protein_abundance_fraction, "has_domain", MS_value_between_0_and_1_inclusive}, + {MS_contaminant_protein_abundance_fraction, "has_metric_category", MS_ID_based_metric}, + {MS_contaminant_protein_abundance_fraction, "has_order", MS_lower_score_better}, + {MS_contaminant_protein_abundance_fraction, "has_units", UO_fraction}, + {MS_precursor_ppm_deviation_mean, "has_metric_category", MS_ID_based_metric}, + {MS_precursor_ppm_deviation_mean, "has_metric_category", MS_MS1_metric}, + {MS_precursor_ppm_deviation_mean, "has_units", UO_parts_per_million}, + {MS_precursor_ppm_deviation_mean, "has_value_concept", MS_accuracy}, + {MS_precursor_ppm_deviation_sigma, "has_metric_category", MS_ID_based_metric}, + {MS_precursor_ppm_deviation_sigma, "has_metric_category", MS_MS1_metric}, + {MS_precursor_ppm_deviation_sigma, "has_units", UO_parts_per_million}, + {MS_precursor_ppm_deviation_sigma, "has_value_concept", MS_precision}, + {MS_table_of_missed_cleavage_counts, "has_column", MS_number_of_missed_cleavages}, + {MS_table_of_missed_cleavage_counts, "has_column", NCIT_Number_of_Occurrences}, + {MS_table_of_missed_cleavage_counts, "has_metric_category", MS_ID_based_metric}, + {MS_obsolete_identified_MS2_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_single_run_based_metric}, + {MS_obsolete_identified_MS2_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_ID_based_metric}, + {MS_obsolete_identified_MS2_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_MS2_metric}, + {MS_obsolete_identified_MS2_quarter_RT_fraction_OBSOLETE, "has_metric_category", MS_retention_time_metric}, + {MS_obsolete_identified_MS2_quarter_RT_fraction_OBSOLETE, "has_units", UO_fraction}, + {MS_XIC_Height_quantile_ratios, "has_metric_category", MS_ID_free_metric}, + {MS_XIC_Height_quantile_ratios, "has_metric_category", MS_single_run_based_metric}, + {MS_XIC_Height_quantile_ratios, "has_metric_category", MS_XIC_metric}, + {MS_XIC_Height_quantile_ratios, "has_units", UO_fraction}, + {MS_TIC_quantile_RT_fraction, "has_metric_category", MS_ID_free_metric}, + {MS_TIC_quantile_RT_fraction, "has_metric_category", MS_single_run_based_metric}, + {MS_TIC_quantile_RT_fraction, "has_metric_category", MS_retention_time_metric}, + {MS_TIC_quantile_RT_fraction, "has_metric_category", MS_chromatogram_metric}, + {MS_TIC_quantile_RT_fraction, "has_units", UO_fraction}, + {MS_MS1_quantile_RT_fraction, "has_metric_category", MS_ID_free_metric}, + {MS_MS1_quantile_RT_fraction, "has_metric_category", MS_single_run_based_metric}, + {MS_MS1_quantile_RT_fraction, "has_metric_category", MS_retention_time_metric}, + {MS_MS1_quantile_RT_fraction, "has_metric_category", MS_MS1_metric}, + {MS_MS1_quantile_RT_fraction, "has_units", UO_fraction}, + {MS_MS2_quantile_RT_fraction, "has_metric_category", MS_ID_free_metric}, + {MS_MS2_quantile_RT_fraction, "has_metric_category", MS_single_run_based_metric}, + {MS_MS2_quantile_RT_fraction, "has_metric_category", MS_retention_time_metric}, + {MS_MS2_quantile_RT_fraction, "has_metric_category", MS_MS2_metric}, + {MS_MS2_quantile_RT_fraction, "has_units", UO_fraction}, + {MS_MS1_TIC_change_quantile_ratios, "has_metric_category", MS_ID_free_metric}, + {MS_MS1_TIC_change_quantile_ratios, "has_metric_category", MS_single_run_based_metric}, + {MS_MS1_TIC_change_quantile_ratios, "has_metric_category", MS_chromatogram_metric}, + {MS_MS1_TIC_change_quantile_ratios, "has_metric_category", MS_MS1_metric}, + {MS_MS1_TIC_change_quantile_ratios, "has_units", UO_fraction}, + {MS_MS1_TIC_quantile_ratios, "has_metric_category", MS_ID_free_metric}, + {MS_MS1_TIC_quantile_ratios, "has_metric_category", MS_single_run_based_metric}, + {MS_MS1_TIC_quantile_ratios, "has_metric_category", MS_chromatogram_metric}, + {MS_MS1_TIC_quantile_ratios, "has_metric_category", MS_MS1_metric}, + {MS_MS1_TIC_quantile_ratios, "has_units", UO_fraction}, + {MS_identified_MS2_quantile_RT_fraction, "has_metric_category", MS_ID_based_metric}, + {MS_identified_MS2_quantile_RT_fraction, "has_metric_category", MS_single_run_based_metric}, + {MS_identified_MS2_quantile_RT_fraction, "has_metric_category", MS_retention_time_metric}, + {MS_identified_MS2_quantile_RT_fraction, "has_metric_category", MS_MS2_metric}, + {MS_identified_MS2_quantile_RT_fraction, "has_units", UO_fraction}, }; // relationsOther_ @@ -12089,6 +12419,7 @@ {MS_predicted_isoelectric_point, "predicted pI"}, {MS_unlabeled_peptidoform, "light labeled peptide"}, {MS_transition, "reaction"}, + {MS_theoretical_neutral_mass, "theoretical mass"}, {MS_product_ion_m_z, "fragment ion m/z"}, {MS_product_ion_intensity, "fragment ion intensity"}, {MS_Arg_C, "Trypsin/R"}, @@ -12118,6 +12449,7 @@ {MS_MS_GF_, "MS-GFDB"}, {MS_Trans_Proteomic_Pipeline, "TPP"}, {MS_iProphet, "InterProphet"}, + {MS_mzmine, "MZmine"}, {MS_crosslinking_search, "cross-linking search"}, {MS_crosslinking_attribute, "cross-linking attribute"}, {MS_crosslink_donor, "cross-link donor"}, @@ -12153,6 +12485,9 @@ {MS_ChemClipse, "chemclipse"}, {MS_OpenChrom, "openchrom"}, {MS_asymmetric_track_lossless_time_of_flight_analyzer, "Astral"}, + {MS_AlphaLP, "alpha-lytic endopeptidase"}, + {MS_AlphaLP, "alpha-lytic protease"}, + {MS_precursor_ion_current_chromatogram, "precursor ion chromatogram"}, {MS_XIC50_fraction, "XIC-WideFrac"}, {MS_number_of_MS1_spectra, "MS1-Count"}, {MS_number_of_MS2_spectra, "MS2-Count"}, @@ -13347,6 +13682,10 @@ {UNIMOD_HNE, "spec_5_hidden", "1"}, {UNIMOD_HNE, "spec_5_position", "Anywhere"}, {UNIMOD_HNE, "spec_5_site", "L"}, + {UNIMOD_HNE, "spec_6_classification", "Post-translational"}, + {UNIMOD_HNE, "spec_6_hidden", "1"}, + {UNIMOD_HNE, "spec_6_position", "Anywhere"}, + {UNIMOD_HNE, "spec_6_site", "R"}, {UNIMOD_Glucuronyl, "approved", "1"}, {UNIMOD_Glucuronyl, "delta_composition", "HexA"}, {UNIMOD_Glucuronyl, "spec_1_classification", "Other glycosylation"}, @@ -17629,6 +17968,10 @@ {UNIMOD_TMT6plex, "spec_6_hidden", "1"}, {UNIMOD_TMT6plex, "spec_6_position", "Anywhere"}, {UNIMOD_TMT6plex, "spec_6_site", "T"}, + {UNIMOD_TMT6plex, "spec_7_classification", "Isotopic label"}, + {UNIMOD_TMT6plex, "spec_7_hidden", "1"}, + {UNIMOD_TMT6plex, "spec_7_position", "Anywhere"}, + {UNIMOD_TMT6plex, "spec_7_site", "Y"}, {UNIMOD_TMT2plex, "approved", "0"}, {UNIMOD_TMT2plex, "delta_composition", "H(20) C(11) 13C N(2) O(2)"}, {UNIMOD_TMT2plex, "spec_1_classification", "Isotopic label"}, @@ -17655,6 +17998,10 @@ {UNIMOD_TMT2plex, "spec_6_hidden", "1"}, {UNIMOD_TMT2plex, "spec_6_position", "Anywhere"}, {UNIMOD_TMT2plex, "spec_6_site", "T"}, + {UNIMOD_TMT2plex, "spec_7_classification", "Isotopic label"}, + {UNIMOD_TMT2plex, "spec_7_hidden", "1"}, + {UNIMOD_TMT2plex, "spec_7_position", "Anywhere"}, + {UNIMOD_TMT2plex, "spec_7_site", "Y"}, {UNIMOD_TMT, "approved", "0"}, {UNIMOD_TMT, "delta_composition", "H(20) C(12) N(2) O(2)"}, {UNIMOD_TMT, "spec_1_classification", "Chemical derivative"}, @@ -17681,6 +18028,10 @@ {UNIMOD_TMT, "spec_6_hidden", "1"}, {UNIMOD_TMT, "spec_6_position", "Anywhere"}, {UNIMOD_TMT, "spec_6_site", "T"}, + {UNIMOD_TMT, "spec_7_classification", "Isotopic label"}, + {UNIMOD_TMT, "spec_7_hidden", "1"}, + {UNIMOD_TMT, "spec_7_position", "Anywhere"}, + {UNIMOD_TMT, "spec_7_site", "Y"}, {UNIMOD_ExacTagThiol, "approved", "0"}, {UNIMOD_ExacTagThiol, "delta_composition", "H(50) C(23) 13C(12) N(8) 15N(6) O(18)"}, {UNIMOD_ExacTagThiol, "spec_1_classification", "Isotopic label"}, @@ -25001,8 +25352,8 @@ {UNIMOD_Cation_Fe_III_, "spec_1_hidden", "1"}, {UNIMOD_Cation_Fe_III_, "spec_1_position", "Anywhere"}, {UNIMOD_Cation_Fe_III_, "spec_1_position", "Anywhere"}, - {UNIMOD_Cation_Fe_III_, "spec_1_site", "D"}, {UNIMOD_Cation_Fe_III_, "spec_1_site", "E"}, + {UNIMOD_Cation_Fe_III_, "spec_1_site", "D"}, {UNIMOD_Cation_Fe_III_, "spec_2_classification", "Artefact"}, {UNIMOD_Cation_Fe_III_, "spec_2_hidden", "1"}, {UNIMOD_Cation_Fe_III_, "spec_2_position", "Any C-term"}, @@ -25127,6 +25478,18 @@ {UNIMOD_Xlink_BuUrBu_111_, "spec_2_hidden", "1"}, {UNIMOD_Xlink_BuUrBu_111_, "spec_2_position", "Protein N-term"}, {UNIMOD_Xlink_BuUrBu_111_, "spec_2_site", "N-term"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_site", "T"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_site", "S"}, + {UNIMOD_Xlink_BuUrBu_111_, "spec_3_site", "Y"}, {UNIMOD_Xlink_BuUrBu_85_, "approved", "0"}, {UNIMOD_Xlink_BuUrBu_85_, "delta_composition", "H(7) C(4) N O"}, {UNIMOD_Xlink_BuUrBu_85_, "spec_1_classification", "Chemical derivative"}, @@ -25137,6 +25500,18 @@ {UNIMOD_Xlink_BuUrBu_85_, "spec_2_hidden", "1"}, {UNIMOD_Xlink_BuUrBu_85_, "spec_2_position", "Protein N-term"}, {UNIMOD_Xlink_BuUrBu_85_, "spec_2_site", "N-term"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_site", "T"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_site", "S"}, + {UNIMOD_Xlink_BuUrBu_85_, "spec_3_site", "Y"}, {UNIMOD_Xlink_BuUrBu_213_, "approved", "0"}, {UNIMOD_Xlink_BuUrBu_213_, "delta_composition", "H(15) C(9) N(3) O(3)"}, {UNIMOD_Xlink_BuUrBu_213_, "spec_1_classification", "Chemical derivative"}, @@ -25147,6 +25522,18 @@ {UNIMOD_Xlink_BuUrBu_213_, "spec_2_hidden", "1"}, {UNIMOD_Xlink_BuUrBu_213_, "spec_2_position", "Protein N-term"}, {UNIMOD_Xlink_BuUrBu_213_, "spec_2_site", "N-term"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_site", "T"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_site", "S"}, + {UNIMOD_Xlink_BuUrBu_213_, "spec_3_site", "Y"}, {UNIMOD_Xlink_BuUrBu_214_, "approved", "0"}, {UNIMOD_Xlink_BuUrBu_214_, "delta_composition", "H(14) C(9) N(2) O(4)"}, {UNIMOD_Xlink_BuUrBu_214_, "spec_1_classification", "Chemical derivative"}, @@ -25157,6 +25544,18 @@ {UNIMOD_Xlink_BuUrBu_214_, "spec_2_hidden", "1"}, {UNIMOD_Xlink_BuUrBu_214_, "spec_2_position", "Protein N-term"}, {UNIMOD_Xlink_BuUrBu_214_, "spec_2_site", "N-term"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_site", "T"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_site", "S"}, + {UNIMOD_Xlink_BuUrBu_214_, "spec_3_site", "Y"}, {UNIMOD_Xlink_BuUrBu_317_, "approved", "0"}, {UNIMOD_Xlink_BuUrBu_317_, "delta_composition", "H(23) C(13) N(3) O(6)"}, {UNIMOD_Xlink_BuUrBu_317_, "spec_1_classification", "Chemical derivative"}, @@ -25167,6 +25566,18 @@ {UNIMOD_Xlink_BuUrBu_317_, "spec_2_hidden", "1"}, {UNIMOD_Xlink_BuUrBu_317_, "spec_2_position", "Protein N-term"}, {UNIMOD_Xlink_BuUrBu_317_, "spec_2_site", "N-term"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_site", "T"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_site", "S"}, + {UNIMOD_Xlink_BuUrBu_317_, "spec_3_site", "Y"}, {UNIMOD_Xlink_DSSO_158_, "approved", "0"}, {UNIMOD_Xlink_DSSO_158_, "delta_composition", "H(6) C(6) O(3) S"}, {UNIMOD_Xlink_DSSO_158_, "spec_1_classification", "Chemical derivative"}, @@ -25207,6 +25618,18 @@ {UNIMOD_Xlink_BuUrBu_196_, "spec_2_hidden", "1"}, {UNIMOD_Xlink_BuUrBu_196_, "spec_2_position", "Protein N-term"}, {UNIMOD_Xlink_BuUrBu_196_, "spec_2_site", "N-term"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_hidden", "1"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_position", "Anywhere"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_site", "T"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_site", "S"}, + {UNIMOD_Xlink_BuUrBu_196_, "spec_3_site", "Y"}, {UNIMOD_Xlink_DTBP_172_, "approved", "0"}, {UNIMOD_Xlink_DTBP_172_, "delta_composition", "H(8) C(6) N(2) S(2)"}, {UNIMOD_Xlink_DTBP_172_, "spec_1_classification", "Chemical derivative"}, @@ -26233,6 +26656,10 @@ {UNIMOD_TMTpro, "spec_6_hidden", "1"}, {UNIMOD_TMTpro, "spec_6_position", "Anywhere"}, {UNIMOD_TMTpro, "spec_6_site", "T"}, + {UNIMOD_TMTpro, "spec_7_classification", "Isotopic label"}, + {UNIMOD_TMTpro, "spec_7_hidden", "1"}, + {UNIMOD_TMTpro, "spec_7_position", "Anywhere"}, + {UNIMOD_TMTpro, "spec_7_site", "Y"}, {UNIMOD_TMTpro_zero, "approved", "0"}, {UNIMOD_TMTpro_zero, "delta_composition", "H(25) C(15) N(3) O(3)"}, {UNIMOD_TMTpro_zero, "spec_1_classification", "Chemical derivative"}, @@ -26259,6 +26686,10 @@ {UNIMOD_TMTpro_zero, "spec_6_hidden", "1"}, {UNIMOD_TMTpro_zero, "spec_6_position", "Anywhere"}, {UNIMOD_TMTpro_zero, "spec_6_site", "T"}, + {UNIMOD_TMTpro_zero, "spec_7_classification", "Chemical derivative"}, + {UNIMOD_TMTpro_zero, "spec_7_hidden", "1"}, + {UNIMOD_TMTpro_zero, "spec_7_position", "Anywhere"}, + {UNIMOD_TMTpro_zero, "spec_7_site", "Y"}, {UNIMOD_Ser_Thr_KDO, "approved", "0"}, {UNIMOD_Ser_Thr_KDO, "delta_composition", "H(12) C(8) O(7)"}, {UNIMOD_Ser_Thr_KDO, "spec_1_classification", "O-linked glycosylation"}, @@ -26507,32 +26938,32 @@ {UNIMOD_DBIA, "spec_1_hidden", "1"}, {UNIMOD_DBIA, "spec_1_position", "Anywhere"}, {UNIMOD_DBIA, "spec_1_site", "C"}, - {UNIMOD_Mono_N___propargyl_L_Gln_desthiobiotin, "approved", "0"}, - {UNIMOD_Mono_N___propargyl_L_Gln_desthiobiotin, "delta_composition", "H(44) C(26) N(8) O(8)"}, - {UNIMOD_Mono_N___propargyl_L_Gln_desthiobiotin, "spec_1_classification", "Chemical derivative"}, - {UNIMOD_Mono_N___propargyl_L_Gln_desthiobiotin, "spec_1_hidden", "1"}, - {UNIMOD_Mono_N___propargyl_L_Gln_desthiobiotin, "spec_1_position", "Anywhere"}, - {UNIMOD_Mono_N___propargyl_L_Gln_desthiobiotin, "spec_1_site", "C"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "approved", "0"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "delta_composition", "H(51) C(31) N(9) O(10)"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "spec_1_classification", "Chemical derivative"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "spec_1_hidden", "1"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "spec_1_position", "Anywhere"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "spec_1_site", "D"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "spec_2_classification", "Chemical derivative"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "spec_2_hidden", "1"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "spec_2_position", "Anywhere"}, - {UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin, "spec_2_site", "E"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "approved", "0"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "delta_composition", "H(52) C(31) N(10) O(9)"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "spec_1_classification", "Chemical derivative"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "spec_1_hidden", "1"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "spec_1_position", "Anywhere"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "spec_1_site", "D"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "spec_2_classification", "Chemical derivative"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "spec_2_hidden", "1"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "spec_2_position", "Anywhere"}, - {UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin, "spec_2_site", "E"}, + {UNIMOD_Mono_Ngamma_propargyl_L_Gln_desthiobiotin, "approved", "0"}, + {UNIMOD_Mono_Ngamma_propargyl_L_Gln_desthiobiotin, "delta_composition", "H(44) C(26) N(8) O(8)"}, + {UNIMOD_Mono_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_classification", "Chemical derivative"}, + {UNIMOD_Mono_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_hidden", "1"}, + {UNIMOD_Mono_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_position", "Anywhere"}, + {UNIMOD_Mono_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_site", "C"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "approved", "0"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "delta_composition", "H(51) C(31) N(9) O(10)"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_classification", "Chemical derivative"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_hidden", "1"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_position", "Anywhere"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_site", "D"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_2_classification", "Chemical derivative"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_2_hidden", "1"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_2_position", "Anywhere"}, + {UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_2_site", "E"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "approved", "0"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "delta_composition", "H(52) C(31) N(10) O(9)"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_classification", "Chemical derivative"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_hidden", "1"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_position", "Anywhere"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_1_site", "D"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_2_classification", "Chemical derivative"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_2_hidden", "1"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_2_position", "Anywhere"}, + {UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin, "spec_2_site", "E"}, {UNIMOD_L_Gln, "approved", "0"}, {UNIMOD_L_Gln, "delta_composition", "H(8) C(5) N(2) O(2)"}, {UNIMOD_L_Gln, "spec_1_classification", "Post-translational"}, @@ -26627,6 +27058,220 @@ {UNIMOD_DVFQQQTGG, "spec_1_hidden", "1"}, {UNIMOD_DVFQQQTGG, "spec_1_position", "Anywhere"}, {UNIMOD_DVFQQQTGG, "spec_1_site", "K"}, + {UNIMOD_iST_NHS_specific_cysteine_modification, "approved", "0"}, + {UNIMOD_iST_NHS_specific_cysteine_modification, "delta_composition", "H(11) C(6) N O"}, + {UNIMOD_iST_NHS_specific_cysteine_modification, "spec_1_classification", "Chemical derivative"}, + {UNIMOD_iST_NHS_specific_cysteine_modification, "spec_1_hidden", "1"}, + {UNIMOD_iST_NHS_specific_cysteine_modification, "spec_1_position", "Anywhere"}, + {UNIMOD_iST_NHS_specific_cysteine_modification, "spec_1_site", "C"}, + {UNIMOD_Label_13C_2_15N_1_, "approved", "0"}, + {UNIMOD_Label_13C_2_15N_1_, "delta_composition", "C(-2) 13C(2) N(-1) 15N"}, + {UNIMOD_Label_13C_2_15N_1_, "spec_1_classification", "Isotopic label"}, + {UNIMOD_Label_13C_2_15N_1_, "spec_1_hidden", "1"}, + {UNIMOD_Label_13C_2_15N_1_, "spec_1_position", "Anywhere"}, + {UNIMOD_Label_13C_2_15N_1_, "spec_1_site", "G"}, + {UNIMOD_DPIA, "approved", "0"}, + {UNIMOD_DPIA, "delta_composition", "H(37) C(21) N(5) O(6)"}, + {UNIMOD_DPIA, "spec_1_classification", "Chemical derivative"}, + {UNIMOD_DPIA, "spec_1_hidden", "1"}, + {UNIMOD_DPIA, "spec_1_position", "Anywhere"}, + {UNIMOD_DPIA, "spec_1_site", "C"}, + {UNIMOD_Acetoacetyl, "approved", "0"}, + {UNIMOD_Acetoacetyl, "delta_composition", "H(4) C(4) O(2)"}, + {UNIMOD_Acetoacetyl, "spec_1_classification", "Post-translational"}, + {UNIMOD_Acetoacetyl, "spec_1_hidden", "1"}, + {UNIMOD_Acetoacetyl, "spec_1_position", "Anywhere"}, + {UNIMOD_Acetoacetyl, "spec_1_site", "K"}, + {UNIMOD_Isovaleryl, "approved", "0"}, + {UNIMOD_Isovaleryl, "delta_composition", "H(8) C(5) O"}, + {UNIMOD_Isovaleryl, "spec_1_classification", "Post-translational"}, + {UNIMOD_Isovaleryl, "spec_1_hidden", "1"}, + {UNIMOD_Isovaleryl, "spec_1_position", "Anywhere"}, + {UNIMOD_Isovaleryl, "spec_1_site", "K"}, + {UNIMOD_2_methylbutyryl, "approved", "0"}, + {UNIMOD_2_methylbutyryl, "delta_composition", "H(8) C(5) O"}, + {UNIMOD_2_methylbutyryl, "spec_1_classification", "Post-translational"}, + {UNIMOD_2_methylbutyryl, "spec_1_hidden", "1"}, + {UNIMOD_2_methylbutyryl, "spec_1_position", "Anywhere"}, + {UNIMOD_2_methylbutyryl, "spec_1_site", "K"}, + {UNIMOD_Tiglyl, "approved", "0"}, + {UNIMOD_Tiglyl, "delta_composition", "H(6) C(5) O"}, + {UNIMOD_Tiglyl, "spec_1_classification", "Post-translational"}, + {UNIMOD_Tiglyl, "spec_1_hidden", "1"}, + {UNIMOD_Tiglyl, "spec_1_position", "Anywhere"}, + {UNIMOD_Tiglyl, "spec_1_site", "K"}, + {UNIMOD_3_methylglutaryl, "approved", "0"}, + {UNIMOD_3_methylglutaryl, "delta_composition", "H(8) C(6) O(3)"}, + {UNIMOD_3_methylglutaryl, "spec_1_classification", "Post-translational"}, + {UNIMOD_3_methylglutaryl, "spec_1_hidden", "1"}, + {UNIMOD_3_methylglutaryl, "spec_1_position", "Anywhere"}, + {UNIMOD_3_methylglutaryl, "spec_1_site", "K"}, + {UNIMOD_3_methylglutaconyl, "approved", "0"}, + {UNIMOD_3_methylglutaconyl, "delta_composition", "H(6) C(6) O(3)"}, + {UNIMOD_3_methylglutaconyl, "spec_1_classification", "Post-translational"}, + {UNIMOD_3_methylglutaconyl, "spec_1_hidden", "1"}, + {UNIMOD_3_methylglutaconyl, "spec_1_position", "Anywhere"}, + {UNIMOD_3_methylglutaconyl, "spec_1_site", "K"}, + {UNIMOD_3_hydroxy_3_methylglutaryl, "approved", "0"}, + {UNIMOD_3_hydroxy_3_methylglutaryl, "delta_composition", "H(8) C(6) O(4)"}, + {UNIMOD_3_hydroxy_3_methylglutaryl, "spec_1_classification", "Post-translational"}, + {UNIMOD_3_hydroxy_3_methylglutaryl, "spec_1_hidden", "1"}, + {UNIMOD_3_hydroxy_3_methylglutaryl, "spec_1_position", "Anywhere"}, + {UNIMOD_3_hydroxy_3_methylglutaryl, "spec_1_site", "K"}, + {UNIMOD_Lactylation, "approved", "0"}, + {UNIMOD_Lactylation, "delta_composition", "H(4) C(3) O(2)"}, + {UNIMOD_Lactylation, "spec_1_classification", "Post-translational"}, + {UNIMOD_Lactylation, "spec_1_hidden", "1"}, + {UNIMOD_Lactylation, "spec_1_position", "Anywhere"}, + {UNIMOD_Lactylation, "spec_1_site", "K"}, + {UNIMOD_Pyruvoyl, "approved", "0"}, + {UNIMOD_Pyruvoyl, "delta_composition", "H(2) C(3) O(2)"}, + {UNIMOD_Pyruvoyl, "spec_1_classification", "Post-translational"}, + {UNIMOD_Pyruvoyl, "spec_1_hidden", "1"}, + {UNIMOD_Pyruvoyl, "spec_1_position", "Anywhere"}, + {UNIMOD_Pyruvoyl, "spec_1_site", "K"}, + {UNIMOD_Glyoxylyl, "approved", "0"}, + {UNIMOD_Glyoxylyl, "delta_composition", "C(2) O(2)"}, + {UNIMOD_Glyoxylyl, "spec_1_classification", "Post-translational"}, + {UNIMOD_Glyoxylyl, "spec_1_hidden", "1"}, + {UNIMOD_Glyoxylyl, "spec_1_position", "Anywhere"}, + {UNIMOD_Glyoxylyl, "spec_1_site", "K"}, + {UNIMOD_Itaconatyl, "approved", "0"}, + {UNIMOD_Itaconatyl, "delta_composition", "H(6) C(5) O(4)"}, + {UNIMOD_Itaconatyl, "spec_1_classification", "Post-translational"}, + {UNIMOD_Itaconatyl, "spec_1_hidden", "1"}, + {UNIMOD_Itaconatyl, "spec_1_position", "Anywhere"}, + {UNIMOD_Itaconatyl, "spec_1_site", "C"}, + {UNIMOD_Itaconyl, "approved", "0"}, + {UNIMOD_Itaconyl, "delta_composition", "H(4) C(5) O(3)"}, + {UNIMOD_Itaconyl, "spec_1_classification", "Post-translational"}, + {UNIMOD_Itaconyl, "spec_1_hidden", "1"}, + {UNIMOD_Itaconyl, "spec_1_position", "Anywhere"}, + {UNIMOD_Itaconyl, "spec_1_site", "K"}, + {UNIMOD_ValGly, "approved", "0"}, + {UNIMOD_ValGly, "delta_composition", "H(12) C(7) N(2) O(2)"}, + {UNIMOD_ValGly, "spec_1_classification", "Post-translational"}, + {UNIMOD_ValGly, "spec_1_hidden", "1"}, + {UNIMOD_ValGly, "spec_1_position", "Anywhere"}, + {UNIMOD_ValGly, "spec_1_site", "K"}, + {UNIMOD_Pentanoyl, "approved", "0"}, + {UNIMOD_Pentanoyl, "delta_composition", "H(8) C(5) O"}, + {UNIMOD_Pentanoyl, "spec_1_classification", "Post-translational"}, + {UNIMOD_Pentanoyl, "spec_1_hidden", "1"}, + {UNIMOD_Pentanoyl, "spec_1_position", "Anywhere"}, + {UNIMOD_Pentanoyl, "spec_1_site", "K"}, + {UNIMOD_Hexanoyl, "approved", "0"}, + {UNIMOD_Hexanoyl, "delta_composition", "H(10) C(6) O"}, + {UNIMOD_Hexanoyl, "spec_1_classification", "Post-translational"}, + {UNIMOD_Hexanoyl, "spec_1_hidden", "1"}, + {UNIMOD_Hexanoyl, "spec_1_position", "Anywhere"}, + {UNIMOD_Hexanoyl, "spec_1_site", "K"}, + {UNIMOD_Label_13C_6_15N_2__TMT6plex, "approved", "0"}, + {UNIMOD_Label_13C_6_15N_2__TMT6plex, "delta_composition", "H(20) C(2) 13C(10) N(-1) 15N(3) O(2)"}, + {UNIMOD_Label_13C_6_15N_2__TMT6plex, "spec_1_classification", "Multiple"}, + {UNIMOD_Label_13C_6_15N_2__TMT6plex, "spec_1_hidden", "1"}, + {UNIMOD_Label_13C_6_15N_2__TMT6plex, "spec_1_position", "Anywhere"}, + {UNIMOD_Label_13C_6_15N_2__TMT6plex, "spec_1_site", "K"}, + {UNIMOD_Label_13C_6_15N_2__TMTpro, "approved", "0"}, + {UNIMOD_Label_13C_6_15N_2__TMTpro, "delta_composition", "H(25) C(2) 13C(13) N(-1) 15N(4) O(3)"}, + {UNIMOD_Label_13C_6_15N_2__TMTpro, "spec_1_classification", "Multiple"}, + {UNIMOD_Label_13C_6_15N_2__TMTpro, "spec_1_hidden", "1"}, + {UNIMOD_Label_13C_6_15N_2__TMTpro, "spec_1_position", "Anywhere"}, + {UNIMOD_Label_13C_6_15N_2__TMTpro, "spec_1_site", "K"}, + {UNIMOD_2PCA_triazole_ethanethiol, "approved", "0"}, + {UNIMOD_2PCA_triazole_ethanethiol, "delta_composition", "H(8) C(10) N(4) S"}, + {UNIMOD_2PCA_triazole_ethanethiol, "spec_1_classification", "Other"}, + {UNIMOD_2PCA_triazole_ethanethiol, "spec_1_hidden", "1"}, + {UNIMOD_2PCA_triazole_ethanethiol, "spec_1_position", "Any N-term"}, + {UNIMOD_2PCA_triazole_ethanethiol, "spec_1_site", "N-term"}, + {UNIMOD_Desthiobiotin_Phenol, "approved", "0"}, + {UNIMOD_Desthiobiotin_Phenol, "delta_composition", "H(25) C(18) N(3) O(3)"}, + {UNIMOD_Desthiobiotin_Phenol, "spec_1_classification", "Chemical derivative"}, + {UNIMOD_Desthiobiotin_Phenol, "spec_1_hidden", "1"}, + {UNIMOD_Desthiobiotin_Phenol, "spec_1_position", "Anywhere"}, + {UNIMOD_Desthiobiotin_Phenol, "spec_1_site", "Y"}, + {UNIMOD_Cys_vinyl_sulfone_amine_probe_addition, "approved", "0"}, + {UNIMOD_Cys_vinyl_sulfone_amine_probe_addition, "delta_composition", "H(38) C(20) N(4) O(7) S"}, + {UNIMOD_Cys_vinyl_sulfone_amine_probe_addition, "spec_1_classification", "Chemical derivative"}, + {UNIMOD_Cys_vinyl_sulfone_amine_probe_addition, "spec_1_hidden", "1"}, + {UNIMOD_Cys_vinyl_sulfone_amine_probe_addition, "spec_1_position", "Anywhere"}, + {UNIMOD_Cys_vinyl_sulfone_amine_probe_addition, "spec_1_site", "C"}, + {UNIMOD_Cys__fGly_diol, "approved", "0"}, + {UNIMOD_Cys__fGly_diol, "delta_composition", "O(2) S(-1)"}, + {UNIMOD_Cys__fGly_diol, "spec_1_classification", "Post-translational"}, + {UNIMOD_Cys__fGly_diol, "spec_1_hidden", "1"}, + {UNIMOD_Cys__fGly_diol, "spec_1_position", "Anywhere"}, + {UNIMOD_Cys__fGly_diol, "spec_1_site", "C"}, + {UNIMOD_Cys__sulfo_fGly_dio, "approved", "0"}, + {UNIMOD_Cys__sulfo_fGly_dio, "delta_composition", "H(-1) O(5)"}, + {UNIMOD_Cys__sulfo_fGly_dio, "spec_1_classification", "Post-translational"}, + {UNIMOD_Cys__sulfo_fGly_dio, "spec_1_hidden", "1"}, + {UNIMOD_Cys__sulfo_fGly_dio, "spec_1_position", "Anywhere"}, + {UNIMOD_Cys__sulfo_fGly_dio, "spec_1_site", "C"}, + {UNIMOD_Cys__Ser_O_sulfate, "approved", "0"}, + {UNIMOD_Cys__Ser_O_sulfate, "delta_composition", "O(4)"}, + {UNIMOD_Cys__Ser_O_sulfate, "spec_1_classification", "Post-translational"}, + {UNIMOD_Cys__Ser_O_sulfate, "spec_1_hidden", "1"}, + {UNIMOD_Cys__Ser_O_sulfate, "spec_1_position", "Anywhere"}, + {UNIMOD_Cys__Ser_O_sulfate, "spec_1_site", "C"}, + {UNIMOD_b_type_ion, "approved", "0"}, + {UNIMOD_b_type_ion, "delta_composition", "H(-2) O(-1)"}, + {UNIMOD_b_type_ion, "spec_1_classification", "Other"}, + {UNIMOD_b_type_ion, "spec_1_hidden", "1"}, + {UNIMOD_b_type_ion, "spec_1_position", "Any C-term"}, + {UNIMOD_b_type_ion, "spec_1_site", "C-term"}, + {UNIMOD_PnTAG, "approved", "0"}, + {UNIMOD_PnTAG, "delta_composition", "H(11) C(6) O(4) P"}, + {UNIMOD_PnTAG, "spec_1_classification", "Chemical derivative"}, + {UNIMOD_PnTAG, "spec_1_hidden", "1"}, + {UNIMOD_PnTAG, "spec_1_position", "Anywhere"}, + {UNIMOD_PnTAG, "spec_1_site", "K"}, + {UNIMOD_PnTAG, "spec_2_classification", "Chemical derivative"}, + {UNIMOD_PnTAG, "spec_2_hidden", "1"}, + {UNIMOD_PnTAG, "spec_2_position", "Any N-term"}, + {UNIMOD_PnTAG, "spec_2_site", "N-term"}, + {UNIMOD_PnTAG, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_PnTAG, "spec_3_hidden", "1"}, + {UNIMOD_PnTAG, "spec_3_position", "Protein N-term"}, + {UNIMOD_PnTAG, "spec_3_site", "N-term"}, + {UNIMOD_PnTAG, "spec_4_classification", "Chemical derivative"}, + {UNIMOD_PnTAG, "spec_4_hidden", "1"}, + {UNIMOD_PnTAG, "spec_4_position", "Anywhere"}, + {UNIMOD_PnTAG, "spec_4_site", "S"}, + {UNIMOD_PnTAG, "spec_5_classification", "Chemical derivative"}, + {UNIMOD_PnTAG, "spec_5_hidden", "1"}, + {UNIMOD_PnTAG, "spec_5_position", "Anywhere"}, + {UNIMOD_PnTAG, "spec_5_site", "T"}, + {UNIMOD_PnTAG, "spec_6_classification", "Chemical derivative"}, + {UNIMOD_PnTAG, "spec_6_hidden", "1"}, + {UNIMOD_PnTAG, "spec_6_position", "Anywhere"}, + {UNIMOD_PnTAG, "spec_6_site", "Y"}, + {UNIMOD_DMA_PEG3, "approved", "0"}, + {UNIMOD_DMA_PEG3, "delta_composition", "H(21) C(11) N O(4)"}, + {UNIMOD_DMA_PEG3, "spec_1_classification", "Chemical derivative"}, + {UNIMOD_DMA_PEG3, "spec_1_hidden", "1"}, + {UNIMOD_DMA_PEG3, "spec_1_position", "Anywhere"}, + {UNIMOD_DMA_PEG3, "spec_1_site", "K"}, + {UNIMOD_DMA_PEG3, "spec_2_classification", "Chemical derivative"}, + {UNIMOD_DMA_PEG3, "spec_2_hidden", "1"}, + {UNIMOD_DMA_PEG3, "spec_2_position", "Any N-term"}, + {UNIMOD_DMA_PEG3, "spec_2_site", "N-term"}, + {UNIMOD_DMA_PEG3, "spec_3_classification", "Chemical derivative"}, + {UNIMOD_DMA_PEG3, "spec_3_hidden", "1"}, + {UNIMOD_DMA_PEG3, "spec_3_position", "Protein N-term"}, + {UNIMOD_DMA_PEG3, "spec_3_site", "N-term"}, + {UNIMOD_DMA_PEG3, "spec_4_classification", "Chemical derivative"}, + {UNIMOD_DMA_PEG3, "spec_4_hidden", "1"}, + {UNIMOD_DMA_PEG3, "spec_4_position", "Anywhere"}, + {UNIMOD_DMA_PEG3, "spec_4_site", "S"}, + {UNIMOD_DMA_PEG3, "spec_5_classification", "Chemical derivative"}, + {UNIMOD_DMA_PEG3, "spec_5_hidden", "1"}, + {UNIMOD_DMA_PEG3, "spec_5_position", "Anywhere"}, + {UNIMOD_DMA_PEG3, "spec_5_site", "T"}, + {UNIMOD_DMA_PEG3, "spec_6_classification", "Chemical derivative"}, + {UNIMOD_DMA_PEG3, "spec_6_hidden", "1"}, + {UNIMOD_DMA_PEG3, "spec_6_position", "Anywhere"}, + {UNIMOD_DMA_PEG3, "spec_6_site", "Y"}, }; // propertyValue_ @@ -26678,16 +27323,16 @@ cvMap_["PEFF"].URI = cvMap_["MS"].URI; cvMap_["MS"].id = "MS"; - cvMap_["MS"].version = "4.1.136"; + cvMap_["MS"].version = "4.1.197"; cvMap_["NCIT"].id = "NCIT"; - cvMap_["NCIT"].version = "4.1.136"; + cvMap_["NCIT"].version = "4.1.197"; cvMap_["PEFF"].id = "PEFF"; - cvMap_["PEFF"].version = "4.1.136"; + cvMap_["PEFF"].version = "4.1.197"; cvMap_["UNIMOD"].id = "UNIMOD"; - cvMap_["UNIMOD"].version = "2023-10-05"; + cvMap_["UNIMOD"].version = "2025-06-17"; cvMap_["UO"].id = "UO"; cvMap_["UO"].version = "09:04:2014"; diff -Nru libpwizlite-3.0.8/src/pwiz/data/common/cv.hpp libpwizlite-3.0.15/src/pwiz/data/common/cv.hpp --- libpwizlite-3.0.8/src/pwiz/data/common/cv.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/common/cv.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -41,12 +41,9 @@ // [psi-ms.obo] #define _PSI_MS_OBO_ // format-version: 1.2 -// data-version: 4.1.136 -// date: 10:11:2023 11:30 -// saved-by: Chris Bielow -// auto-generated-by: OBO-Edit 2.3.1 -// import: http://purl.obolibrary.org/obo/pato.obo -// import: http://purl.obolibrary.org/obo/stato.owl +// data-version: 4.1.197 +// date: 17:07:2025 21:31 +// saved-by: David Cox // default-namespace: MS // namespace-id-rule: * MS:$sequence(7,0,9999999)$ // namespace-id-rule: * PEFF:$sequence(7,0,9999999)$ @@ -64,10 +61,12 @@ // remark: creator: Gerhard Mayer rub.de> // remark: creator: Joshua Klein bu.edu> // remark: creator: Chris Bielow fu-berlin.de> -// remark: creator: Wout Bittremieux health.ucsd.edu> +// remark: creator: Wout Bittremieux uantwerpen.be> // remark: creator: Nils Hoffmann < nils.hoffmann <-at-> cebitec.uni-bielefeld.de> // remark: creator: Julian Uszkoreit ruhr-uni-bochum.de> // remark: creator: Mathias Walzer ebi.ac.uk> +// remark: creator: Nithu Sara John ebi.ac.uk> +// remark: creator: David Cox sciex.com> // remark: publisher: HUPO Proteomics Standards Initiative Mass Spectrometry Standards Working Group and HUPO Proteomics Standards Initiative Proteomics Informatics Working Group // remark: When appropriate the definition and synonyms of a term are reported exactly as in the chapter 12 of IUPAC orange book. See http://www.iupac.org/projects/2003/2003-056-2-500.html and http://mass-spec.lsu.edu/msterms/index.php/Main_Page // remark: For any queries contact psidev-ms-vocab@lists.sourceforge.net @@ -79,7 +78,7 @@ // [unimod.obo] #define _UNIMOD_OBO_ // format-version: 1.4 -// date: 05:10:2023 14:38 +// date: 17:06:2025 11:31 // // [unit.obo] #define _UNIT_OBO_ @@ -307,6 +306,9 @@ /// Duration: The period of time during which something continues. NCIT_Duration = 100325330, + /// Number: A numeral or string of numerals expressing value, quantity, or identification. + NCIT_Number = 100325337, + /// Action: A thing done. NCIT_Action = 100325404, @@ -769,7 +771,7 @@ /// transient recorder: A detector acquisition mode used for detecting transient signals. MS_transient_recorder = 1000120, - /// SCIEX instrument model: The brand of instruments from the joint venture between Applied Biosystems and MDS Analytical Technologies (formerly MDS SCIEX). Previously branded as \"Applied Biosystems|MDS SCIEX\". + /// SCIEX instrument model: SCIEX instrument model. MS_SCIEX_instrument_model = 1000121, /// Bruker Daltonics instrument model: Bruker Daltonics' instrument model. @@ -1822,6 +1824,9 @@ /// laser desorption ionization: The formation of gas-phase ions by the interaction of a pulsed laser with a solid or liquid material. MS_laser_desorption_ionization = 1000393, + /// no sequence database: No reference sequence database was used in the search process to determine the identified peptide sequence, for example as with de novo sequencing. + MS_no_sequence_database = 1000394, + /// liquid secondary ionization: The ionization of any species by the interaction of a focused beam of ions with a sample that is dissolved in a solvent matrix. See also fast atom bombardment and secondary ionization. MS_liquid_secondary_ionization = 1000395, @@ -2173,10 +2178,10 @@ /// spectrum attribute: Nonphysical characteristic attributed to a spectrum. MS_spectrum_attribute = 1000499, - /// scan window upper limit: The lower m/z bound of a mass spectrometer scan window. + /// scan window upper limit: The upper m/z bound of a mass spectrometer scan window. MS_scan_window_upper_limit = 1000500, - /// scan window lower limit: The upper m/z bound of a mass spectrometer scan window. + /// scan window lower limit: The lower m/z bound of a mass spectrometer scan window. MS_scan_window_lower_limit = 1000501, /// dwell time: The time spent gathering data across a peak. @@ -2719,6 +2724,9 @@ /// 4000 Series Explorer Software: SCIEX or Applied Biosystems software for data acquisition and analysis. MS_4000_Series_Explorer_Software = 1000659, + /// Xevo MRT MS: Waters Corporation Xevo MRT Mass Spectrometer. + MS_Xevo_MRT_MS = 1000660, + /// GPS Explorer: SCIEX or Applied Biosystems software for data acquisition and analysis. MS_GPS_Explorer = 1000661, @@ -3256,6 +3264,9 @@ /// isolation window upper offset: The extent of the isolation window in m/z above the isolation window target m/z. The lower and upper offsets may be asymmetric about the target m/z. MS_isolation_window_upper_offset = 1000829, + /// precision: Precision is the degree of how close repeated measurements are to each other. This can, for example, be expressed using the standard deviation. + MS_precision = 1000830, + /// sample preparation: Properties of the preparation steps which took place before the measurement was performed. MS_sample_preparation = 1000831, @@ -3373,8 +3384,8 @@ /// structural formula: A chemical formula showing the number of atoms of each element in a molecule, their spatial arrangement, and their linkage to each other. MS_structural_formula = 1000867, - /// SMILES formula: The simplified molecular input line entry specification or SMILES is a specification for unambiguously describing the structure of a chemical compound using a short ASCII string. - MS_SMILES_formula = 1000868, + /// SMILES string: The simplified molecular input line entry specification or SMILES is a specification for unambiguously describing the structure of a chemical compound using a short ASCII string. + MS_SMILES_string = 1000868, /// collision gas pressure: The gas pressure of the collision gas used for collisional excitation. MS_collision_gas_pressure = 1000869, @@ -3886,8 +3897,11 @@ /// single protein identification statistic: Results specific for one protein as part of a protein ambiguity group (a result not valid for all the other proteins in the protein ambiguity group). MS_single_protein_identification_statistic = 1001116, - /// theoretical mass: The theoretical neutral mass of the molecule (e.g. the peptide sequence and its modifications) not including its charge carrier. - MS_theoretical_mass = 1001117, + /// theoretical neutral mass: The theoretical neutral mass of the molecule (e.g. the peptide sequence and its modifications) not including its charge carrier. + MS_theoretical_neutral_mass = 1001117, + + /// theoretical mass (theoretical neutral mass): The theoretical neutral mass of the molecule (e.g. the peptide sequence and its modifications) not including its charge carrier. + MS_theoretical_mass = MS_theoretical_neutral_mass, /// param: b ion: Parameter information, type of product: b ion with charge on the N-terminal side. MS_param__b_ion = 1001118, @@ -4078,6 +4092,12 @@ /// search statistics: The details of the actual run of the search. MS_search_statistics = 1001184, + /// Mobilion MBI format: Mobilion MBI file format. + MS_Mobilion_MBI_format = 1001185, + + /// Mobilion MBI nativeID format: Native format defined by frame=xsd:nonNegativeInteger scan=xsd:nonNegativeInteger. + MS_Mobilion_MBI_nativeID_format = 1001186, + /// modification specificity peptide N-term: As parameter for search engine: apply the modification only at the N-terminus of a peptide. MS_modification_specificity_peptide_N_term = 1001189, @@ -7558,8 +7578,11 @@ /// second-pass peptide identification: A putative identified peptide found in a second-pass search of protein sequences selected from a first-pass search. MS_second_pass_peptide_identification = 1002341, - /// MZmine: A framework for differential analysis of mass spectrometry data. - MS_MZmine = 1002342, + /// mzmine: A framework for differential analysis of mass spectrometry data. + MS_mzmine = 1002342, + + /// MZmine (mzmine): A framework for differential analysis of mass spectrometry data. + MS_MZmine = MS_mzmine, /// ion stability type: Stability type of the ion. MS_ion_stability_type_OBSOLETE = 1002343, @@ -8713,6 +8736,15 @@ /// FLASHDeconv: Ultrafast, High-Quality Feature Deconvolution for Top-Down Proteomics. MS_FLASHDeconv = 1002714, + /// temperature chromatogram: Representation of temperature versus time. + MS_temperature_chromatogram = 1002715, + + /// measured element: The component or dimension of an object being measured, for example the temperature of an instrument component over time. + MS_measured_element = 1002716, + + /// Waters DATA Convert: Software for processing and exporting Waters MassLynx and waters_connect data. + MS_Waters_DATA_Convert = 1002717, + /// Pegasus BT: LECO bench-top GC time-of-flight mass spectrometer. MS_Pegasus_BT = 1002719, @@ -9535,6 +9567,12 @@ /// python-psims: python-psims, a library for generating mzML and mzIdentML. MS_python_psims = 1002991, + /// Orbitrap Exploris GC-MS: Thermo Scientific Orbitrap Exploris GC-MS. + MS_Orbitrap_Exploris_GC_MS = 1002992, + + /// Q Exactive Focus: Q Exactive Focus Hybrid Quadrupole-Orbitrap Mass Spectrometer. + MS_Q_Exactive_Focus = 1002993, + /// Andromeda:PEP: Posterior error probability of the best identified peptide of the Andromeda search engine. MS_Andromeda_PEP = 1002995, @@ -10594,7 +10632,7 @@ /// identification based on multiple spectra: Provides an identifier to encode identifications based on multiple spectra. MS_identification_based_on_multiple_spectra = 1003332, - /// regular expression for encoding identifications based on multiple spectra.: ^(?[0-9]+)(?::(?P|C))$ + /// regular expression for encoding identifications based on multiple spectra.: ^(?[0-9]+)(?::(?P|C))?$ MS_regular_expression_for_encoding_identifications_based_on_multiple_spectra_ = 1003333, /// parent term for PSM-level scores for identifications based on multiple spectra: Parent term for PSM-level scores for identifications based on multiple spectra. @@ -10813,6 +10851,150 @@ /// pymzqc: A Python package for reading, validating, and writing mzQC files. MS_pymzqc = 1003402, + /// InChI: IUPAC International Chemical Identifier. + MS_InChI = 1003403, + + /// timsTOF HT: Bruker Daltonics' timsTOF HT. + MS_timsTOF_HT = 1003404, + + /// mzRecal: MS1 recalibration using identified peptides as internal calibrants. + MS_mzRecal = 1003405, + + /// spectrum clustering software: Software designed to group multiple mass spectra by high similarity, generally with the goal of grouping replicate spectra derived from the same analyte. + MS_spectrum_clustering_software = 1003406, + + /// Scout: Identifying crosslinked peptides in complex protein mixtures + MS_Scout = 1003407, + + /// Scout score: Scout identification search engine score + MS_Scout_score = 1003408, + + /// Stellar: Thermo Scientific Stellar mass spectrometer contains a quadrupole mass filter, a collision cell, and a quadrupole linear ion trap mass analyzer. + MS_Stellar = 1003409, + + /// electron beam energy: The kinetic energy of the electron beam used in dissociation methods induced by a free electron beam, such as electron-capture dissociation (ECD), electron-detachment dissociation (EDD), and electron-activated dissociation (EAD). + MS_electron_beam_energy = 1003410, + + /// Orbitrap IQ-X: Thermo Scientific Orbitrap IQ-X mass spectrometer with Tribrid architecture consisting of quadrupole mass filter, linear ion trap and Orbitrap mass analyzers. + MS_Orbitrap_IQ_X = 1003411, + + /// timsTOF Ultra 2: Bruker Daltonics timsTOF Ultra 2. + MS_timsTOF_Ultra_2 = 1003412, + + /// Kojak: Kojak open-source crosslinked peptide sequence search engine developed at the Institute for Systems Biology. + MS_Kojak = 1003413, + + /// Kojak:score: The Kojak score for an individual peptide sequence, similar to Comet:xcorr. + MS_Kojak_score = 1003414, + + /// Kojak:expectation value: The Kojak expectation value for an individual peptide sequence. + MS_Kojak_expectation_value = 1003415, + + /// Kojak:matched ions: The number of matched ions for an individual peptide sequence in a Kojak result. + MS_Kojak_matched_ions = 1003416, + + /// Kojak:consecutive matched ions: The highest run of consecutive matched ions for an individual peptide sequence in a Kojak result. + MS_Kojak_consecutive_matched_ions = 1003417, + + /// Kojak:delta score: The difference between the top Kojak score and the next best Kojak score for a PSM. + MS_Kojak_delta_score = 1003418, + + /// Kojak:rank: The rank of an individual peptide from the first pass of the Kojak scoring algorithm. Applies only to sequences in a crosslinked result. + MS_Kojak_rank = 1003419, + + /// Kojak:score xlink: The Kojak score for a crosslinked pair of peptide sequences, similar to Comet:xcorr. + MS_Kojak_score_xlink = 1003420, + + /// Kojak:expectation value xlink: The Kojak expectation value for a crosslinked pair of peptide sequences. + MS_Kojak_expectation_value_xlink = 1003421, + + /// Kojak:matched ions xlink: The number of matched ions for a crosslinked pair of peptide sequences in a Kojak result. + MS_Kojak_matched_ions_xlink = 1003422, + + /// Orbitrap Exploris GC 240: Orbitrap Exploris GC 240 Mass Spectrometer. + MS_Orbitrap_Exploris_GC_240 = 1003423, + + /// selected fragment theoretical m/z observed intensity spectrum: Spectrum for which the peaks are limited to a subset of known product ions that are important for subsequent identification, whose m/z values are corrected to theoretical values, and intensity values are experimentally derived. + MS_selected_fragment_theoretical_m_z_observed_intensity_spectrum = 1003424, + + /// quantms: Cloud-based pipeline for quantitative proteomics that enables the reanalysis of public proteomics data. + MS_quantms = 1003425, + + /// xQuest/xProphet: A software to identify cross-linked peptides from LC-MS/MS spectra. + MS_xQuest_xProphet = 1003426, + + /// PeakView: A software for spectral analysis and data interrogation in qualitative review of LC-MS and MS/MS data. + MS_PeakView = 1003427, + + /// Perseus: A software for interpreting protein quantification, interaction and post-translational modification data. + MS_Perseus = 1003428, + + /// FragPipe: A computational platform for analyzing mass spectrometry-based proteomics data. + MS_FragPipe = 1003429, + + /// OpenMS: A software for LC-MS data management and analysis. + MS_OpenMS = 1003430, + + /// pLink: A tool for the analysis of chemically cross-linked proteins using mass spectrometry. + MS_pLink = 1003431, + + /// pLink2: Upgraded version of pLink tool, provides a graphical user interface and faster with newly designed index structure. + MS_pLink2 = 1003432, + + /// Andromeda:delta score: Score difference to the second best identified peptide with a different amino acid sequence. + MS_Andromeda_delta_score = 1003433, + + /// AlphaLP: A serine protease that hydrolyzes peptide bonds at the C-terminus of threonine, alanine, serine, and valine. (EC:3.4.21.12) + MS_AlphaLP = 1003434, + + /// alpha-lytic endopeptidase (AlphaLP): A serine protease that hydrolyzes peptide bonds at the C-terminus of threonine, alanine, serine, and valine. (EC:3.4.21.12) + MS_alpha_lytic_endopeptidase = MS_AlphaLP, + + /// alpha-lytic protease (AlphaLP): A serine protease that hydrolyzes peptide bonds at the C-terminus of threonine, alanine, serine, and valine. (EC:3.4.21.12) + MS_alpha_lytic_protease = MS_AlphaLP, + + /// (?<=[TSAV]): Regular expression for alphaLP. + MS______TSAV__ = 1003435, + + /// lowest observed ion mobility: Lowest ion mobility value observed in the ion mobility measurement array. + MS_lowest_observed_ion_mobility = 1003437, + + /// highest observed ion mobility: Highest ion mobility value observed in the ion mobility measurement array. + MS_highest_observed_ion_mobility = 1003438, + + /// ion mobility frame representation: Representation of one or more spectra acquired across an ion mobility dimension. + MS_ion_mobility_frame_representation = 1003439, + + /// ion mobility profile frame: An ion mobility frame where the ion mobility dimension is continuous. + MS_ion_mobility_profile_frame = 1003440, + + /// ion mobility centroid frame: An ion mobility frame where the ion mobility dimension is processed into discrete peaks of zero width. + MS_ion_mobility_centroid_frame = 1003441, + + /// Orbitrap Astral Zoom: Thermo Scientific Orbitrap Astral Zoom mass spectrometer contains three mass analyzers: a quadrupole analyzer, an Orbitrap analyzer, and an Astral analyzer. + MS_Orbitrap_Astral_Zoom = 1003442, + + /// ZenoTOF 8600: SCIEX ZenoTOF 8600 system. + MS_ZenoTOF_8600 = 1003443, + + /// ZenoTOF 7600+: SCIEX ZenoTOF 7600+ system. + MS_ZenoTOF_7600_ = 1003444, + + /// SCIEX 7500+: SCIEX 7500+ system. + MS_SCIEX_7500_ = 1003445, + + /// SCIEX OS: SCIEX OS software. + MS_SCIEX_OS = 1003446, + + /// SCIEX MS Data Converter: A software for converting SCIEX wiff or wiff2 format to mzML. + MS_SCIEX_MS_Data_Converter = 1003447, + + /// SCIEX WIFF2 format: SCIEX WIFF2 file format. + MS_SCIEX_WIFF2_format = 1003448, + + /// Number of Occurrences: The number of times something happened. + NCIT_Number_of_Occurrences = 103150827, + /// PSI-MS CV Quality Control Vocabulary: PSI Quality Control controlled vocabulary term. MS_PSI_MS_CV_Quality_Control_Vocabulary = 4000000, @@ -10885,6 +11067,30 @@ /// environment metric: QC metric related to measurements of the ambient environment, such as the laboratory. MS_environment_metric = 4000024, + /// precursor ion current chromatogram: Representation of the ion current assigned to detected precursors in the series of all MS1 spectra versus time. + MS_precursor_ion_current_chromatogram = 4000025, + + /// precursor ion chromatogram (precursor ion current chromatogram): Representation of the ion current assigned to detected precursors in the series of all MS1 spectra versus time. + MS_precursor_ion_chromatogram = MS_precursor_ion_current_chromatogram, + + /// fragment ppm deviation median: The median of the distribution of observed fragment mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied. + MS_fragment_ppm_deviation_median = 4000026, + + /// fragment ppm deviation mean: The mean of the distribution of observed fragment mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied + MS_fragment_ppm_deviation_mean = 4000027, + + /// fragment ppm deviation sigma: The standard deviation of the distribution of observed fragment mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied + MS_fragment_ppm_deviation_sigma = 4000028, + + /// area under TIC in MS1: The area under the total ion current chromatogram (MS:1000235) of all MS1 spectra. + MS_area_under_TIC_in_MS1 = 4000029, + + /// area under TIC in MS2: The area under the total ion current chromatogram (MS:1000235) of all MS2 spectra. + MS_area_under_TIC_in_MS2 = 4000030, + + /// peak area of MS1 vs MS2 signal ratio: The ratio of the area under TIC of MS1 (MS:4000029) divided by the area under the TIC of MS2 (MS:4000030). + MS_peak_area_of_MS1_vs_MS2_signal_ratio = 4000031, + /// XIC50 fraction: The number of XIC that account for the top half of all XIC-FWHM divided by the number of all XIC. MS_XIC50_fraction = 4000050, @@ -10894,26 +11100,26 @@ /// XIC-FWHM quantiles: The first to n-th quantile of peak widths for XICs. A metric's value triplet represents the related QuaMeter metrics of XIC-FWHM-Q1,Q2,Q3. MS_XIC_FWHM_quantiles = 4000051, - /// XIC-Height quartile ratios: The log ratio of successive XIC height quartiles. The metric's value triplet represents the log ratios of XIC-height-Q2 to XIC-height-Q1, XIC-height-Q3 to XIC-height-Q2, XIC-height max to XIC-height-Q3. - MS_XIC_Height_quartile_ratios = 4000052, + /// obsolete XIC-Height quartile ratios: OBSOLETE. The log ratio of successive XIC height quartiles. The metric's value triplet represents the log ratios of XIC-height-Q2 to XIC-height-Q1, XIC-height-Q3 to XIC-height-Q2, XIC-height max to XIC-height-Q3. + MS_obsolete_XIC_Height_quartile_ratios_OBSOLETE = 4000052, /// chromatography duration: The retention time duration of the chromatography in seconds. MS_chromatography_duration = 4000053, - /// TIC quarters RT fraction: The interval when the respective quarter of the TIC accumulates divided by retention time duration. - MS_TIC_quarters_RT_fraction = 4000054, + /// obsolete TIC quarters RT fraction: OBSOLETE. The interval when the respective quarter of the TIC accumulates divided by retention time duration. + MS_obsolete_TIC_quarters_RT_fraction_OBSOLETE = 4000054, - /// MS1 quarter RT fraction: The interval used for acquisition of the first, second, third, and fourth quarter of all MS1 events divided by retention time duration. - MS_MS1_quarter_RT_fraction = 4000055, + /// obsolete MS1 quarter RT fraction: OBSOLETE. The interval used for acquisition of the first, second, third, and fourth quarter of all MS1 events divided by retention time duration. + MS_obsolete_MS1_quarter_RT_fraction_OBSOLETE = 4000055, - /// MS2 quarter RT fraction: The interval used for acquisition of the first, second, third, and fourth quarter of all MS2 events divided by retention time duration. - MS_MS2_quarter_RT_fraction = 4000056, + /// obsolete MS2 quarter RT fraction: OBSOLETE. The interval used for acquisition of the first, second, third, and fourth quarter of all MS2 events divided by retention time duration. + MS_obsolete_MS2_quarter_RT_fraction_OBSOLETE = 4000056, - /// MS1 TIC-change quartile ratios: The log ratios of successive TIC-change quartiles. The TIC changes are the list of MS1 total ion current (TIC) value changes from one to the next scan, produced when each MS1 TIC is subtracted from the preceding MS1 TIC. The metric's value triplet represents the log ratio of the TIC-change Q2 to Q1, Q3 to Q2, TIC-change-max to Q3 - MS_MS1_TIC_change_quartile_ratios = 4000057, + /// obsolete MS1 TIC-change quartile ratios: OBSOLETE. The log ratios of successive TIC-change quartiles. The TIC changes are the list of MS1 total ion current (TIC) value changes from one to the next scan, produced when each MS1 TIC is subtracted from the preceding MS1 TIC. The metric's value triplet represents the log ratio of the TIC-change Q2 to Q1, Q3 to Q2, TIC-change-max to Q3 + MS_obsolete_MS1_TIC_change_quartile_ratios_OBSOLETE = 4000057, - /// MS1 TIC quartile ratios: The log ratios of successive TIC quartiles. The metric's value triplet represents the log ratios of TIC-Q2 to TIC-Q1, TIC-Q3 to TIC-Q2, TIC-max to TIC-Q3. - MS_MS1_TIC_quartile_ratios = 4000058, + /// obsolete MS1 TIC quartile ratios: OBSOLETE. The log ratios of successive TIC quartiles. The metric's value triplet represents the log ratios of TIC-Q2 to TIC-Q1, TIC-Q3 to TIC-Q2, TIC-max to TIC-Q3. + MS_obsolete_MS1_TIC_quartile_ratios_OBSOLETE = 4000058, /// number of MS1 spectra: The number of MS1 events in the run. MS_number_of_MS1_spectra = 4000059, @@ -11302,6 +11508,42 @@ /// median MS2 precursor charge in identified spectra: Median MS2 precursor charge in identified spectra. The used type of identification should be noted in the metadata or analysis methods section of the recording file for the respective run. In case of multiple acceptance criteria (FDR) available in proteomics, PSM-level FDR should be used for better comparability. MS_median_MS2_precursor_charge_in_identified_spectra = 4000176, + /// contaminant protein abundance fraction: The fraction of total protein abundance in a mass spectrometry run or a group of runs which can be attributed to a user-defined list of contaminant proteins (e.g. using the cRAP contaminant database). + MS_contaminant_protein_abundance_fraction = 4000177, + + /// precursor ppm deviation mean: The mean of the distribution of observed precursor mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied + MS_precursor_ppm_deviation_mean = 4000178, + + /// precursor ppm deviation sigma: The standard deviation of the distribution of observed precursor mass accuracies (MS:4000072) [in ppm] of identified MS2 spectra after user-defined acceptance criteria (FDR) are applied + MS_precursor_ppm_deviation_sigma = 4000179, + + /// table of missed cleavage counts: The number of identified peptides with corresponding number of missed cleavages after user-defined acceptance criteria are applied. The number of missed cleavages per peptide is given in the 'number of missed cleavages' column, the respective count of such peptides identified in the 'Number of Occurrences' column. The highest 'missed cleavages' row is to be interpreted as that number of missed cleavages or higher. + MS_table_of_missed_cleavage_counts = 4000180, + + /// obsolete identified MS2 quarter RT fraction: OBSOLETE. The interval used for acquisition of the first, second, third, and fourth quarter of all identified MS2 events divided by retention time duration. + MS_obsolete_identified_MS2_quarter_RT_fraction_OBSOLETE = 4000181, + + /// XIC-Height quantile ratios: The log ratio of successive XIC height quantiles. A value triplet represents the original QuaMeter metrics, the log ratios of XIC-Height-Q2 to XIC-Height-Q1, XIC-Height-Q3 to XIC-Height-Q2, XIC-Height max to XIC-Height-Q3. The number of values in the tuple implies the quantile mode. + MS_XIC_Height_quantile_ratios = 4000182, + + /// TIC quantile RT fraction: The interval when the respective quantile of the TIC accumulates divided by retention time duration. The number of values in the tuple implies the quantile mode. + MS_TIC_quantile_RT_fraction = 4000183, + + /// MS1 quantile RT fraction: The interval used for acquisition of quantiles of all MS1 events divided by retention time duration. The number of values in the tuple implies the quantile mode. + MS_MS1_quantile_RT_fraction = 4000184, + + /// MS2 quantile RT fraction: The interval used for acquisition of quantiles of all MS2 events divided by retention time duration. The number of values in the tuple implies the quantile mode. + MS_MS2_quantile_RT_fraction = 4000185, + + /// MS1 TIC-change quantile ratios: The log ratios of successive TIC-change quantiles. The TIC changes are the list of MS1 total ion current (TIC) value changes from one to the next scan, produced when each MS1 TIC is subtracted from the preceding MS1 TIC. A value triplet represents the original QuaMeter metrics, the log ratio of the TIC-change Q2 to Q1, Q3 to Q2, TIC-change-max to Q3. The number of values in the tuple implies the quantile mode. + MS_MS1_TIC_change_quantile_ratios = 4000186, + + /// MS1 TIC quantile ratios: The log ratios of successive TIC quantiles. A value triplet represents the original QuaMeter metrics, the log ratios of TIC-Q2 to TIC-Q1, TIC-Q3 to TIC-Q2, TIC-max to TIC-Q3. The number of values in the tuple implies the quantile mode. + MS_MS1_TIC_quantile_ratios = 4000187, + + /// identified MS2 quantile RT fraction: The interval used for acquisition of quantiles of all identified MS2 events, after user-defined acceptance criteria are applied, divided by retention time duration. The number of values in the tuple implies the quantile mode. In case of multiple acceptance criteria (FDR) available in proteomics, PSM-level FDR should be used for better comparability. + MS_identified_MS2_quantile_RT_fraction = 4000188, + /// unimod root node: The root node of the unimod modifications ontology. UNIMOD_unimod_root_node = 300000000, @@ -15829,14 +16071,14 @@ /// DBIA: Desthiobiotinylation of cysteine with DBIA probe. UNIMOD_DBIA = 300002062, - /// Mono_Nγ-propargyl-L-Gln_desthiobiotin: Monomodification of Nγ-propargyl-L-Gln probe with clicked desthiobiotin-azide. - UNIMOD_Mono_N___propargyl_L_Gln_desthiobiotin = 300002067, + /// Mono_Ngamma-propargyl-L-Gln_desthiobiotin: Monomodification of Ngamma-propargyl-L-Gln probe with clicked desthiobiotin-azide. + UNIMOD_Mono_Ngamma_propargyl_L_Gln_desthiobiotin = 300002067, - /// Di_L-Glu_Nγ-propargyl-L-Gln_desthiobiotin: Dimodification of L-Glu and Nγ-propargyl-L-Gln probe with clicked desthiobiotin-azide. - UNIMOD_Di_L_Glu_N___propargyl_L_Gln_desthiobiotin = 300002068, + /// Di_L-Glu_Ngamma-propargyl-L-Gln_desthiobiotin: Dimodification of L-Glu and Ngamma-propargyl-L-Gln probe with clicked desthiobiotin-azide. + UNIMOD_Di_L_Glu_Ngamma_propargyl_L_Gln_desthiobiotin = 300002068, - /// Di_L-Gln_Nγ-propargyl-L-Gln_desthiobiotin: Dimodification of L-Gln and Nγ-propargyl-L-Gln probe with clicked desthiobiotin-azide. - UNIMOD_Di_L_Gln_N___propargyl_L_Gln_desthiobiotin = 300002069, + /// Di_L-Gln_Ngamma-propargyl-L-Gln_desthiobiotin: Dimodification of L-Gln and Ngamma-propargyl-L-Gln probe with clicked desthiobiotin-azide. + UNIMOD_Di_L_Gln_Ngamma_propargyl_L_Gln_desthiobiotin = 300002069, /// L-Gln: Monomodification with glutamine. UNIMOD_L_Gln = 300002070, @@ -15871,6 +16113,93 @@ /// DVFQQQTGG: SUMOylation by Endogenous SUMO2/3 following Lys C and Asp-N serial digestion. UNIMOD_DVFQQQTGG = 300002085, + /// iST-NHS specific cysteine modification: Preomics iST-NHS Kit specific cysteine modification. + UNIMOD_iST_NHS_specific_cysteine_modification = 300002086, + + /// Label:13C(2)15N(1): 13C(2) 15N(1) Silac label. + UNIMOD_Label_13C_2_15N_1_ = 300002088, + + /// DPIA: Desthiobiotinylation of cysteine with DPIA (Desthiobiotin polyethyleneoxide iodoacetamide) probe. + UNIMOD_DPIA = 300002106, + + /// Acetoacetyl: Acetoacetylation. + UNIMOD_Acetoacetyl = 300002107, + + /// Isovaleryl: Isovalerylation. + UNIMOD_Isovaleryl = 300002108, + + /// 2-methylbutyryl: 2-methylbutyrylation. + UNIMOD_2_methylbutyryl = 300002109, + + /// Tiglyl: Tiglylation. + UNIMOD_Tiglyl = 300002110, + + /// 3-methylglutaryl: 3-methylglutarylation. + UNIMOD_3_methylglutaryl = 300002111, + + /// 3-methylglutaconyl: 3-methylglutaconylation. + UNIMOD_3_methylglutaconyl = 300002112, + + /// 3-hydroxy-3-methylglutaryl: 3-hydroxy-3-methylglutarylation. + UNIMOD_3_hydroxy_3_methylglutaryl = 300002113, + + /// Lactylation: Lactylation(Lac). + UNIMOD_Lactylation = 300002114, + + /// Pyruvoyl: Pyruvoylation. + UNIMOD_Pyruvoyl = 300002115, + + /// Glyoxylyl: Glyoxylylation. + UNIMOD_Glyoxylyl = 300002116, + + /// Itaconatyl: Itaconatylation. + UNIMOD_Itaconatyl = 300002117, + + /// Itaconyl: Itaconylation. + UNIMOD_Itaconyl = 300002118, + + /// ValGly: UFMylation residue. + UNIMOD_ValGly = 300002119, + + /// Pentanoyl: Pentanoylation. + UNIMOD_Pentanoyl = 300002120, + + /// Hexanoyl: Hexanoylation. + UNIMOD_Hexanoyl = 300002121, + + /// Label:13C(6)15N(2)+TMT6plex: Sixplex Tandem Mass Tag 13C(6) 15N(2) Silac label. + UNIMOD_Label_13C_6_15N_2__TMT6plex = 300002122, + + /// Label:13C(6)15N(2)+TMTpro: TMTpro Tandem Mass Tag 13C(6) 15N(2) Silac label. + UNIMOD_Label_13C_6_15N_2__TMTpro = 300002123, + + /// 2PCA-triazole-ethanethiol: Cleaved 2PCA clicked to biotin-SS-azide. + UNIMOD_2PCA_triazole_ethanethiol = 300002126, + + /// Desthiobiotin-Phenol: Desthiobiotin-Phenol. + UNIMOD_Desthiobiotin_Phenol = 300002127, + + /// Cys-vinyl sulfone amine probe addition: Michael addition of a vinyl sulfone amine desthiobiotin probe to cysteine. + UNIMOD_Cys_vinyl_sulfone_amine_probe_addition = 300002128, + + /// Cys->fGly-diol: Formylglycinediol, activated in sulfatases. + UNIMOD_Cys__fGly_diol = 300002129, + + /// Cys->sulfo-fGly-dio: Sulphated formylglycinediol, activated in sulfatases. + UNIMOD_Cys__sulfo_fGly_dio = 300002130, + + /// Cys->Ser-O-sulfate: Serine O-sulfate. + UNIMOD_Cys__Ser_O_sulfate = 300002131, + + /// b-type-ion: Dehydration of C-terminus as reaction inside the mass spectrometer. + UNIMOD_b_type_ion = 300002132, + + /// PnTAG: 6-Phosphonohexanoylation. + UNIMOD_PnTAG = 300002135, + + /// DMA-PEG3: DimethylaminoPEG3ylation. + UNIMOD_DMA_PEG3 = 300002136, + /// unit: A unit of measurement is a standardized quantity of a physical quality. UO_unit = 400000000, @@ -17105,7 +17434,7 @@ std::vector exactSynonyms; std::multimap propertyValues; - CVTermInfo() : cvid((CVID)-1) {} + CVTermInfo() : cvid((CVID)-1), isObsolete(false) {} const std::string& shortName() const; std::string prefix() const; }; diff -Nru libpwizlite-3.0.8/src/pwiz/data/misc/FrequencyData.hpp libpwizlite-3.0.15/src/pwiz/data/misc/FrequencyData.hpp --- libpwizlite-3.0.8/src/pwiz/data/misc/FrequencyData.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/misc/FrequencyData.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -154,7 +154,7 @@ private: struct Impl; - std::auto_ptr impl_; + std::unique_ptr impl_; /// Hidden to prevent unintended copying of large amounts of data. FrequencyData(FrequencyData& that); diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/DefaultReaderList.cpp libpwizlite-3.0.15/src/pwiz/data/msdata/DefaultReaderList.cpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/DefaultReaderList.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/DefaultReaderList.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -62,8 +62,8 @@ { SourceFilePtr sourceFile(new SourceFile); bfs::path p(filename); - sourceFile->id = sourceFile->name = BFS_STRING(p.leaf()); - sourceFile->location = "file:///" + BFS_COMPLETE(p.branch_path()).string(); + sourceFile->id = sourceFile->name = BFS_STRING(p.filename()); + sourceFile->location = "file:///" + BFS_COMPLETE(p.parent_path()).string(); msd.fileDescription.sourceFilePtrs.push_back(sourceFile); } @@ -394,8 +394,8 @@ SourceFilePtr sourceFile(new SourceFile); sourceFile->id = "BTDX1"; bfs::path p(filename); - sourceFile->name = BFS_STRING(p.leaf()); - sourceFile->location = "file:///" + BFS_COMPLETE(p.branch_path()).string(); + sourceFile->name = BFS_STRING(p.filename()); + sourceFile->location = "file:///" + BFS_COMPLETE(p.parent_path()).string(); result.fileDescription.sourceFilePtrs.push_back(sourceFile); result.id = result.run.id = bfs::basename(filename); diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/IO-FRusconi-removed-all-mzmlb-related-code.cpp libpwizlite-3.0.15/src/pwiz/data/msdata/IO-FRusconi-removed-all-mzmlb-related-code.cpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/IO-FRusconi-removed-all-mzmlb-related-code.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/IO-FRusconi-removed-all-mzmlb-related-code.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,3099 +0,0 @@ -// -// $Id$ -// -// -// Original author: Darren Kessner -// -// Copyright 2007 Spielberg Family Center for Applied Proteomics -// Cedars-Sinai Medical Center, Los Angeles, California 90048 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - - -#define PWIZ_SOURCE - -#include "IO.hpp" -#include "References.hpp" -#include "pwiz/utility/minimxml/SAXParser.hpp" -#include "pwiz/utility/misc/Filesystem.hpp" -#include "pwiz/utility/misc/Std.hpp" -#include "SpectrumWorkerThreads.hpp" - -namespace pwiz { -namespace msdata { -namespace IO { - - -using namespace minimxml; -using namespace minimxml::SAXParser; -using namespace util; - - -template -void writeList(minimxml::XMLWriter& writer, const vector& objectPtrs, const string& label) -{ - if (!objectPtrs.empty()) - { - XMLWriter::Attributes attributes; - attributes.add("count", objectPtrs.size()); - writer.startElement(label, attributes); - for (typename vector::const_iterator it = objectPtrs.begin(); it != objectPtrs.end(); ++it) - write(writer, **it); - writer.endElement(); - } -} - - -// -// CV -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const CV& cv) -{ - XMLWriter::Attributes attributes; - attributes.add("id", encode_xml_id_copy(cv.id)); - attributes.add("fullName", cv.fullName); - attributes.add("version", cv.version); - attributes.add("URI", cv.URI); - writer.startElement("cv", attributes, XMLWriter::EmptyElement); -} - - -struct HandlerCV : public SAXParser::Handler -{ - CV* cv; - HandlerCV(CV* _cv = 0) : cv(_cv) {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (name != "cv") - throw runtime_error(("[IO::HandlerCV] Unexpected element name: " + name).c_str()); - decode_xml_id(getAttribute(attributes, "id", cv->id)); - getAttribute(attributes, "fullName", cv->fullName); - getAttribute(attributes, "version", cv->version); - getAttribute(attributes, "URI", cv->URI); - return Status::Ok; - } - -}; - - -PWIZ_API_DECL void read(std::istream& is, CV& cv) -{ - HandlerCV handler(&cv); - SAXParser::parse(is, handler); -} - - -// -// UserParam -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const UserParam& userParam) -{ - XMLWriter::Attributes attributes; - attributes.add("name", userParam.name); - if (!userParam.value.empty()) - attributes.add("value", userParam.value); - if (!userParam.type.empty()) - attributes.add("type", userParam.type); - if (userParam.units != CVID_Unknown) - { - attributes.add("unitAccession", cvTermInfo(userParam.units).id); - attributes.add("unitName", cvTermInfo(userParam.units).name); - } - - writer.startElement("userParam", attributes, XMLWriter::EmptyElement); -} - - -struct HandlerUserParam : public SAXParser::Handler -{ - UserParam* userParam; - HandlerUserParam(UserParam* _userParam = 0) : userParam(_userParam) {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (name != "userParam") - throw runtime_error(("[IO::HandlerUserParam] Unexpected element name: " + name).c_str()); - - if (!userParam) - throw runtime_error("[IO::HandlerUserParam] Null userParam."); - - getAttribute(attributes, "name", userParam->name); - getAttribute(attributes, "value", userParam->value); - getAttribute(attributes, "type", userParam->type); - - string unitAccession; - getAttribute(attributes, "unitAccession", unitAccession); - if (!unitAccession.empty()) - userParam->units = cvTermInfo(unitAccession).cvid; - - return Status::Ok; - } -}; - - -PWIZ_API_DECL void read(std::istream& is, UserParam& userParam) -{ - HandlerUserParam handler(&userParam); - SAXParser::parse(is, handler); -} - - -// -// CVParam -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const CVParam& cvParam) -{ - XMLWriter::Attributes attributes; - attributes.add("cvRef", cvTermInfo(cvParam.cvid).prefix()); - attributes.add("accession", cvTermInfo(cvParam.cvid).id); - attributes.add("name", cvTermInfo(cvParam.cvid).name); - attributes.add("value", cvParam.value); - if (cvParam.units != CVID_Unknown) - { - attributes.add("unitCvRef", cvTermInfo(cvParam.units).prefix()); - attributes.add("unitAccession", cvTermInfo(cvParam.units).id); - attributes.add("unitName", cvTermInfo(cvParam.units).name); - } - writer.startElement("cvParam", attributes, XMLWriter::EmptyElement); -} - - -struct HandlerCVParam : public SAXParser::Handler -{ - CVParam* cvParam; - - HandlerCVParam(CVParam* _cvParam = 0) : cvParam(_cvParam) {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (name != "cvParam") - throw runtime_error(("[IO::HandlerCVParam] Unexpected element name: " + name).c_str()); - - if (!cvParam) - throw runtime_error("[IO::HandlerCVParam] Null cvParam."); - - const char *accession = getAttribute(attributes, "accession", NoXMLUnescape); - if (accession) - cvParam->cvid = cvTermInfo(accession).cvid; - - getAttribute(attributes, "value", cvParam->value); - - const char *unitAccession = getAttribute(attributes, "unitAccession", NoXMLUnescape); - if (unitAccession) - cvParam->units = cvTermInfo(unitAccession).cvid; - - return Status::Ok; - } -}; - - -PWIZ_API_DECL void read(std::istream& is, CVParam& cvParam) -{ - HandlerCVParam handler(&cvParam); - SAXParser::parse(is, handler); -} - - -// -// ParamContainer -// -// -// note: These are auxilliary functions to be called by ParamContainer subclasses -// - - -PWIZ_API_DECL void writeParamGroupRef(minimxml::XMLWriter& writer, const ParamGroup& paramGroup) -{ - XMLWriter::Attributes attributes; - attributes.add("ref", paramGroup.id); - writer.startElement("referenceableParamGroupRef", attributes, XMLWriter::EmptyElement); -} - - -PWIZ_API_DECL void writeParamContainer(minimxml::XMLWriter& writer, const ParamContainer& pc) -{ - for (vector::const_iterator it=pc.paramGroupPtrs.begin(); - it!=pc.paramGroupPtrs.end(); ++it) - writeParamGroupRef(writer, **it); - - for (vector::const_iterator it=pc.cvParams.begin(); - it!=pc.cvParams.end(); ++it) - write(writer, *it); - - for (vector::const_iterator it=pc.userParams.begin(); - it!=pc.userParams.end(); ++it) - write(writer, *it); -} - - -struct HandlerParamContainer : public SAXParser::Handler -{ - ParamContainer* paramContainer; - - HandlerParamContainer(ParamContainer* _paramContainer = 0) - : paramContainer(_paramContainer) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!paramContainer) - throw runtime_error("[IO::HandlerParamContainer] Null paramContainer."); - - if (name == "cvParam") - { - paramContainer->cvParams.push_back(CVParam()); - handlerCVParam_.cvParam = ¶mContainer->cvParams.back(); - return Status(Status::Delegate, &handlerCVParam_); - } - else if (name == "userParam") - { - paramContainer->userParams.push_back(UserParam()); - handlerUserParam_.userParam = ¶mContainer->userParams.back(); - return Status(Status::Delegate, &handlerUserParam_); - } - else if (name == "referenceableParamGroupRef") - { - // note: placeholder - string id; - decode_xml_id(getAttribute(attributes, "ref", id)); - if (!id.empty()) - paramContainer->paramGroupPtrs.push_back(ParamGroupPtr(new ParamGroup(id))); - return Status::Ok; - } - - throw runtime_error(("[IO::HandlerParamContainer] Unknown element " + name).c_str()); - } - - private: - - HandlerCVParam handlerCVParam_; - HandlerUserParam handlerUserParam_; -}; - - -struct HandlerNamedParamContainer : public HandlerParamContainer -{ - const string name_; - - HandlerNamedParamContainer(const string& name, ParamContainer* paramContainer = 0) - : HandlerParamContainer(paramContainer), name_(name) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (name == name_) - return Status::Ok; - - return HandlerParamContainer::startElement(name, attributes, position); - } -}; - - -// -// ParamGroup -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const ParamGroup& paramGroup) -{ - XMLWriter::Attributes attributes; - attributes.add("id", encode_xml_id_copy(paramGroup.id)); - writer.startElement("referenceableParamGroup", attributes); - writeParamContainer(writer, paramGroup); - writer.endElement(); -} - - -struct HandlerParamGroup : public HandlerParamContainer -{ - ParamGroup* paramGroup; - - HandlerParamGroup(ParamGroup* _paramGroup = 0) - : paramGroup(_paramGroup) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!paramGroup) - throw runtime_error("[IO::HandlerParamGroup] Null paramGroup."); - - if (name == "referenceableParamGroup") - { - decode_xml_id(getAttribute(attributes, "id", paramGroup->id)); - return Status::Ok; - } - - HandlerParamContainer::paramContainer = paramGroup; - return HandlerParamContainer::startElement(name, attributes, position); - } -}; - - -PWIZ_API_DECL void read(std::istream& is, ParamGroup& paramGroup) -{ - HandlerParamGroup handler(¶mGroup); - SAXParser::parse(is, handler); -} - - -// -// FileContent -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const FileContent& fc) -{ - writer.startElement("fileContent"); - writeParamContainer(writer, fc); - writer.endElement(); -} - - -PWIZ_API_DECL void read(std::istream& is, FileContent& fc) -{ - HandlerNamedParamContainer handler("fileContent", &fc); - SAXParser::parse(is, handler); -} - - -// -// SourceFile -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const SourceFile& sf) -{ - XMLWriter::Attributes attributes; - attributes.add("id", encode_xml_id_copy(sf.id)); - attributes.add("name", sf.name); - attributes.add("location", sf.location); - writer.startElement("sourceFile", attributes); - writeParamContainer(writer, sf); - writer.endElement(); -} - - -void writeSourceFileRef(minimxml::XMLWriter& writer, const SourceFile& sourceFile) -{ - XMLWriter::Attributes attributes; - attributes.add("ref", encode_xml_id_copy(sourceFile.id)); - writer.startElement("sourceFileRef", attributes, XMLWriter::EmptyElement); -} - - -struct HandlerSourceFile : public HandlerParamContainer -{ - SourceFile* sourceFile; - - HandlerSourceFile(SourceFile* _sourceFile = 0) - : sourceFile(_sourceFile) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!sourceFile) - throw runtime_error("[IO::HandlerSourceFile] Null sourceFile."); - - if (name == "sourceFile") - { - decode_xml_id(getAttribute(attributes, "id", sourceFile->id)); - getAttribute(attributes, "name", sourceFile->name); - getAttribute(attributes, "location", sourceFile->location); - return Status::Ok; - } - - HandlerParamContainer::paramContainer = sourceFile; - return HandlerParamContainer::startElement(name, attributes, position); - } -}; - - -PWIZ_API_DECL void read(std::istream& is, SourceFile& sf) -{ - HandlerSourceFile handler(&sf); - SAXParser::parse(is, handler); -} - - -// -// Contact -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Contact& c) -{ - writer.startElement("contact"); - writeParamContainer(writer, c); - writer.endElement(); -} - - -PWIZ_API_DECL void read(std::istream& is, Contact& c) -{ - HandlerNamedParamContainer handler("contact", &c); - SAXParser::parse(is, handler); -} - - -// -// FileDescription -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const FileDescription& fd) -{ - writer.startElement("fileDescription"); - write(writer, fd.fileContent); - - writeList(writer, fd.sourceFilePtrs, "sourceFileList"); - - for (vector::const_iterator it=fd.contacts.begin(); - it!=fd.contacts.end(); ++it) - write(writer, *it); - writer.endElement(); -} - - -struct HandlerFileDescription : public SAXParser::Handler -{ - FileDescription* fileDescription; - - HandlerFileDescription(FileDescription* _fileDescription = 0) - : fileDescription(_fileDescription), - handlerFileContent_("fileContent"), - handlerContact_("contact") - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!fileDescription) - throw runtime_error("[IO::HandlerFileDescription] Null fileDescription."); - - if (name == "fileDescription") - { - return Status::Ok; - } - else if (name == "fileContent") - { - handlerFileContent_.paramContainer = &fileDescription->fileContent; - return Status(Status::Delegate, &handlerFileContent_); - } - else if (name == "sourceFileList") - { - return Status::Ok; - } - else if (name == "sourceFile") - { - fileDescription->sourceFilePtrs.push_back(SourceFilePtr(new SourceFile)); - handlerSourceFile_.sourceFile = fileDescription->sourceFilePtrs.back().get(); - return Status(Status::Delegate, &handlerSourceFile_); - } - else if (name == "contact") - { - fileDescription->contacts.push_back(Contact()); - handlerContact_.paramContainer = &fileDescription->contacts.back(); - return Status(Status::Delegate, &handlerContact_); - } - - throw runtime_error(("[IO::HandlerFileDescription] Unknown element " + name).c_str()); - } - - private: - - HandlerNamedParamContainer handlerFileContent_; - HandlerSourceFile handlerSourceFile_; - HandlerNamedParamContainer handlerContact_; -}; - - -PWIZ_API_DECL void read(std::istream& is, FileDescription& fd) -{ - HandlerFileDescription handler(&fd); - SAXParser::parse(is, handler); -} - - -// -// Sample -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Sample& sample) -{ - XMLWriter::Attributes attributes; - attributes.add("id", encode_xml_id_copy(sample.id)); - attributes.add("name", sample.name); - writer.startElement("sample", attributes); - writeParamContainer(writer, sample); - writer.endElement(); -} - - -struct HandlerSample : public HandlerParamContainer -{ - Sample* sample; - - HandlerSample(Sample* _sample = 0) - : sample(_sample) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!sample) - throw runtime_error("[IO::HandlerSample] Null sample."); - - if (name == "sample") - { - decode_xml_id(getAttribute(attributes, "id", sample->id)); - getAttribute(attributes, "name", sample->name); - return Status::Ok; - } - - HandlerParamContainer::paramContainer = sample; - return HandlerParamContainer::startElement(name, attributes, position); - } -}; - - -PWIZ_API_DECL void read(std::istream& is, Sample& sample) -{ - HandlerSample handler(&sample); - SAXParser::parse(is, handler); -} - - -// -// Component (Source, Analyzer, Detector) -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Component& component) -{ - XMLWriter::Attributes attributes; - attributes.add("order", component.order); - switch (component.type) - { - case ComponentType_Source: - writer.startElement("source", attributes); - break; - case ComponentType_Analyzer: - writer.startElement("analyzer", attributes); - break; - case ComponentType_Detector: - writer.startElement("detector", attributes); - break; - case ComponentType_Unknown: - throw runtime_error("[IO::write] Unknown component type."); - } - writeParamContainer(writer, component); - writer.endElement(); -} - - -struct HandlerComponent : public HandlerParamContainer -{ - Component* component; - - HandlerComponent(Component* _component = 0) - : component(_component) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!component) - throw runtime_error("[IO::HandlerComponent] Null component."); - - if (name=="source" || - name=="analyzer" || - name=="detector") - { - getAttribute(attributes, "order", component->order); - return Status::Ok; - } - - HandlerParamContainer::paramContainer = component; - return HandlerParamContainer::startElement(name, attributes, position); - } -}; - - -PWIZ_API_DECL void read(std::istream& is, Component& component) -{ - HandlerComponent handler(&component); - SAXParser::parse(is, handler); -} - - -// -// ComponentList -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const ComponentList& componentList) -{ - if (componentList.empty()) // componentList not required by schema - return; - - int count = (int) componentList.size(); - - XMLWriter::Attributes attributes; - attributes.add("count", count); - - writer.startElement("componentList", attributes); - for (size_t i=0; i < componentList.size(); ++i) - write(writer, componentList[i]); - writer.endElement(); -} - - -struct HandlerComponentList : public SAXParser::Handler -{ - ComponentList* componentList; - HandlerComponentList(ComponentList* _componentList = 0) : componentList(_componentList) {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!componentList) - throw runtime_error("[IO::HandlerComponentList] Null componentList."); - - if (name == "componentList") - { - return Status::Ok; - } - else if (name == "source") - { - componentList->push_back(Component(ComponentType_Source, 1)); - handlerComponent_.component = &componentList->back(); - return Status(Status::Delegate, &handlerComponent_); - } - else if (name == "analyzer") - { - componentList->push_back(Component(ComponentType_Analyzer, 1)); - handlerComponent_.component = &componentList->back(); - return Status(Status::Delegate, &handlerComponent_); - } - else if (name == "detector") - { - componentList->push_back(Component(ComponentType_Detector, 1)); - handlerComponent_.component = &componentList->back(); - return Status(Status::Delegate, &handlerComponent_); - } - - throw runtime_error(("[IO::HandlerComponentList] Unexpected element name: " + name).c_str()); - } - - private: - HandlerComponent handlerComponent_; -}; - - -PWIZ_API_DECL void read(std::istream& is, ComponentList& componentList) -{ - HandlerComponentList handler(&componentList); - SAXParser::parse(is, handler); -} - - -// -// Software -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Software& software) -{ - XMLWriter::Attributes attributes; - attributes.add("id", encode_xml_id_copy(software.id)); - attributes.add("version", software.version); - writer.startElement("software", attributes); - writeParamContainer(writer, software); - writer.endElement(); -} - - -struct HandlerSoftware : public HandlerParamContainer -{ - Software* software; - - HandlerSoftware(Software* _software = 0) : software(_software) {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!software) - throw runtime_error("[IO::HandlerSoftware] Null software."); - - if (name == "software") - { - decode_xml_id(getAttribute(attributes, "id", software->id)); - getAttribute(attributes, "version", software->version); - return Status::Ok; - } - - // mzML 1.0 - else if (version == 1 && name == "softwareParam") - { - string accession; - getAttribute(attributes, "accession", accession); - if (!accession.empty()) - software->set(cvTermInfo(accession).cvid); - - getAttribute(attributes, "version", software->version); - return Status::Ok; - } - - HandlerParamContainer::paramContainer = software; - return HandlerParamContainer::startElement(name, attributes, position); - } -}; - - -PWIZ_API_DECL void read(std::istream& is, Software& software) -{ - HandlerSoftware handler(&software); - SAXParser::parse(is, handler); -} - - -// -// InstrumentConfiguration -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const InstrumentConfiguration& instrumentConfiguration) -{ - XMLWriter::Attributes attributes; - attributes.add("id", encode_xml_id_copy(instrumentConfiguration.id)); - writer.startElement("instrumentConfiguration", attributes); - - writeParamContainer(writer, instrumentConfiguration); - if (!instrumentConfiguration.componentList.empty()) // optional element - write(writer, instrumentConfiguration.componentList); - - if (instrumentConfiguration.softwarePtr.get()) - { - attributes.clear(); - attributes.add("ref", encode_xml_id_copy(instrumentConfiguration.softwarePtr->id)); - writer.startElement("softwareRef", attributes, XMLWriter::EmptyElement); - } - - writer.endElement(); -} - - -struct HandlerInstrumentConfiguration : public HandlerParamContainer -{ - InstrumentConfiguration* instrumentConfiguration; - HandlerInstrumentConfiguration(InstrumentConfiguration* _instrumentConfiguration = 0) - : instrumentConfiguration(_instrumentConfiguration) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!instrumentConfiguration) - throw runtime_error("[IO::HandlerInstrumentConfiguration] Null instrumentConfiguration."); - - if (name == "instrumentConfiguration") - { - decode_xml_id(getAttribute(attributes, "id", instrumentConfiguration->id)); - return Status::Ok; - } - else if (name == "componentList") - { - handlerComponentList_.componentList = &instrumentConfiguration->componentList; - return Status(Status::Delegate, &handlerComponentList_); - } - else if (name == "softwareRef") - { - // note: placeholder - string ref; - decode_xml_id(getAttribute(attributes, "ref", ref)); - if (!ref.empty()) - instrumentConfiguration->softwarePtr = SoftwarePtr(new Software(ref)); - return Status::Ok; - } - - HandlerParamContainer::paramContainer = instrumentConfiguration; - return HandlerParamContainer::startElement(name, attributes, position); - } - - private: - HandlerComponentList handlerComponentList_; -}; - - -PWIZ_API_DECL void read(std::istream& is, InstrumentConfiguration& instrumentConfiguration) -{ - HandlerInstrumentConfiguration handler(&instrumentConfiguration); - SAXParser::parse(is, handler); -} - - -// -// ProcessingMethod -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const ProcessingMethod& processingMethod) -{ - XMLWriter::Attributes attributes; - attributes.add("order", processingMethod.order); - if (processingMethod.softwarePtr.get()) - attributes.add("softwareRef", encode_xml_id_copy(processingMethod.softwarePtr->id)); - - writer.startElement("processingMethod", attributes); - writeParamContainer(writer, processingMethod); - writer.endElement(); -} - - -struct HandlerProcessingMethod : public HandlerParamContainer -{ - ProcessingMethod* processingMethod; - string defaultSoftwareRef; - - HandlerProcessingMethod(ProcessingMethod* _processingMethod = 0) - : processingMethod(_processingMethod) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!processingMethod) - throw runtime_error("[IO::HandlerProcessingMethod] Null processingMethod."); - - if (name == "processingMethod") - { - getAttribute(attributes, "order", processingMethod->order); - - // note: placeholder - string softwareRef; - decode_xml_id(getAttribute(attributes, "softwareRef", softwareRef)); - if (!softwareRef.empty()) - processingMethod->softwarePtr = SoftwarePtr(new Software(softwareRef)); - else if (!defaultSoftwareRef.empty()) - processingMethod->softwarePtr = SoftwarePtr(new Software(defaultSoftwareRef)); - - return Status::Ok; - } - - HandlerParamContainer::paramContainer = processingMethod; - return HandlerParamContainer::startElement(name, attributes, position); - } -}; - - -PWIZ_API_DECL void read(std::istream& is, ProcessingMethod& processingMethod) -{ - HandlerProcessingMethod handler(&processingMethod); - SAXParser::parse(is, handler); -} - - -// -// DataProcessing -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const DataProcessing& dataProcessing) -{ - XMLWriter::Attributes attributes; - attributes.add("id", encode_xml_id_copy(dataProcessing.id)); - - writer.startElement("dataProcessing", attributes); - - for (vector::const_iterator it=dataProcessing.processingMethods.begin(); - it!=dataProcessing.processingMethods.end(); ++it) - write(writer, *it); - - writer.endElement(); -} - - -struct HandlerDataProcessing : public HandlerParamContainer -{ - DataProcessing* dataProcessing; - - HandlerDataProcessing(DataProcessing* _dataProcessing = 0) - : dataProcessing(_dataProcessing) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!dataProcessing) - throw runtime_error("[IO::HandlerDataProcessing] Null dataProcessing."); - - if (name == "dataProcessing") - { - decode_xml_id(getAttribute(attributes, "id", dataProcessing->id)); - - // mzML 1.0 - if (version == 1) - { - string softwareRef; - getAttribute(attributes, "softwareRef", softwareRef); - if (!softwareRef.empty()) - handlerProcessingMethod_.defaultSoftwareRef = softwareRef; - } - - return Status::Ok; - } - else if (name == "processingMethod") - { - dataProcessing->processingMethods.push_back(ProcessingMethod()); - handlerProcessingMethod_.processingMethod = &dataProcessing->processingMethods.back(); - return Status(Status::Delegate, &handlerProcessingMethod_); - } - - throw runtime_error(("[IO::HandlerDataProcessing] Unexpected element name: " + name).c_str()); - } - - private: - HandlerProcessingMethod handlerProcessingMethod_; -}; - - -PWIZ_API_DECL void read(std::istream& is, DataProcessing& dataProcessing) -{ - HandlerDataProcessing handler(&dataProcessing); - SAXParser::parse(is, handler); -} - - -// -// Target -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Target& t) -{ - writer.startElement("target"); - writeParamContainer(writer, t); - writer.endElement(); -} - - -PWIZ_API_DECL void read(std::istream& is, Target& t) -{ - HandlerNamedParamContainer handler("target", &t); - SAXParser::parse(is, handler); -} - - -// -// ScanSettings -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const ScanSettings& scanSettings) -{ - XMLWriter::Attributes attributes; - attributes.add("id", encode_xml_id_copy(scanSettings.id)); - - writer.startElement("scanSettings", attributes); - - if (!scanSettings.sourceFilePtrs.empty()) - { - attributes.clear(); - attributes.add("count", scanSettings.sourceFilePtrs.size()); - writer.startElement("sourceFileRefList", attributes); - for (vector::const_iterator it=scanSettings.sourceFilePtrs.begin(); - it!=scanSettings.sourceFilePtrs.end(); ++it) - writeSourceFileRef(writer, **it); - writer.endElement(); // sourceFileRefList - } - - if (!scanSettings.targets.empty()) - { - XMLWriter::Attributes attributes; - attributes.add("count", scanSettings.targets.size()); - writer.startElement("targetList", attributes); - - for (vector::const_iterator it=scanSettings.targets.begin(); - it!=scanSettings.targets.end(); ++it) - write(writer, *it); - - writer.endElement(); // targetList - } - - writer.endElement(); -} - - -struct HandlerScanSettings : public HandlerParamContainer -{ - ScanSettings* scanSettings; - - HandlerScanSettings(ScanSettings* _scanSettings = 0) - : scanSettings(_scanSettings), - handlerTarget_("target") - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!scanSettings) - throw runtime_error("[IO::HandlerScanSettings] Null scanSettings."); - - if ((version == 1 && name == "acquisitionSettings") /* mzML 1.0 */ || - name == "scanSettings") - { - decode_xml_id(getAttribute(attributes, "id", scanSettings->id)); - return Status::Ok; - } - else if (name=="sourceFileRefList" || name=="targetList") - { - return Status::Ok; - } - else if (name=="sourceFileRef") - { - // note: placeholder - string sourceFileRef; - decode_xml_id(getAttribute(attributes, "ref", sourceFileRef)); - if (!sourceFileRef.empty()) - scanSettings->sourceFilePtrs.push_back(SourceFilePtr(new SourceFile(sourceFileRef))); - return Status::Ok; - } - else if (name=="target") - { - scanSettings->targets.push_back(Target()); - handlerTarget_.paramContainer = &scanSettings->targets.back(); - return Status(Status::Delegate, &handlerTarget_); - } - - throw runtime_error(("[IO::HandlerScanSettings] Unexpected element name: " + name).c_str()); - } - - private: - HandlerNamedParamContainer handlerTarget_; -}; - - -PWIZ_API_DECL void read(std::istream& is, ScanSettings& scanSettings) -{ - HandlerScanSettings handler(&scanSettings); - SAXParser::parse(is, handler); -} - - -// -// IsolationWindow -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const IsolationWindow& isolationWindow) -{ - writer.startElement("isolationWindow"); - writeParamContainer(writer, isolationWindow); - writer.endElement(); -} - - -PWIZ_API_DECL void read(std::istream& is, IsolationWindow& isolationWindow) -{ - HandlerNamedParamContainer handler("isolationWindow", &isolationWindow); - SAXParser::parse(is, handler); -} - - -// -// SelectedIon -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const SelectedIon& selectedIon) -{ - writer.startElement("selectedIon"); - writeParamContainer(writer, selectedIon); - writer.endElement(); -} - - -PWIZ_API_DECL void read(std::istream& is, SelectedIon& selectedIon) -{ - HandlerNamedParamContainer handler("selectedIon", &selectedIon); - SAXParser::parse(is, handler); -} - - -// -// Activation -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Activation& activation) -{ - writer.startElement("activation"); - writeParamContainer(writer, activation); - writer.endElement(); -} - - -PWIZ_API_DECL void read(std::istream& is, Activation& activation) -{ - HandlerNamedParamContainer handler("activation", &activation); - SAXParser::parse(is, handler); -} - - -// -// Precursor -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Precursor& precursor) -{ - XMLWriter::Attributes attributes; - - if (precursor.spectrumID.empty()) - { - if (!precursor.externalSpectrumID.empty()) - { - if (!precursor.sourceFilePtr.get()) - throw runtime_error("[IO::write] External spectrum references must refer to a source file"); - - attributes.add("sourceFileRef", encode_xml_id_copy(precursor.sourceFilePtr->id)); - attributes.add("externalSpectrumID", precursor.externalSpectrumID); - } - } - else - attributes.add("spectrumRef", precursor.spectrumID); // not an XML:IDREF - - writer.startElement("precursor", attributes); - writeParamContainer(writer, precursor); - - if (!precursor.isolationWindow.empty()) - { - writer.startElement("isolationWindow"); - writeParamContainer(writer, precursor.isolationWindow); - writer.endElement(); // isolationWindow - } - - if (!precursor.selectedIons.empty()) - { - attributes.clear(); - attributes.add("count", precursor.selectedIons.size()); - writer.startElement("selectedIonList", attributes); - - for (vector::const_iterator it=precursor.selectedIons.begin(); - it!=precursor.selectedIons.end(); ++it) - { - writer.startElement("selectedIon"); - writeParamContainer(writer, *it); - writer.endElement(); // selectedIon - } - - writer.endElement(); // selectedIonList - } - - writer.startElement("activation"); - writeParamContainer(writer, precursor.activation); - writer.endElement(); // activation - - writer.endElement(); -} - - -struct HandlerPrecursor : public HandlerParamContainer -{ - Precursor* precursor; - const map* legacyIdRefToNativeId; - - HandlerPrecursor(Precursor* _precursor = 0, const map* legacyIdRefToNativeId = 0) - : precursor(_precursor), - legacyIdRefToNativeId(legacyIdRefToNativeId), - handlerIsolationWindow_("isolationWindow"), - handlerSelectedIon_("selectedIon"), - handlerActivation_("activation") - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!precursor) - throw runtime_error("[IO::HandlerPrecursor] Null precursor."); - - if (name == "precursor") - { - getAttribute(attributes, "spectrumRef", precursor->spectrumID); // not an XML:IDREF - getAttribute(attributes, "externalSpectrumID", precursor->externalSpectrumID); - - // mzML 1.0 - if (version == 1 && legacyIdRefToNativeId && !precursor->spectrumID.empty()) - { - map::const_iterator itr = legacyIdRefToNativeId->find(precursor->spectrumID); - if (itr != legacyIdRefToNativeId->end()) - precursor->spectrumID = itr->second; - } - - // note: placeholder - string sourceFileRef; - decode_xml_id(getAttribute(attributes, "sourceFileRef", sourceFileRef)); - if (!sourceFileRef.empty()) - precursor->sourceFilePtr = SourceFilePtr(new SourceFile(sourceFileRef)); - - return Status::Ok; - } - else if (name == "isolationWindow") - { - handlerIsolationWindow_.paramContainer = &precursor->isolationWindow; - return Status(Status::Delegate, &handlerIsolationWindow_); - } - else if (name == "selectedIon") - { - precursor->selectedIons.push_back(SelectedIon()); - handlerSelectedIon_.paramContainer = &precursor->selectedIons.back(); - return Status(Status::Delegate, &handlerSelectedIon_); - } - else if (name == "activation") - { - handlerActivation_.paramContainer = &precursor->activation; - return Status(Status::Delegate, &handlerActivation_); - } - else if (name == "selectedIonList") - { - return Status::Ok; - } - - HandlerParamContainer::paramContainer = precursor; - return HandlerParamContainer::startElement(name, attributes, position); - } - - private: - HandlerNamedParamContainer handlerIsolationWindow_; - HandlerNamedParamContainer handlerSelectedIon_; - HandlerNamedParamContainer handlerActivation_; -}; - - -PWIZ_API_DECL void read(std::istream& is, Precursor& precursor, const map* legacyIdRefToNativeId) -{ - HandlerPrecursor handler(&precursor, legacyIdRefToNativeId); - SAXParser::parse(is, handler); -} - - -// -// Product -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Product& product) -{ - XMLWriter::Attributes attributes; - - writer.startElement("product", attributes); - - if (!product.isolationWindow.empty()) - { - writer.startElement("isolationWindow"); - writeParamContainer(writer, product.isolationWindow); - writer.endElement(); // isolationWindow - } - - writer.endElement(); -} - - -struct HandlerProduct : public SAXParser::Handler -{ - Product* product; - - HandlerProduct(Product* _product = 0) - : product(_product), - handlerIsolationWindow_("isolationWindow") - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!product) - throw runtime_error("[IO::HandlerProduct] Null product."); - - if (name == "product") - { - return Status::Ok; - } - else if (name == "isolationWindow") - { - handlerIsolationWindow_.paramContainer = &product->isolationWindow; - return Status(Status::Delegate, &handlerIsolationWindow_); - } - - throw runtime_error(("[IO::HandlerProduct] Unknown element " + name).c_str()); - } - - private: - HandlerNamedParamContainer handlerIsolationWindow_; -}; - - -PWIZ_API_DECL void read(std::istream& is, Product& product) -{ - HandlerProduct handler(&product); - SAXParser::parse(is, handler); -} - - -// -// ScanWindow -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const ScanWindow& scanWindow) -{ - writer.startElement("scanWindow"); - writeParamContainer(writer, scanWindow); - writer.endElement(); -} - - -PWIZ_API_DECL void read(std::istream& is, ScanWindow& scanWindow) -{ - HandlerNamedParamContainer handler("scanWindow", &scanWindow); - SAXParser::parse(is, handler); -} - - -// -// Scan -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Scan& scan, const MSData& msd) -{ - XMLWriter::Attributes attributes; - - if (scan.spectrumID.empty()) - { - if (!scan.externalSpectrumID.empty()) - { - if (!scan.sourceFilePtr.get()) - throw runtime_error("[IO::write] External spectrum references must refer to a source file"); - - attributes.add("sourceFileRef", encode_xml_id_copy(scan.sourceFilePtr->id)); - attributes.add("externalSpectrumID", scan.externalSpectrumID); - } - } - else - attributes.add("spectrumRef", scan.spectrumID); // not an XML:IDREF - - // don't write the instrumentConfigurationRef if it's set to the default - const InstrumentConfigurationPtr& defaultIC = msd.run.defaultInstrumentConfigurationPtr; - if (scan.instrumentConfigurationPtr.get() && - (!defaultIC.get() || scan.instrumentConfigurationPtr != defaultIC)) - attributes.add("instrumentConfigurationRef", encode_xml_id_copy(scan.instrumentConfigurationPtr->id)); - - writer.startElement("scan", attributes); - writeParamContainer(writer, scan); - - if (!scan.scanWindows.empty()) - { - attributes.clear(); - attributes.add("count", scan.scanWindows.size()); - writer.startElement("scanWindowList", attributes); - - for (vector::const_iterator it=scan.scanWindows.begin(); - it!=scan.scanWindows.end(); ++it) - write(writer, *it); - - writer.endElement(); - } - - writer.endElement(); -} - - -struct HandlerScan : public HandlerParamContainer -{ - Scan* scan; - - HandlerScan(Scan* _scan = 0) - : scan(_scan), handlerScanWindow_("scanWindow") - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!scan) - throw runtime_error("[IO::HandlerScan] Null scan."); - - if (name != "cvParam") - { // most common, but not handled here - if (name == "scan") - { - getAttribute(attributes, "spectrumRef", scan->spectrumID); // not an XML:IDREF - getAttribute(attributes, "externalSpectrumID", scan->externalSpectrumID); - - // note: placeholder - string sourceFileRef; - decode_xml_id(getAttribute(attributes, "sourceFileRef", sourceFileRef)); - if (!sourceFileRef.empty()) - scan->sourceFilePtr = SourceFilePtr(new SourceFile(sourceFileRef)); - - // note: placeholder - string instrumentConfigurationRef; - decode_xml_id(getAttribute(attributes, "instrumentConfigurationRef", instrumentConfigurationRef)); - if (!instrumentConfigurationRef.empty()) - scan->instrumentConfigurationPtr = InstrumentConfigurationPtr(new InstrumentConfiguration(instrumentConfigurationRef)); - return Status::Ok; - } - else if (version == 1 && name == "acquisition") - { - // note: spectrumRef, externalNativeID, and externalSpectrumID are mutually exclusive - getAttribute(attributes, "spectrumRef", scan->spectrumID); // not an XML:IDREF - if (scan->spectrumID.empty()) - { - string externalNativeID; - getAttribute(attributes, "externalNativeID", externalNativeID); - if (externalNativeID.empty()) - getAttribute(attributes, "externalSpectrumID", scan->externalSpectrumID); - else - try - { - lexical_cast(externalNativeID); - //cerr << "[IO::HandlerScan] Warning - mzML 1.0: ::externalNativeID\n"; - scan->externalSpectrumID = "scan=" + externalNativeID; - } - catch(exception&) - { - //cerr << "[IO::HandlerScan] Warning - mzML 1.0: non-integral ::externalNativeID; externalSpectrumID format unknown\n"; - scan->externalSpectrumID = externalNativeID; - } - } - - // note: placeholder - string sourceFileRef; - decode_xml_id(getAttribute(attributes, "sourceFileRef", sourceFileRef)); - if (!sourceFileRef.empty()) - scan->sourceFilePtr = SourceFilePtr(new SourceFile(sourceFileRef)); - - return Status::Ok; - } - else if (name == "scanWindowList") - { - return Status::Ok; - } - else if (name == "scanWindow") - { - scan->scanWindows.push_back(ScanWindow()); - handlerScanWindow_.paramContainer = &scan->scanWindows.back(); - return Status(Status::Delegate, &handlerScanWindow_); - } - } // end if not cvParam - - HandlerParamContainer::paramContainer = scan; - return HandlerParamContainer::startElement(name, attributes, position); - } - - private: - HandlerNamedParamContainer handlerScanWindow_; -}; - - -PWIZ_API_DECL void read(std::istream& is, Scan& scan) -{ - HandlerScan handler(&scan); - SAXParser::parse(is, handler); -} - - -// -// ScanList -// - - -PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const ScanList& scanList, const MSData& msd) -{ - XMLWriter::Attributes attributes; - attributes.add("count", scanList.scans.size()); - writer.startElement("scanList", attributes); - writeParamContainer(writer, scanList); - - for (vector::const_iterator it=scanList.scans.begin(); - it!=scanList.scans.end(); ++it) - write(writer, *it, msd); - - writer.endElement(); -} - - -struct HandlerScanList : public HandlerParamContainer -{ - ScanList* scanList; - - HandlerScanList(ScanList* _scanList = 0) - : scanList(_scanList) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!scanList) - throw runtime_error("[IO::HandlerScanList] Null scanList."); - - if (name == "scanList" || name == "acquisitionList") - { - return Status::Ok; - } - else if (name == "scan" || name == "acquisition") - { - scanList->scans.push_back(Scan()); - handlerScan_.version = version; - handlerScan_.scan = &scanList->scans.back(); - return Status(Status::Delegate, &handlerScan_); - } - - HandlerParamContainer::paramContainer = scanList; - return HandlerParamContainer::startElement(name, attributes, position); - } - - private: - HandlerScan handlerScan_; -}; - - -PWIZ_API_DECL void read(std::istream& is, ScanList& scanList) -{ - HandlerScanList handler(&scanList); - SAXParser::parse(is, handler); -} - - -// -// BinaryData -// - - -template -void writeBinaryDataArray(minimxml::XMLWriter& writer, const BinaryDataArrayType& binaryDataArray, const BinaryDataEncoder::Config& config) -{ - BinaryDataEncoder::Config usedConfig = config; - auto overrideItr = config.precisionOverrides.find(binaryDataArray.cvParamChild(MS_binary_data_array).cvid); - if (overrideItr != config.precisionOverrides.end()) - usedConfig.precision = overrideItr->second; - auto n_overrideItr = config.numpressOverrides.find(binaryDataArray.cvParamChild(MS_binary_data_array).cvid); - if (n_overrideItr != config.numpressOverrides.end()) - usedConfig.numpress = n_overrideItr->second; - auto t_overrideItr = config.truncationOverrides.find(binaryDataArray.cvParamChild(MS_binary_data_array).cvid); - if (t_overrideItr != config.truncationOverrides.end()) - usedConfig.truncation = t_overrideItr->second; - - string encoded; - - - BinaryDataEncoder encoder(usedConfig); - encoder.encode(binaryDataArray.data, encoded); - usedConfig = encoder.getConfig(); // config may have changed if numpress error was excessive - - - - XMLWriter::Attributes attributes; - - size_t encoded_size = encoded.size(); - - // primary array types can never override the default array length - if (!binaryDataArray.hasCVParam(MS_m_z_array) && - !binaryDataArray.hasCVParam(MS_time_array) && - !binaryDataArray.hasCVParam(MS_intensity_array)) - { - - attributes.add("arrayLength", binaryDataArray.data.size()); - } - - - attributes.add("encodedLength", encoded_size); - - if (binaryDataArray.dataProcessingPtr.get()) - attributes.add("dataProcessingRef", encode_xml_id_copy(binaryDataArray.dataProcessingPtr->id)); - - writer.startElement("binaryDataArray", attributes); - - bool isIntegerArray = typeid(BinaryDataArrayType) == typeid(IntegerDataArray); - - if (BinaryDataEncoder::Numpress_None == usedConfig.numpress) - { - if (usedConfig.precision == BinaryDataEncoder::Precision_32) - write(writer, isIntegerArray ? MS_32_bit_integer : MS_32_bit_float); - else - write(writer, isIntegerArray ? MS_64_bit_integer : MS_64_bit_float); - } - - if (usedConfig.byteOrder == BinaryDataEncoder::ByteOrder_BigEndian) - throw runtime_error("[IO::write()] mzML: must use little endian encoding."); - - bool zlib = false; // Handle numpress+zlib - - if (usedConfig.prediction == BinaryDataEncoder::Prediction_Linear) - write(writer, MS_truncation__linear_prediction_and_zlib_compression); - else if (usedConfig.prediction == BinaryDataEncoder::Prediction_Delta) - write(writer, MS_truncation__delta_prediction_and_zlib_compression); - - switch (usedConfig.compression) { - case BinaryDataEncoder::Compression_None: - if (BinaryDataEncoder::Numpress_None == usedConfig.numpress) - write(writer, MS_no_compression); - break; - case BinaryDataEncoder::Compression_Zlib: - zlib = true; - if (BinaryDataEncoder::Numpress_None == usedConfig.numpress) - write(writer, MS_zlib_compression); - break; - default: - throw runtime_error("[IO::write()] Unsupported compression method."); - break; - } - switch (usedConfig.numpress) { - case BinaryDataEncoder::Numpress_Linear: - write(writer, isIntegerArray ? MS_32_bit_integer : MS_32_bit_float); // This should actually be ignored by any reader since numpress defines word size and format, but it makes output standards-compliant and is pretty close to true anyway - write(writer, zlib ? MS_MS_Numpress_linear_prediction_compression_followed_by_zlib_compression : MS_MS_Numpress_linear_prediction_compression); - break; - case BinaryDataEncoder::Numpress_Pic: - write(writer, isIntegerArray ? MS_32_bit_integer : MS_32_bit_float); // This should actually be ignored by any reader since numpress defines word size and format, but it makes output standards-compliant and is pretty close to true anyway - write(writer, zlib ? MS_MS_Numpress_positive_integer_compression_followed_by_zlib_compression : MS_MS_Numpress_positive_integer_compression); - break; - case BinaryDataEncoder::Numpress_Slof: - write(writer, isIntegerArray ? MS_32_bit_integer : MS_32_bit_float); // This should actually be ignored by any reader since numpress defines word size and format, but it makes output standards-compliant and is pretty close to true anyway - write(writer, zlib ? MS_MS_Numpress_short_logged_float_compression_followed_by_zlib_compression : MS_MS_Numpress_short_logged_float_compression); - break; - case BinaryDataEncoder::Numpress_None: - break; - default: - throw runtime_error("[IO::write()] Unsupported numpress method."); - break; - } - - - writeParamContainer(writer, binaryDataArray); - - - writer.pushStyle(XMLWriter::StyleFlag_InlineInner); - writer.startElement("binary"); - writer.characters(encoded, false); // base64 doesn't use any reserved characters - writer.endElement(); - writer.popStyle(); - - - writer.endElement(); -} - - -PWIZ_API_DECL -void write(minimxml::XMLWriter& writer, const BinaryDataArray& binaryDataArray, const BinaryDataEncoder::Config& config) -{ - writeBinaryDataArray(writer, binaryDataArray, config); -} - -PWIZ_API_DECL -void write(minimxml::XMLWriter& writer, const IntegerDataArray& binaryDataArray, const BinaryDataEncoder::Config& config) -{ - writeBinaryDataArray(writer, binaryDataArray, config); -} - - -struct HandlerBinaryDataArray : public HandlerParamContainer -{ - std::vector* binaryDataArrayPtrs; - std::vector* integerDataArrayPtrs; - const MSData* msd; - size_t* defaultArrayLength; // make pointer so mzMLb can update defaultArrayLength - BinaryDataEncoder::Config config; - ParamContainer paramContainer; - DataProcessingPtr dataProcessingPtr; - CVID cvidBinaryDataType; - BinaryDataFlag binaryDataFlag; - BinaryDataArray* binaryDataArray; - IntegerDataArray* integerDataArray; - - HandlerBinaryDataArray(std::vector* binaryDataArrayPtrs = 0, std::vector* integerDataArrayPtrs = 0, const MSData* _msd = 0, std::istream* _is = 0, BinaryDataFlag binaryDataFlag = ReadBinaryData) - : binaryDataArrayPtrs(binaryDataArrayPtrs), - integerDataArrayPtrs(integerDataArrayPtrs), - msd(_msd), - defaultArrayLength(0), - binaryDataFlag(binaryDataFlag), - arrayLength_(0), - encodedLength_(0), - is_(_is) - { - parseCharacters = true; - autoUnescapeCharacters = false; - } - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (name != "cvParam") // most common, but not handled here - { - if (name == "binaryDataArray") - { - paramContainer.clear(); - - // note: placeholder - string dataProcessingRef; - decode_xml_id(getAttribute(attributes, "dataProcessingRef", dataProcessingRef)); - if (!dataProcessingRef.empty()) - dataProcessingPtr.reset(new DataProcessing(dataProcessingRef)); - else - dataProcessingPtr.reset(); - - getAttribute(attributes, "encodedLength", encodedLength_, NoXMLUnescape); - if (defaultArrayLength) - getAttribute(attributes, "arrayLength", arrayLength_, NoXMLUnescape, *defaultArrayLength); - else - getAttribute(attributes, "arrayLength", arrayLength_, NoXMLUnescape); - - return Status::Ok; - } - else if (name == "binary") - { - if (msd) References::resolve(paramContainer, *msd); - - config = getConfig(); - - CVID binaryArrayType; - if (binaryDataFlag == ReadBinaryDataOnly) - binaryArrayType = paramContainer.cvParamChild(MS_binary_data_array).cvid; - - switch (cvidBinaryDataType) - { - case MS_32_bit_float: - case MS_64_bit_float: - { - if (binaryDataFlag == ReadBinaryDataOnly) - { - binaryDataArray = nullptr; - for (const auto& arrayPtr : *binaryDataArrayPtrs) - if (arrayPtr->hasCVParam(binaryArrayType)) - { - binaryDataArray = &*arrayPtr; - break; - } - - if (binaryDataArray != nullptr) - return Status::Ok; - } - - BinaryDataArrayPtr binaryDataArray = boost::make_shared(); - binaryDataArrayPtrs->emplace_back(binaryDataArray); - swap(static_cast(*binaryDataArray), paramContainer); - binaryDataArray->dataProcessingPtr = dataProcessingPtr; - this->binaryDataArray = &*binaryDataArrayPtrs->back(); - } - break; - - case MS_32_bit_integer: - case MS_64_bit_integer: - { - if (binaryDataFlag == ReadBinaryDataOnly) - { - integerDataArray = nullptr; - for (const auto& arrayPtr : *integerDataArrayPtrs) - if (arrayPtr->hasCVParam(binaryArrayType)) - { - integerDataArray = &*arrayPtr; - break; - } - - if (integerDataArray != nullptr) - return Status::Ok; - } - - IntegerDataArrayPtr binaryDataArray = boost::make_shared(); - integerDataArrayPtrs->emplace_back(binaryDataArray); - swap(static_cast(*binaryDataArray), paramContainer); - binaryDataArray->dataProcessingPtr = dataProcessingPtr; - this->integerDataArray = &*integerDataArrayPtrs->back(); - } - break; - - case CVID_Unknown: - default: - throw runtime_error("[IO::HandlerBinaryDataArray] Unknown binary data type."); - } - - - return Status::Ok; - } - } // end if not cvParam - - HandlerParamContainer::paramContainer = ¶mContainer; - return HandlerParamContainer::startElement(name, attributes, position); - } - - - virtual Status characters(const SAXParser::saxstring& text, - stream_offset position) - { - if (binaryDataFlag == IgnoreBinaryData) - return Status::Ok; - - BinaryDataEncoder encoder(config); - - switch (cvidBinaryDataType) - { - case MS_32_bit_float: - case MS_64_bit_float: - { - encoder.decode(text.c_str(), text.length(), binaryDataArray->data); - predict(); - - if (binaryDataArray->data.size() != arrayLength_) - throw runtime_error((format("[IO::HandlerBinaryDataArray] At position %d: expected array of size %d, but decoded array is actually size %d.") - % position % arrayLength_ % binaryDataArray->data.size()).str()); - } - break; - - case MS_32_bit_integer: - case MS_64_bit_integer: - { - encoder.decode(text.c_str(), text.length(), integerDataArray->data); - - if (integerDataArray->data.size() != arrayLength_) - throw runtime_error((format("[IO::HandlerBinaryDataArray] At position %d: expected array of size %d, but decoded array is actually size %d.") - % position % arrayLength_ % integerDataArray->data.size()).str()); - } - break; - - case CVID_Unknown: - default: - throw runtime_error("[IO::HandlerBinaryDataArray] Unknown binary data type."); - } - - if (text.length() != encodedLength_) - throw runtime_error("[IO::HandlerBinaryDataArray] At position " + lexical_cast(position) + ": encoded lengths differ."); - - return Status::Ok; - } - - private: - - size_t arrayLength_; - size_t encodedLength_; - std::string external_dataset_; - size_t external_offset_; - - std::istream* is_; - - CVID extractCVParam(ParamContainer& container, CVID cvid) - { - vector& params = container.cvParams; - vector::iterator it = find_if(params.begin(), params.end(), - CVParamIsChildOf(cvid)); - - CVID result = CVID_Unknown; - - if (it != params.end()) - { - // found the cvid in container -- erase the CVParam - result = it->cvid; - params.erase(it); - } - else - { - // didn't find it -- search recursively, but don't erase anything - CVParam temp = container.cvParamChild(cvid); - result = temp.cvid; - } - - return result; - } - - template - bool extractCVParamValue(ParamContainer& container, CVID cvid, ValueT& value) - { - vector& params = container.cvParams; - vector::iterator it = find_if(params.begin(), params.end(), - CVParamIsChildOf(cvid)); - - if (it != params.end()) - { - // found the cvid in container -- erase the CVParam - value = lexical_cast(it->value); - params.erase(it); - } - else - { - // didn't find it -- search recursively, but don't erase anything - CVParam temp = container.cvParamChild(cvid); - if (temp.empty()) - return false; - value = lexical_cast(temp.value); - } - return true; - } - - void extractCVParams(ParamContainer& container, CVID cvid, vector &results) - { - vector& params = container.cvParams; - vector::iterator it; - while ((it = find_if(params.begin(), params.end(),CVParamIsChildOf(cvid))) != params.end()) - { - // found the cvid in container -- erase the CVParam - results.push_back(it->cvid); - params.erase(it); - } - - // also search recursively, but don't erase anything - vector CVParams = container.cvParamChildren(cvid); - BOOST_FOREACH(const CVParam& cvParam, CVParams) - results.push_back(cvParam.cvid); - } - - bool extractUserParam(ParamContainer& container, string name) - { - vector& params = container.userParams; - for (vector::iterator it = params.begin(); it != params.end(); it++) - { - if (it->name == name) - { - params.erase(it); - return true; - } - } - return false; - } - - bool extractUserParam(ParamContainer& container, string name, string& value) - { - vector& params = container.userParams; - for (vector::iterator it = params.begin(); it != params.end(); it++) - { - if (it->name == name) - { - value = it->value; - params.erase(it); - return true; - } - } - return false; - } - - BinaryDataEncoder::Config getConfig() - { - BinaryDataEncoder::Config config; - - // - // Note: these CVParams are really info about the encoding, and not - // part of the BinaryDataArray. We look at them to see how to decode the data, - // and remove them from the BinaryDataArray struct (extractCVParam does the removal). - // - - // prediction - bool prediction_linear = extractCVParam(paramContainer, MS_truncation__linear_prediction_and_zlib_compression) != CVID_Unknown; - bool prediction_delta = extractCVParam(paramContainer, MS_truncation__delta_prediction_and_zlib_compression) != CVID_Unknown; - if (prediction_linear) - config.prediction = BinaryDataEncoder::Prediction_Linear; - else if (prediction_delta) - config.prediction = BinaryDataEncoder::Prediction_Delta; - - cvidBinaryDataType = extractCVParam(paramContainer, MS_binary_data_type); - - // handle mix of zlib and numpress compression - CVID cvidCompressionType; - config.compression = BinaryDataEncoder::Compression_None; - config.numpress = BinaryDataEncoder::Numpress_None; - vector children; - extractCVParams(paramContainer, MS_binary_data_compression_type, children); - BOOST_FOREACH(cvidCompressionType,children) - { - switch (cvidCompressionType) - { - case MS_no_compression: - config.compression = BinaryDataEncoder::Compression_None; - break; - case MS_zlib_compression: - config.compression = BinaryDataEncoder::Compression_Zlib; - break; - case MS_MS_Numpress_linear_prediction_compression: - config.numpress = BinaryDataEncoder::Numpress_Linear; - break; - case MS_MS_Numpress_positive_integer_compression: - config.numpress = BinaryDataEncoder::Numpress_Pic; - break; - case MS_MS_Numpress_short_logged_float_compression: - config.numpress = BinaryDataEncoder::Numpress_Slof; - break; - case MS_MS_Numpress_linear_prediction_compression_followed_by_zlib_compression: - config.numpress = BinaryDataEncoder::Numpress_Linear; - config.compression = BinaryDataEncoder::Compression_Zlib; - break; - case MS_MS_Numpress_positive_integer_compression_followed_by_zlib_compression: - config.numpress = BinaryDataEncoder::Numpress_Pic; - config.compression = BinaryDataEncoder::Compression_Zlib; - break; - case MS_MS_Numpress_short_logged_float_compression_followed_by_zlib_compression: - config.numpress = BinaryDataEncoder::Numpress_Slof; - config.compression = BinaryDataEncoder::Compression_Zlib; - break; - default: - throw runtime_error("[IO::HandlerBinaryDataArray] Unknown compression type."); - } - } - - if (BinaryDataEncoder::Numpress_None != config.numpress) - switch (cvidBinaryDataType) - { - case MS_32_bit_integer: - cvidBinaryDataType = MS_32_bit_float; - break; - case MS_64_bit_integer: - cvidBinaryDataType = MS_64_bit_float; - break; - case CVID_Unknown: - throw runtime_error("[IO::HandlerBinaryDataArray] Unknown binary data type."); - default: - break; - } - - switch (cvidBinaryDataType) - { - case MS_32_bit_float: - case MS_32_bit_integer: - if (BinaryDataEncoder::Numpress_None == config.numpress) - config.precision = BinaryDataEncoder::Precision_32; - break; - case MS_64_bit_float: - case MS_64_bit_integer: - config.precision = BinaryDataEncoder::Precision_64; - break; - case CVID_Unknown: - if (BinaryDataEncoder::Numpress_None == config.numpress) // 32 vs 64 bit is meaningless in numpress - throw runtime_error("[IO::HandlerBinaryDataArray] Missing binary data type."); - break; - default: - throw runtime_error("[IO::HandlerBinaryDataArray] Unknown binary data type."); - } - - return config; - } - - - void predict() - { - switch (config.prediction) - { - case BinaryDataEncoder::Prediction_Delta: - switch (config.precision) - { - case BinaryDataEncoder::Precision_32: - for (size_t i = 2; i < binaryDataArray->data.size(); i++) binaryDataArray->data[i] = (float)binaryDataArray->data[i] + (float)binaryDataArray->data[i - 1] - (float)binaryDataArray->data[0]; - break; - case BinaryDataEncoder::Precision_64: - for (size_t i = 2; i < binaryDataArray->data.size(); i++) binaryDataArray->data[i] = binaryDataArray->data[i] + binaryDataArray->data[i - 1] - binaryDataArray->data[0]; - break; - } - break; - case BinaryDataEncoder::Prediction_Linear: - switch (config.precision) - { - case BinaryDataEncoder::Precision_32: - for (size_t i = 2; i < binaryDataArray->data.size(); i++) binaryDataArray->data[i] = (float)binaryDataArray->data[i] + 2.0f * (float)binaryDataArray->data[i - 1] - (float)binaryDataArray->data[i - 2] - (float)binaryDataArray->data[1]; - break; - case BinaryDataEncoder::Precision_64: - for (size_t i = 2; i < binaryDataArray->data.size(); i++) binaryDataArray->data[i] = binaryDataArray->data[i] + 2.0 * binaryDataArray->data[i - 1] - binaryDataArray->data[i - 2] - binaryDataArray->data[1]; - break; - } - break; - case BinaryDataEncoder::Prediction_None: - break; - } - } -}; - - -PWIZ_API_DECL void read(std::istream& is, std::vector& binaryDataArrayPtrs, std::vector& integerDataArrayPtrs, const MSData* msd) -{ - HandlerBinaryDataArray handler(&binaryDataArrayPtrs, &integerDataArrayPtrs, msd); - SAXParser::parse(is, handler); -} - - -// -// Spectrum -// - - -PWIZ_API_DECL -void write(minimxml::XMLWriter& writer, const Spectrum& spectrum, const MSData& msd, - const BinaryDataEncoder::Config& config) -{ - XMLWriter::Attributes attributes; - attributes.add("index", spectrum.index); - attributes.add("id", spectrum.id); // not an XML:ID - if (!spectrum.spotID.empty()) - attributes.add("spotID", spectrum.spotID); - - attributes.add("defaultArrayLength", spectrum.defaultArrayLength); - - if (spectrum.dataProcessingPtr.get()) - attributes.add("dataProcessingRef", encode_xml_id_copy(spectrum.dataProcessingPtr->id)); - if (spectrum.sourceFilePtr.get()) - attributes.add("sourceFileRef", encode_xml_id_copy(spectrum.sourceFilePtr->id)); - - writer.startElement("spectrum", attributes); - - writeParamContainer(writer, spectrum); - - write(writer, spectrum.scanList, msd); - - if (!spectrum.precursors.empty()) - { - XMLWriter::Attributes attributes; - attributes.add("count", spectrum.precursors.size()); - writer.startElement("precursorList", attributes); - - for (vector::const_iterator it=spectrum.precursors.begin(); - it!=spectrum.precursors.end(); ++it) - write(writer, *it); - - writer.endElement(); - } - - if (!spectrum.products.empty()) - { - XMLWriter::Attributes attributes; - attributes.add("count", spectrum.products.size()); - writer.startElement("productList", attributes); - - for (vector::const_iterator it=spectrum.products.begin(); - it!=spectrum.products.end(); ++it) - write(writer, *it); - - writer.endElement(); - } - - if (spectrum.binaryDataArrayPtrs.size() + spectrum.integerDataArrayPtrs.size() > 0) - { - attributes.clear(); - attributes.add("count", spectrum.binaryDataArrayPtrs.size() + spectrum.integerDataArrayPtrs.size()); - writer.startElement("binaryDataArrayList", attributes); - - BinaryDataEncoder::Config updated_config = config; - updated_config.type = BinaryDataEncoder::Type_Spectrum; - - for (const auto& itr : spectrum.binaryDataArrayPtrs) - writeBinaryDataArray(writer, *itr, updated_config); - - for (const auto& itr : spectrum.integerDataArrayPtrs) - writeBinaryDataArray(writer, *itr, updated_config); - - writer.endElement(); // binaryDataArrayList - } - - writer.endElement(); // spectrum -} - - -struct HandlerSpectrum : public HandlerParamContainer -{ - BinaryDataFlag binaryDataFlag; - Spectrum* spectrum; - const SpectrumIdentityFromXML *spectrumID; - const map* legacyIdRefToNativeId; - const MSData* msd; - - HandlerSpectrum(BinaryDataFlag _binaryDataFlag, - Spectrum* _spectrum = 0, - const map* legacyIdRefToNativeId = 0, - const MSData* _msd = 0, - const SpectrumIdentityFromXML *_spectrumID = 0, - std::istream* is = 0) - : binaryDataFlag(_binaryDataFlag), - spectrum(_spectrum), - spectrumID(_spectrumID), - legacyIdRefToNativeId(legacyIdRefToNativeId), - msd(_msd), - handlerPrecursor_(0, legacyIdRefToNativeId), - handlerBinaryDataArray_(0, 0, 0, is) - { - } - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!spectrum) - throw runtime_error("[IO::HandlerSpectrum] Null spectrum."); - - if (name != "cvParam") // the most common, but not handled here - { - if (name == "spectrum") - { - spectrum->sourceFilePosition = position; - - getAttribute(attributes, "index", spectrum->index); - getAttribute(attributes, "spotID", spectrum->spotID); - getAttribute(attributes, "defaultArrayLength", spectrum->defaultArrayLength); - getAttribute(attributes, "id", spectrum->id); // not an XML:ID - - // mzML 1.0 - if (version == 1 && legacyIdRefToNativeId) - { - map::const_iterator itr = legacyIdRefToNativeId->find(spectrum->id); - if (itr != legacyIdRefToNativeId->end()) - spectrum->id = itr->second; - } - - // note: placeholder - string dataProcessingRef; - decode_xml_id(getAttribute(attributes, "dataProcessingRef", dataProcessingRef)); - if (!dataProcessingRef.empty()) - spectrum->dataProcessingPtr = DataProcessingPtr(new DataProcessing(dataProcessingRef)); - - // note: placeholder - string sourceFileRef; - decode_xml_id(getAttribute(attributes, "sourceFileRef", sourceFileRef)); - if (!sourceFileRef.empty()) - spectrum->sourceFilePtr = SourceFilePtr(new SourceFile(sourceFileRef)); - - return Status::Ok; - } - else if (version == 1 && name == "acquisitionList" /* mzML 1.0 */ || name == "scanList") - { - handlerScanList_.scanList = &spectrum->scanList; - handlerScanList_.version = version; - return Status(Status::Delegate, &handlerScanList_); - } - else if (name == "precursorList" || name == "productList") - { - return Status::Ok; - } - else if (name == "precursor") - { - spectrum->precursors.push_back(Precursor()); - handlerPrecursor_.precursor = &spectrum->precursors.back(); - handlerPrecursor_.version = version; - return Status(Status::Delegate, &handlerPrecursor_); - } - else if (name == "product") - { - spectrum->products.push_back(Product()); - handlerProduct_.product = &spectrum->products.back(); - return Status(Status::Delegate, &handlerProduct_); - } - else if (name == "binaryDataArray") - { - handlerBinaryDataArray_.binaryDataArrayPtrs = &spectrum->binaryDataArrayPtrs; - handlerBinaryDataArray_.integerDataArrayPtrs = &spectrum->integerDataArrayPtrs; - handlerBinaryDataArray_.defaultArrayLength = &spectrum->defaultArrayLength; - handlerBinaryDataArray_.msd = msd; - handlerBinaryDataArray_.binaryDataFlag = binaryDataFlag; - return Status(Status::Delegate, &handlerBinaryDataArray_); - } - else if (name == "binaryDataArrayList") - { - // pretty likely to come right back here and read the - // binary data once the header info has been inspected, - // so note position - if (spectrumID) { - spectrumID->sourceFilePositionForBinarySpectrumData = position; - } - return Status::Ok; - } - else if (version == 1 && name == "spectrumDescription") // mzML 1.0 - { - // read cvParams, userParams, and referenceableParamGroups in into - return Status::Ok; - } - else if (version == 1 && name == "scan") // mzML 1.0 - { - spectrum->scanList.scans.push_back(Scan()); - handlerScan_.version = version; - handlerScan_.scan = &spectrum->scanList.scans.back(); - return Status(Status::Delegate, &handlerScan_); - } - } // end if name != cvParam - - HandlerParamContainer::paramContainer = spectrum; - return HandlerParamContainer::startElement(name, attributes, position); - } - - private: - HandlerScanList handlerScanList_; - HandlerPrecursor handlerPrecursor_; - HandlerProduct handlerProduct_; - HandlerBinaryDataArray handlerBinaryDataArray_; - HandlerScan handlerScan_; -}; - - -PWIZ_API_DECL void read(std::istream& is, Spectrum& spectrum, - BinaryDataFlag binaryDataFlag, - int version, - const map* legacyIdRefToNativeId, - const MSData* msd, - const SpectrumIdentityFromXML *id) -{ - HandlerSpectrum handler(binaryDataFlag, &spectrum, legacyIdRefToNativeId, msd, id, &is); - handler.version = version; - SAXParser::parse(is, handler); -} - - -// -// Chromatogram -// - - -PWIZ_API_DECL -void write(minimxml::XMLWriter& writer, const Chromatogram& chromatogram, - const BinaryDataEncoder::Config& config) -{ - XMLWriter::Attributes attributes; - attributes.add("index", chromatogram.index); - attributes.add("id", chromatogram.id); // not an XML:ID - - - attributes.add("defaultArrayLength", chromatogram.defaultArrayLength); - - - if (chromatogram.dataProcessingPtr.get()) - attributes.add("dataProcessingRef", encode_xml_id_copy(chromatogram.dataProcessingPtr->id)); - - writer.startElement("chromatogram", attributes); - - writeParamContainer(writer, chromatogram); - - if (!chromatogram.precursor.empty()) - write(writer, chromatogram.precursor); - - if (!chromatogram.product.empty()) - write(writer, chromatogram.product); - - if (chromatogram.binaryDataArrayPtrs.size() + chromatogram.integerDataArrayPtrs.size() > 0) - { - attributes.clear(); - attributes.add("count", chromatogram.binaryDataArrayPtrs.size() + chromatogram.integerDataArrayPtrs.size()); - writer.startElement("binaryDataArrayList", attributes); - - BinaryDataEncoder::Config updated_config = config; - updated_config.type = BinaryDataEncoder::Type_Chromatogram; - - for (const auto& itr : chromatogram.binaryDataArrayPtrs) - writeBinaryDataArray(writer, *itr, updated_config); - - for (const auto& itr : chromatogram.integerDataArrayPtrs) - writeBinaryDataArray(writer, *itr, updated_config); - - writer.endElement(); // binaryDataArrayList - } - - writer.endElement(); // spectrum -} - - -struct HandlerChromatogram : public HandlerParamContainer -{ - BinaryDataFlag binaryDataFlag; - Chromatogram* chromatogram; - - HandlerChromatogram(BinaryDataFlag _binaryDataFlag, - Chromatogram* _chromatogram = 0, - std::istream* is = 0) - : binaryDataFlag(_binaryDataFlag), - chromatogram(_chromatogram), - handlerBinaryDataArray_(0, 0, 0, is) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!chromatogram) - throw runtime_error("[IO::HandlerChromatogram] Null chromatogram."); - - if (name == "chromatogram") - { - chromatogram->sourceFilePosition = position; - - getAttribute(attributes, "id", chromatogram->id); // not an XML:ID - getAttribute(attributes, "index", chromatogram->index); - getAttribute(attributes, "defaultArrayLength", chromatogram->defaultArrayLength); - - // note: placeholder - string dataProcessingRef; - decode_xml_id(getAttribute(attributes, "dataProcessingRef", dataProcessingRef)); - if (!dataProcessingRef.empty()) - chromatogram->dataProcessingPtr = DataProcessingPtr(new DataProcessing(dataProcessingRef)); - - return Status::Ok; - } - else if (name == "precursor") - { - handlerPrecursor_.precursor = &chromatogram->precursor; - return Status(Status::Delegate, &handlerPrecursor_); - } - else if (name == "product") - { - handlerProduct_.product = &chromatogram->product; - return Status(Status::Delegate, &handlerProduct_); - } - else if (name == "binaryDataArray") - { - handlerBinaryDataArray_.binaryDataArrayPtrs = &chromatogram->binaryDataArrayPtrs; - handlerBinaryDataArray_.integerDataArrayPtrs = &chromatogram->integerDataArrayPtrs; - handlerBinaryDataArray_.defaultArrayLength = &chromatogram->defaultArrayLength; - handlerBinaryDataArray_.binaryDataFlag = binaryDataFlag; - return Status(Status::Delegate, &handlerBinaryDataArray_); - } - else if (name == "binaryDataArrayList") - { - return Status::Ok; - } - - HandlerParamContainer::paramContainer = chromatogram; - return HandlerParamContainer::startElement(name, attributes, position); - } - - private: - - HandlerPrecursor handlerPrecursor_; - HandlerProduct handlerProduct_; - HandlerBinaryDataArray handlerBinaryDataArray_; -}; - - -PWIZ_API_DECL void read(std::istream& is, Chromatogram& chromatogram, - BinaryDataFlag binaryDataFlag) -{ - HandlerChromatogram handler(binaryDataFlag, &chromatogram, &is); - SAXParser::parse(is, handler); -} - - -// -// SpectrumList -// - - -PWIZ_API_DECL -void write(minimxml::XMLWriter& writer, const SpectrumList& spectrumList, const MSData& msd, - const BinaryDataEncoder::Config& config, - vector* spectrumPositions, - const IterationListenerRegistry* iterationListenerRegistry, - bool useWorkerThreads, bool continueOnError) -{ - XMLWriter::Attributes attributes; - attributes.add("count", spectrumList.size()); - - if (spectrumList.dataProcessingPtr().get()) - attributes.push_back(make_pair("defaultDataProcessingRef", - spectrumList.dataProcessingPtr()->id)); - - writer.startElement("spectrumList", attributes); // required by schema, even if empty - - SpectrumWorkerThreads spectrumWorkers(spectrumList, useWorkerThreads, continueOnError); - - int skipped = 0; - for (size_t i=0; ibroadcastUpdateMessage( - IterationListener::UpdateMessage(i, spectrumList.size(), "writing spectra")); - - if (status == IterationListener::Status_Cancel) - break; - - // get the spectrum - SpectrumPtr spectrum; - try - { - //spectrum = spectrumList.spectrum(i, true); - spectrum = spectrumWorkers.processBatch(i); - } - catch (std::exception& e) - { - if (continueOnError) - { - cerr << "Skipping spectrum " << i << " \"" << (spectrum ? spectrum->id : spectrumList.spectrumIdentity(i).id) << "\": " << e.what() << endl; - ++skipped; - if (spectrumPositions) - spectrumPositions->push_back(-1); - continue; - } - else - throw; - } - - // save write position - if (spectrumPositions) - spectrumPositions->push_back(writer.positionNext()); - - // write the spectrum - BOOST_ASSERT(spectrum->binaryDataArrayPtrs.empty() || - spectrum->defaultArrayLength == spectrum->getMZArray()->data.size()); - if (spectrum->index != i) throw runtime_error("[IO::write(SpectrumList)] Bad index."); - spectrum->index -= skipped; - write(writer, *spectrum, msd, config); - spectrum->index += skipped; // restore original index in case the spectrum is held in memory and the same spectrum is written again - } - - - writer.endElement(); -} - - -struct HandlerSpectrumListSimple : public HandlerParamContainer -{ - SpectrumListSimple* spectrumListSimple; - - HandlerSpectrumListSimple(SpectrumListSimple* _spectrumListSimple = 0) - : spectrumListSimple(_spectrumListSimple), - handlerSpectrum_(ReadBinaryData) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!spectrumListSimple) - throw runtime_error("[IO::HandlerSpectrumListSimple] Null spectrumListSimple."); - - if (name == "spectrumList") - { - // note: placeholder - string defaultDataProcessingRef; - decode_xml_id(getAttribute(attributes, "defaultDataProcessingRef", defaultDataProcessingRef)); - if (!defaultDataProcessingRef.empty()) - spectrumListSimple->dp = DataProcessingPtr(new DataProcessing(defaultDataProcessingRef)); - - return Status::Ok; - } - else if (name == "spectrum") - { - spectrumListSimple->spectra.push_back(SpectrumPtr(new Spectrum)); - handlerSpectrum_.version = version; - handlerSpectrum_.spectrum = spectrumListSimple->spectra.back().get(); - return Status(Status::Delegate, &handlerSpectrum_); - } - - throw runtime_error(("[IO::HandlerSpectrumListSimple] Unexpected element name: " + name).c_str()); - } - - private: - HandlerSpectrum handlerSpectrum_; -}; - - -PWIZ_API_DECL void read(std::istream& is, SpectrumListSimple& spectrumListSimple) -{ - HandlerSpectrumListSimple handler(&spectrumListSimple); - SAXParser::parse(is, handler); -} - - -// -// ChromatogramList -// - - -PWIZ_API_DECL -void write(minimxml::XMLWriter& writer, const ChromatogramList& chromatogramList, - const BinaryDataEncoder::Config& config, - vector* chromatogramPositions, - const IterationListenerRegistry* iterationListenerRegistry, - bool continueOnError) -{ - if (chromatogramList.empty()) // chromatogramList not required by schema - return; - - XMLWriter::Attributes attributes; - attributes.add("count", chromatogramList.size()); - - if (chromatogramList.dataProcessingPtr().get()) - attributes.push_back(make_pair("defaultDataProcessingRef", - chromatogramList.dataProcessingPtr()->id)); - - writer.startElement("chromatogramList", attributes); - - int skipped = 0; - for (size_t i=0; ibroadcastUpdateMessage( - IterationListener::UpdateMessage(i, chromatogramList.size(), "writing chromatograms")); - - if (status == IterationListener::Status_Cancel) - break; - - // get the chromatogram - ChromatogramPtr chromatogram; - try - { - chromatogram = chromatogramList.chromatogram(i, true); - } - catch (std::exception& e) - { - if (continueOnError) - { - cerr << "Skipping chromatogram " << i << " \"" << (chromatogram ? chromatogram->id : chromatogramList.chromatogramIdentity(i).id) << "\": " << e.what() << endl; - ++skipped; - if (chromatogramPositions) - chromatogramPositions->push_back(-1); - continue; - } - throw; - } - - // save write position - if (chromatogramPositions) - chromatogramPositions->push_back(writer.positionNext()); - - // write the chromatogram - if (chromatogram->index != i) throw runtime_error("[IO::write(ChromatogramList)] Bad index."); - chromatogram->index -= skipped; - write(writer, *chromatogram, config); - chromatogram->index += skipped; // restore original index in case same chromatogram is written again - } - - - writer.endElement(); -} - - -struct HandlerChromatogramListSimple : public HandlerParamContainer -{ - ChromatogramListSimple* chromatogramListSimple; - - HandlerChromatogramListSimple(ChromatogramListSimple* _chromatogramListSimple = 0) - : chromatogramListSimple(_chromatogramListSimple), - handlerChromatogram_(ReadBinaryData) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!chromatogramListSimple) - throw runtime_error("[IO::HandlerChromatogramListSimple] Null chromatogramListSimple."); - - if (name == "chromatogramList") - { - // note: placeholder - string defaultDataProcessingRef; - decode_xml_id(getAttribute(attributes, "defaultDataProcessingRef", defaultDataProcessingRef)); - if (!defaultDataProcessingRef.empty()) - chromatogramListSimple->dp = DataProcessingPtr(new DataProcessing(defaultDataProcessingRef)); - - return Status::Ok; - } - else if (name == "chromatogram") - { - chromatogramListSimple->chromatograms.push_back(ChromatogramPtr(new Chromatogram)); - handlerChromatogram_.chromatogram = chromatogramListSimple->chromatograms.back().get(); - return Status(Status::Delegate, &handlerChromatogram_); - } - - throw runtime_error(("[IO::HandlerChromatogramListSimple] Unexpected element name: " + name).c_str()); - } - - private: - HandlerChromatogram handlerChromatogram_; -}; - - -PWIZ_API_DECL void read(std::istream& is, ChromatogramListSimple& chromatogramListSimple) -{ - HandlerChromatogramListSimple handler(&chromatogramListSimple); - SAXParser::parse(is, handler); -} - - -// -// Run -// - - -PWIZ_API_DECL -void write(minimxml::XMLWriter& writer, const Run& run, const MSData& msd, - const BinaryDataEncoder::Config& config, - vector* spectrumPositions, - vector* chromatogramPositions, - const pwiz::util::IterationListenerRegistry* iterationListenerRegistry, - bool useWorkerThreads, bool continueOnError) -{ - XMLWriter::Attributes attributes; - attributes.add("id", encode_xml_id_copy(run.id)); - - // defaultInstrumentConfigurationPtr is mandatory for schematic validity; - // at least one (possibly unknown) instrument configuration is mandatory for schematic validity; - // therefore we set this attribute to a reasonable default if the client didn't set it - if (run.defaultInstrumentConfigurationPtr.get()) - attributes.add("defaultInstrumentConfigurationRef", encode_xml_id_copy(run.defaultInstrumentConfigurationPtr->id)); - else if (!msd.instrumentConfigurationPtrs.empty()) - attributes.add("defaultInstrumentConfigurationRef", encode_xml_id_copy(msd.instrumentConfigurationPtrs.front()->id)); - else - attributes.add("defaultInstrumentConfigurationRef", "IC"); - - if (run.samplePtr.get()) - attributes.add("sampleRef", encode_xml_id_copy(run.samplePtr->id)); - if (!run.startTimeStamp.empty()) - attributes.add("startTimeStamp", run.startTimeStamp); - if (run.defaultSourceFilePtr.get()) - attributes.add("defaultSourceFileRef", encode_xml_id_copy(run.defaultSourceFilePtr->id)); - - writer.startElement("run", attributes); - - writeParamContainer(writer, run); - - bool hasSpectrumList = run.spectrumListPtr.get() && run.spectrumListPtr->size() > 0; - bool hasChromatogramList = run.chromatogramListPtr.get() && run.chromatogramListPtr->size() > 0; - - if (hasSpectrumList) - write(writer, *run.spectrumListPtr, msd, config, spectrumPositions, iterationListenerRegistry, useWorkerThreads, continueOnError); - - if (hasChromatogramList) - write(writer, *run.chromatogramListPtr, config, chromatogramPositions, iterationListenerRegistry, continueOnError); - - writer.endElement(); -} - - -struct HandlerRun : public HandlerParamContainer -{ - SpectrumListFlag spectrumListFlag; - Run* run; - - HandlerRun(SpectrumListFlag _spectrumListFlag, Run* _run = 0) - : spectrumListFlag(_spectrumListFlag), run(_run) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!run) - throw runtime_error("[IO::HandlerRun] Null run."); - - if (name == "run") - { - decode_xml_id(getAttribute(attributes, "id", run->id)); - getAttribute(attributes, "startTimeStamp", run->startTimeStamp); - - // note: placeholder - string defaultInstrumentConfigurationRef; - decode_xml_id(getAttribute(attributes, "defaultInstrumentConfigurationRef", defaultInstrumentConfigurationRef)); - if (!defaultInstrumentConfigurationRef.empty()) - run->defaultInstrumentConfigurationPtr = InstrumentConfigurationPtr(new InstrumentConfiguration(defaultInstrumentConfigurationRef)); - - // note: placeholder - string sampleRef; - decode_xml_id(getAttribute(attributes, "sampleRef", sampleRef)); - if (!sampleRef.empty()) - run->samplePtr = SamplePtr(new Sample(sampleRef)); - - // note: placeholder - string defaultSourceFileRef; - decode_xml_id(getAttribute(attributes, "defaultSourceFileRef", defaultSourceFileRef)); - if (!defaultSourceFileRef.empty()) - run->defaultSourceFilePtr = SourceFilePtr(new SourceFile(defaultSourceFileRef)); - - return Status::Ok; - } - else if (name == "spectrumList") - { - if (spectrumListFlag == IgnoreSpectrumList) - return Status::Done; - - shared_ptr temp(new SpectrumListSimple); - handlerSpectrumListSimple_.spectrumListSimple = temp.get(); - run->spectrumListPtr = temp; - return Status(Status::Delegate, &handlerSpectrumListSimple_); - } - else if (name == "chromatogramList") - { - shared_ptr temp(new ChromatogramListSimple); - handlerChromatogramListSimple_.chromatogramListSimple = temp.get(); - run->chromatogramListPtr = temp; - return Status(Status::Delegate, &handlerChromatogramListSimple_); - } - else if (version == 1 && name == "sourceFileRefList") - { - return Status::Ok; - } - else if (version == 1 && name == "sourceFileRef") - { - // note: placeholder - string sourceFileRef; - decode_xml_id(getAttribute(attributes, "ref", sourceFileRef)); - if (!sourceFileRef.empty()) - run->defaultSourceFilePtr = SourceFilePtr(new SourceFile(sourceFileRef)); - return Status::Ok; - } - - HandlerParamContainer::paramContainer = run; - return HandlerParamContainer::startElement(name, attributes, position); - } - - private: - HandlerSpectrumListSimple handlerSpectrumListSimple_; - HandlerChromatogramListSimple handlerChromatogramListSimple_; -}; - - -PWIZ_API_DECL -void read(std::istream& is, Run& run, - SpectrumListFlag spectrumListFlag) -{ - HandlerRun handler(spectrumListFlag, &run); - SAXParser::parse(is, handler); -} - - -// -// MSData -// - - -PWIZ_API_DECL -void write(minimxml::XMLWriter& writer, const MSData& msd, - const BinaryDataEncoder::Config& config, - vector* spectrumPositions, - vector* chromatogramPositions, - const pwiz::util::IterationListenerRegistry* iterationListenerRegistry, - bool useWorkerThreads, bool continueOnError) -{ - XMLWriter::Attributes attributes; - attributes.add("xmlns", "http://psi.hupo.org/ms/mzml"); - attributes.add("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); - attributes.add("xsi:schemaLocation", "http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML" + msd.version() + ".xsd"); - if (!msd.accession.empty()) - attributes.add("accession", msd.accession); - attributes.add("id", msd.id); // not an XML:ID - attributes.add("version", msd.version()); - - writer.startElement("mzML", attributes); - - if (!msd.cvs.empty()) - { - attributes.clear(); - attributes.add("count", msd.cvs.size()); - writer.startElement("cvList", attributes); - for (vector::const_iterator it=msd.cvs.begin(); it!=msd.cvs.end(); ++it) - write(writer, *it); - writer.endElement(); - } - - write(writer, msd.fileDescription); - - writeList(writer, msd.paramGroupPtrs, "referenceableParamGroupList"); - writeList(writer, msd.samplePtrs, "sampleList"); - writeList(writer, msd.softwarePtrs, "softwareList"); - writeList(writer, msd.scanSettingsPtrs, "scanSettingsList"); - - // instrumentConfigurationList and at least one instrumentConfiguration is mandatory for schematic validity - if (msd.instrumentConfigurationPtrs.empty()) - { - // the base term "instrument model" indicates the instrument is unknown - vector list(1, InstrumentConfigurationPtr(new InstrumentConfiguration("IC"))); - list.back()->set(MS_instrument_model); - writeList(writer, list, "instrumentConfigurationList"); - } - else - writeList(writer, msd.instrumentConfigurationPtrs, "instrumentConfigurationList"); - - writeList(writer, msd.allDataProcessingPtrs(), "dataProcessingList"); - - write(writer, msd.run, msd, config, spectrumPositions, chromatogramPositions, iterationListenerRegistry, useWorkerThreads, continueOnError); - - writer.endElement(); -} - - -struct HandlerMSData : public SAXParser::Handler -{ - MSData* msd; - - HandlerMSData(SpectrumListFlag spectrumListFlag, MSData* _msd = 0) - : msd(_msd), handlerRun_(spectrumListFlag) - {} - - virtual Status startElement(const string& name, - const Attributes& attributes, - stream_offset position) - { - if (!msd) - throw runtime_error("[IO::HandlerMSData] Null msd."); - - if (name == "mzML") - { - getAttribute(attributes, "accession", msd->accession); - getAttribute(attributes, "id", msd->id); // not an XML:ID - - // "http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML.xsd" - string schemaLocation; - getAttribute(attributes, "xsi:schemaLocation", schemaLocation); - if (schemaLocation.empty()) - getAttribute(attributes, "version", msd->version_); // deprecated? - else - { - schemaLocation = schemaLocation.substr(schemaLocation.find(' ')+1); - string xsdName = BFS_STRING(bfs::path(schemaLocation).filename()); - msd->version_ = xsdName.substr(4, xsdName.length()-8); // read between "mzML" and ".xsd" - } - - if (msd->version_.find("1.0") == 0) - version = 1; - - return Status::Ok; - } - else if (name == "cvList" || - name == "referenceableParamGroupList" || - name == "sampleList" || - name == "instrumentConfigurationList" || - name == "softwareList" || - name == "dataProcessingList" || - (version == 1 && name == "acquisitionSettingsList") /* mzML 1.0 */ || - name == "scanSettingsList") - { - // ignore these, unless we want to validate the count attribute - return Status::Ok; - } - else if (name == "cv") - { - msd->cvs.push_back(CV()); - handlerCV_.cv = &msd->cvs.back(); - return Status(Status::Delegate, &handlerCV_); - } - else if (name == "fileDescription") - { - handlerFileDescription_.fileDescription = &msd->fileDescription; - return Status(Status::Delegate, &handlerFileDescription_); - } - else if (name == "referenceableParamGroup") - { - msd->paramGroupPtrs.push_back(ParamGroupPtr(new ParamGroup)); - handlerParamGroup_.paramGroup = msd->paramGroupPtrs.back().get(); - return Status(Status::Delegate, &handlerParamGroup_); - } - else if (name == "sample") - { - msd->samplePtrs.push_back(SamplePtr(new Sample)); - handlerSample_.sample = msd->samplePtrs.back().get(); - return Status(Status::Delegate, &handlerSample_); - } - else if (name == "instrumentConfiguration") - { - msd->instrumentConfigurationPtrs.push_back(InstrumentConfigurationPtr(new InstrumentConfiguration)); - handlerInstrumentConfiguration_.instrumentConfiguration = msd->instrumentConfigurationPtrs.back().get(); - return Status(Status::Delegate, &handlerInstrumentConfiguration_); - } - else if (name == "software") - { - msd->softwarePtrs.push_back(SoftwarePtr(new Software)); - handlerSoftware_.version = version; - handlerSoftware_.software = msd->softwarePtrs.back().get(); - return Status(Status::Delegate, &handlerSoftware_); - } - else if (name == "dataProcessing") - { - msd->dataProcessingPtrs.push_back(DataProcessingPtr(new DataProcessing)); - handlerDataProcessing_.version = version; - handlerDataProcessing_.dataProcessing = msd->dataProcessingPtrs.back().get(); - return Status(Status::Delegate, &handlerDataProcessing_); - } - else if (version == 1 && name == "acquisitionSettings" /* mzML 1.0 */ || - name == "scanSettings") - { - msd->scanSettingsPtrs.push_back(ScanSettingsPtr(new ScanSettings)); - handlerScanSettings_.version = version; - handlerScanSettings_.scanSettings = msd->scanSettingsPtrs.back().get(); - return Status(Status::Delegate, &handlerScanSettings_); - } - else if (name == "run") - { - handlerRun_.version = version; - handlerRun_.run = &msd->run; - return Status(Status::Delegate, &handlerRun_); - } - - throw runtime_error(("[IO::HandlerMSData] Unexpected element name: " + name).c_str()); - } - - private: - HandlerCV handlerCV_; - HandlerFileDescription handlerFileDescription_; - HandlerParamGroup handlerParamGroup_; - HandlerSample handlerSample_; - HandlerInstrumentConfiguration handlerInstrumentConfiguration_; - HandlerSoftware handlerSoftware_; - HandlerDataProcessing handlerDataProcessing_; - HandlerScanSettings handlerScanSettings_; - HandlerRun handlerRun_; -}; - - -PWIZ_API_DECL -void read(std::istream& is, MSData& msd, - SpectrumListFlag spectrumListFlag) -{ - HandlerMSData handler(spectrumListFlag, &msd); - SAXParser::parse(is, handler); - References::resolve(msd); -} - - -} // namespace IO -} // namespace msdata -} // namespace pwiz - - diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/IO.cpp libpwizlite-3.0.15/src/pwiz/data/msdata/IO.cpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/IO.cpp 2024-05-15 21:36:35.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/IO.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -1618,6 +1618,7 @@ // BinaryData // +#ifndef WITHOUT_MZMLB template void writeMzMLbExtra(stream* mzMLb_os, string& dataset, size_t& offset, const string& encoded, XMLWriter& writer, const BinaryDataArrayType& binaryDataArray, const BinaryDataEncoder::Config& usedConfig) { @@ -1626,8 +1627,6 @@ template <> void writeMzMLbExtra(stream* mzMLb_os, string& dataset, size_t& offset, const string& encoded, XMLWriter& writer, const BinaryDataArray& binaryDataArray, const BinaryDataEncoder::Config& usedConfig) { -#ifndef WITHOUT_MZMLB - size_t encoded_size = encoded.size(); // mzMLb, including truncation and prediction, from andrew.dowsey@bristol.ac.uk @@ -1813,14 +1812,11 @@ (*mzMLb_os)->write(dataset, &double_data[0], double_data.size()); } } -#endif } template <> void writeMzMLbExtra(stream* mzMLb_os, string& dataset, size_t& offset, const string& encoded, XMLWriter& writer, const IntegerDataArray& binaryDataArray, const BinaryDataEncoder::Config& usedConfig) { -#ifndef WITHOUT_MZMLB - size_t encoded_size = encoded.size(); if (mzMLb_os) @@ -1848,8 +1844,8 @@ (*mzMLb_os)->write(dataset, &int_data[0], int_data.size()); } } -#endif } +#endif template void writeBinaryDataArray(minimxml::XMLWriter& writer, const BinaryDataArrayType& binaryDataArray, const BinaryDataEncoder::Config& config) @@ -1893,8 +1889,10 @@ size_t encoded_size = encoded.size(); string dataset; +#ifndef WITHOUT_MZMLB size_t offset; writeMzMLbExtra(mzMLb_os, dataset, offset, encoded, writer, binaryDataArray, usedConfig); +#endif // primary array types can never override the default array length if (!binaryDataArray.hasCVParam(MS_m_z_array) && @@ -2364,7 +2362,11 @@ // when numpress is off, it is used to indicate the original array type // if numpress is on, make sure Numpress PIC arrays are directed to BinaryDataArray instead of IntegerDataArray +#ifdef WITHOUT_MZMLB + auto mzMLb_is = false; +#else auto mzMLb_is = dynamic_cast*>(is_); +#endif if (BinaryDataEncoder::Numpress_None != config.numpress && !mzMLb_is) switch (cvidBinaryDataType) { diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/MSData.cpp libpwizlite-3.0.15/src/pwiz/data/msdata/MSData.cpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/MSData.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/MSData.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -820,7 +820,7 @@ /// set m/z and intensity arrays separately (they must be the same size) by swapping the vector contents /// this allows for a more nearly zero copy setup. Contents of mzArray and intensityArray are undefined after calling. -PWIZ_API_DECL void Spectrum::swapMZIntensityArrays(pwiz::util::BinaryData& mzArray, pwiz::util::BinaryData& intensityArray, CVID intensityUnits) +PWIZ_API_DECL void Spectrum::swapMZIntensityArrays(pwiz::util::BinaryData& mzArray, pwiz::util::BinaryData& intensityArray, CVID intensityUnits, CVID mzUnits) { if (mzArray.size() != intensityArray.size()) throw runtime_error("[MSData::Spectrum::swapMZIntensityArrays()] Sizes do not match."); @@ -833,9 +833,22 @@ if (!bd_mz.get()) { + CVID arrayTypeId; + + switch (mzUnits) + { + case UO_nanometer: + arrayTypeId = MS_wavelength_array; + break; + + default: + arrayTypeId = MS_m_z_array; + break; + } + bd_mz = BinaryDataArrayPtr(new BinaryDataArray); - CVParam arrayType(MS_m_z_array); - arrayType.units = MS_m_z; + CVParam arrayType(arrayTypeId); + arrayType.units = mzUnits; bd_mz->cvParams.push_back(arrayType); binaryDataArrayPtrs.push_back(bd_mz); } diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/MSData.hpp libpwizlite-3.0.15/src/pwiz/data/msdata/MSData.hpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/MSData.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/MSData.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -590,7 +590,7 @@ /// set m/z and intensity arrays separately (they must be the same size) by swapping the vector contents /// this allows for a more nearly zero copy setup. Contents of mzArray and intensityArray are undefined after calling. - void swapMZIntensityArrays(pwiz::util::BinaryData& mzArray, pwiz::util::BinaryData& intensityArray, CVID intensityUnits); + void swapMZIntensityArrays(pwiz::util::BinaryData& mzArray, pwiz::util::BinaryData& intensityArray, CVID intensityUnits, CVID mzUnits = MS_m_z); }; diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/Reader.cpp libpwizlite-3.0.15/src/pwiz/data/msdata/Reader.cpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/Reader.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/Reader.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -76,6 +76,13 @@ globalChromatogramsAreMs1Only = rhs.globalChromatogramsAreMs1Only; } +void Reader::Config::instrumentMetadataError(const std::string& msg) const +{ + if (unknownInstrumentIsError) + throw runtime_error(msg + string("; if you want to convert the file anyway, use the ignoreUnknownInstrumentError flag")); + cerr << msg << endl; +} + // default implementation; most Readers don't need to worry about multi-run input files PWIZ_API_DECL void Reader::readIds(const string& filename, const string& head, vector& results, const Config& config) const { diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/Reader.hpp libpwizlite-3.0.15/src/pwiz/data/msdata/Reader.hpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/Reader.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/Reader.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -98,6 +98,8 @@ Config(); Config(const Config& rhs); + + void instrumentMetadataError(const std::string& msg) const; }; diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/Serializer_MGF.cpp libpwizlite-3.0.15/src/pwiz/data/msdata/Serializer_MGF.cpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/Serializer_MGF.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/Serializer_MGF.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -96,7 +96,7 @@ throw; } - Scan* scan = !s->scanList.empty() ? &s->scanList.scans[0] : 0; + const Scan& scan = !s->scanList.empty() ? s->scanList.scans[0] : Scan(); if (s->cvParam(MS_ms_level).valueAs() > 1 && !s->precursors.empty() && @@ -105,19 +105,32 @@ os << "BEGIN IONS\n"; const SelectedIon& si = s->precursors[0].selectedIons[0]; - CVParam scanTimeParam = scan ? scan->cvParam(MS_scan_start_time) : CVParam(); + CVParam scanTimeParam = scan.cvParam(MS_scan_start_time); CVParam chargeParam = si.cvParam(MS_charge_state); CVParam spectrumTitle = s->cvParam(MS_spectrum_title); if (!spectrumTitle.empty()) - os << "TITLE=" << spectrumTitle.value << '\n'; + os << "TITLE=" << spectrumTitle.value; else if (titleIsThermoDTA) { - string scan = id::value(s->id, "scan"); - os << "TITLE=" << thermoBasename << '.' << scan << '.' << scan << '.' << chargeParam.value << '\n'; + string scan_string = id::value(s->id, "scan"); + os << "TITLE=" << thermoBasename << '.' << scan_string << '.' << scan_string << '.' << chargeParam.value; } else - os << "TITLE=" << s->id << '\n'; + os << "TITLE=" << s->id; + + CVParam collisionalCrossSectionalArea = scan.cvParam(MS_collisional_cross_sectional_area); + if (collisionalCrossSectionalArea.empty()) + collisionalCrossSectionalArea = si.cvParam(MS_collisional_cross_sectional_area); + + if (!collisionalCrossSectionalArea.empty()) + { + os << ", " << "ccs=" << collisionalCrossSectionalArea.valueFixedNotation() << '\n'; + } + else + { + os << '\n'; + } if (!scanTimeParam.empty()) os << "RTINSECONDS=" << scanTimeParam.timeInSeconds() << '\n'; @@ -132,6 +145,11 @@ os << " " << intensityParam.valueFixedNotation(); os << '\n'; + CVParam inverseReduceIonMobility = scan.cvParam(MS_inverse_reduced_ion_mobility); + if (!inverseReduceIonMobility.empty()) + os << "ION_MOBILITY=" << si.cvParam(MS_selected_ion_m_z).valueFixedNotation() << " " << inverseReduceIonMobility.valueFixedNotation(); + os << '\n'; + if (chargeParam.empty()) { vector charges; diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/Serializer_mzXML.cpp libpwizlite-3.0.15/src/pwiz/data/msdata/Serializer_mzXML.cpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/Serializer_mzXML.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/Serializer_mzXML.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -161,7 +161,7 @@ // insane: location="file://path/to" name="source.raw" case MS_Waters_raw_format: if (nameExtension == ".dat" && locationExtension == ".raw") - return bfs::basename(bfs::path(sf.location).leaf()); + return bfs::basename(bfs::path(sf.location).filename()); else if (nameExtension == ".raw") return bfs::basename(sf.name); return ""; @@ -169,34 +169,34 @@ // location="file://path/to/source.d" name="Analysis.yep" case MS_Bruker_Agilent_YEP_format: if (nameExtension == ".yep" && locationExtension == ".d") - return bfs::basename(bfs::path(sf.location).leaf()); + return bfs::basename(bfs::path(sf.location).filename()); return ""; // location="file://path/to/source.d" name="Analysis.baf" case MS_Bruker_BAF_format: if (nameExtension == ".baf" && locationExtension == ".d") - return bfs::basename(bfs::path(sf.location).leaf()); + return bfs::basename(bfs::path(sf.location).filename()); return ""; // location="file://path/to/source.d" name="Analysis.tdf" case MS_Bruker_TDF_format: if (nameExtension == ".tdf" && locationExtension == ".d") - return bfs::basename(bfs::path(sf.location).leaf()); + return bfs::basename(bfs::path(sf.location).filename()); return ""; // location="file://path/to/source.d" name="Analysis.tsf" case MS_Bruker_TSF_format: if (nameExtension == ".tsf" && locationExtension == ".d") - return bfs::basename(bfs::path(sf.location).leaf()); + return bfs::basename(bfs::path(sf.location).filename()); return ""; // location="file://path/to/source.d/AcqData" name="msprofile.bin" case MS_Agilent_MassHunter_format: - if (bfs::path(sf.location).leaf() == "AcqData" && + if (bfs::path(sf.location).filename() == "AcqData" && (bal::iends_with(sf.name, "msprofile.bin") || bal::iends_with(sf.name, "mspeak.bin") || bal::iends_with(sf.name, "msscan.bin"))) - return bfs::basename(bfs::path(sf.location).parent_path().leaf()); + return bfs::basename(bfs::path(sf.location).parent_path().filename()); return ""; // location="file://path/to" name="source.mzXML" @@ -270,7 +270,7 @@ string fileName, fileType, fileSha1; - fileName = sf.location + "/" + sf.name; + fileName = (bfs::path(sf.location) / sf.name).string(); switch (nativeIdFormat) { // nativeID formats from processed data file types @@ -440,12 +440,14 @@ string charge; string collisionEnergy; string activation; + string ccs; double windowWideness; + bool empty() const { return scanNum.empty() && mz.empty() && intensity.empty() && - charge.empty() && collisionEnergy.empty() && activation.empty() && windowWideness == 0; + charge.empty() && collisionEnergy.empty() && activation.empty() && ccs.empty() && windowWideness == 0; } }; @@ -471,6 +473,7 @@ info.mz = it->selectedIons[0].cvParam(MS_selected_ion_m_z).value; info.intensity = it->selectedIons[0].cvParam(MS_peak_intensity).value; info.charge = it->selectedIons[0].cvParam(MS_charge_state).value; + info.ccs = it->selectedIons[0].cvParam(MS_collisional_cross_sectional_area).value; } if (!it->activation.empty()) @@ -514,7 +517,6 @@ return result; } - void write_precursors(XMLWriter& xmlWriter, const vector& precursorInfo) { xmlWriter.pushStyle(XMLWriter::StyleFlag_InlineInner); @@ -535,6 +537,8 @@ attributes.add("activationMethod", it->activation); if (it->windowWideness != 0) attributes.add("windowWideness", it->windowWideness); + if (!it->ccs.empty()) + attributes.add("CCS", it->ccs); xmlWriter.startElement("precursorMz", attributes); xmlWriter.characters(it->mz, false); @@ -642,6 +646,8 @@ string retentionTime = getRetentionTime(scan); string lowMz = spectrum.cvParam(MS_lowest_observed_m_z).value; string highMz = spectrum.cvParam(MS_highest_observed_m_z).value; + string startMz = !scan.scanWindows.empty() ? scan.scanWindows[0].cvParamValueOrDefault(MS_scan_window_lower_limit, string()) : ""; + string endMz = !scan.scanWindows.empty() ? scan.scanWindows[0].cvParamValueOrDefault(MS_scan_window_upper_limit, string()) : ""; string basePeakMz = spectrum.cvParam(MS_base_peak_m_z).value; string basePeakIntensity = spectrum.cvParam(MS_base_peak_intensity).value; string totIonCurrent = spectrum.cvParam(MS_total_ion_current).value; @@ -685,6 +691,10 @@ attributes.add("lowMz", lowMz); if (!highMz.empty()) attributes.add("highMz", highMz); + if (!startMz.empty()) + attributes.add("startMz", startMz); + if (!endMz.empty()) + attributes.add("endMz", endMz); if (!basePeakMz.empty()) attributes.add("basePeakMz", basePeakMz); if (!basePeakIntensity.empty()) @@ -1136,9 +1146,9 @@ // path/to/source/1A/1/1SRef/fid, path/to/source/1B/1/1SRef/fid, lcp: path/to/source/1, run id: source (not "1") // path/to/source/1A/1/1SRef/fid, path/to/source/2A/1/1SRef/fid, lcp: path/to/source/, run id: source if (*lcp.rbegin() == '/') - msd.id = msd.run.id = BFS_STRING(bfs::path(lcp).leaf()); + msd.id = msd.run.id = BFS_STRING(bfs::path(lcp).filename()); else - msd.id = msd.run.id = BFS_STRING(bfs::path(lcp).parent_path().leaf()); + msd.id = msd.run.id = BFS_STRING(bfs::path(lcp).parent_path().filename()); } } diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/SpectrumListWrapper.hpp libpwizlite-3.0.15/src/pwiz/data/msdata/SpectrumListWrapper.hpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/SpectrumListWrapper.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/SpectrumListWrapper.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -49,7 +49,11 @@ virtual size_t size() const {return inner_->size();} virtual bool empty() const {return size() == 0;} - virtual const SpectrumIdentity& spectrumIdentity(size_t index) const {return inner_->spectrumIdentity(index);} + virtual const SpectrumIdentity& spectrumIdentity(size_t index) const {return inner_->spectrumIdentity(index);} + virtual size_t find(const std::string& id) const {return size() == inner_->size() ? inner_->find(id) : SpectrumList::find(id);} + virtual size_t findAbbreviated(const std::string& abbreviatedId, char delimiter = '.') const {return size() == inner_->size() ? inner_->findAbbreviated(abbreviatedId, delimiter) : SpectrumList::findAbbreviated(abbreviatedId, delimiter);} + virtual IndexList findNameValue(const std::string& name, const std::string& value) const {return size() == inner_->size() ? inner_->findNameValue(name, value) : SpectrumList::findNameValue(name, value);} + virtual IndexList findSpotID(const std::string& spotID) const {return size() == inner_->size() ? inner_->findSpotID(spotID) : SpectrumList::findSpotID(spotID);} // no default implementation, because otherwise subclasses could override the DetailLevel overload and the getBinaryData overload would be inconsistent virtual SpectrumPtr spectrum(size_t index, bool getBinaryData = false) const = 0; diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/SpectrumList_MGF.cpp libpwizlite-3.0.15/src/pwiz/data/msdata/SpectrumList_MGF.cpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/SpectrumList_MGF.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/SpectrumList_MGF.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -40,6 +40,9 @@ namespace { +const char* startTagCCSInTitle = "ccs="; +const char* endTagsCCSInTitle[] = { " ", ",",";","\t" }; + class SpectrumList_MGFImpl : public SpectrumList_MGF { public: @@ -218,10 +221,18 @@ // Some formats omit RTINSECONDS and store the retention time // in the title field instead. double scanTimeMin = getRetentionTimeFromTitle(value); + if (scanTimeMin > 0) scan.set(MS_scan_start_time, scanTimeMin * 60, UO_second); - spectrum.set(MS_spectrum_title, value); + double ccs = getCCSFromTitle(value); + + if (ccs >= 0) + { + selectedIon.set(MS_collisional_cross_sectional_area, ccs, UO_square_angstrom); + } + + spectrum.set(MS_spectrum_title, removeCCSFromTitle(value)); } else if (name == "PEPMASS") { @@ -235,6 +246,13 @@ else selectedIon.set(MS_selected_ion_m_z, value, MS_m_z); } + else if (name == "ION_MOBILITY") + { + bal::trim(value); + size_t delim = value.find_last_of(' '); + + scan.set(MS_inverse_reduced_ion_mobility, value.substr(delim + 1, value.size() - delim - 1), MS_volt_second_per_square_centimeter); + } else if (name == "CHARGE") { bal::trim_if(value, bal::is_any_of(" \t\r")); @@ -330,6 +348,62 @@ spectrum.set(MS_base_peak_intensity, basePeakIntensity); } + static size_t FindEndTag(const string& title, size_t start) + { + for (int i = 0; i < sizeof(endTagsCCSInTitle) / sizeof(endTagsCCSInTitle[0]); i++) + { + const size_t tmpEnd = title.find(endTagsCCSInTitle[i], start); + if (tmpEnd != string::npos) + { + return tmpEnd; + } + } + + return title.length(); + } + + /** + * Parse the spectrum title to look for CCS. + */ + static double getCCSFromTitle(const string& title) + { + size_t start = title.find(startTagCCSInTitle, 0); + + if (start == string::npos) + return -1; // not found + + start += strlen(startTagCCSInTitle); + + try + { + return boost::lexical_cast(title.substr(start, FindEndTag(title, start + strlen(startTagCCSInTitle)) - start)); + } + catch (...) + { + return -1; + } + } + + /** + * Parse the spectrum title to look for CCS. + */ + static string removeCCSFromTitle(const string& title) + { + size_t start = title.find(startTagCCSInTitle, 0); + + if (start == string::npos) + return title; // not found + + try + { + return title.substr(0, start - 2) + title.substr(FindEndTag(title, start)); + } + catch (...) + { + return title; + } + } + /** * Parse the spectrum title to look for retention times. If there are * two times, return the center of the range. Possible formats to look @@ -346,7 +420,6 @@ double secondTime = 0; for(int format_idx = 0; format_idx < 2; format_idx++) { - size_t position = 0; firstTime = getTime(title, startTags[format_idx], endTags[format_idx], position); @@ -376,7 +449,7 @@ * Update position to the end of the parsed double. */ double getTime(const string& title, const char* startTag, - const char* endTag, size_t position) const + const char* endTag, size_t& position) const { size_t start = title.find(startTag, position); if( start == string::npos ) @@ -403,7 +476,6 @@ size_t lineCount = 0; bool inBeginIons = false; vector::iterator curIdentityItr; - map::iterator curIdToIndexItr; while (std::getline(*is_, lineStr)) // need accurate line length, so do not use pwiz::util convenience wrapper { @@ -421,7 +493,7 @@ curIdentityItr->index = index_.size()-1; curIdentityItr->id = "index=" + lexical_cast(index_.size()-1); curIdentityItr->sourceFilePosition = size_t(is_->tellg())-lineStr.length()-1; - curIdToIndexItr = idToIndex_.insert(pair(curIdentityItr->id, index_.size()-1)).first; + idToIndex_.insert(pair(curIdentityItr->id, index_.size() - 1)).first; inBeginIons = true; } else if (lineStr.find("TITLE=") == 0) diff -Nru libpwizlite-3.0.8/src/pwiz/data/msdata/SpectrumList_mzXML.cpp libpwizlite-3.0.15/src/pwiz/data/msdata/SpectrumList_mzXML.cpp --- libpwizlite-3.0.8/src/pwiz/data/msdata/SpectrumList_mzXML.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/data/msdata/SpectrumList_mzXML.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -86,7 +86,10 @@ } if (!gotIndex) + { + is_->clear(); createIndex(); + } scanMsLevelCache_.resize(index_.size()); @@ -171,27 +174,27 @@ if (activationMethod.empty() || activationMethod == "CID") { // TODO: is it reasonable to assume CID if activation method is unspecified (i.e. older mzXMLs)? - precursor->activation.set(MS_CID); + precursor->activation.cvParams.emplace(precursor->activation.cvParams.begin(), MS_CID); } else if (activationMethod == "ETD") - precursor->activation.set(MS_ETD); + precursor->activation.cvParams.emplace(precursor->activation.cvParams.begin(), MS_ETD); else if (activationMethod == "ETD+SA") { - precursor->activation.set(MS_ETD); - precursor->activation.set(MS_CID); + precursor->activation.cvParams.emplace(precursor->activation.cvParams.begin(), MS_ETD); + precursor->activation.cvParams.emplace(precursor->activation.cvParams.begin(), MS_CID); } else if (activationMethod == "ECD") - precursor->activation.set(MS_ECD); + precursor->activation.cvParams.emplace(precursor->activation.cvParams.begin(), MS_ECD); else if (activationMethod == "HCD") - precursor->activation.set(MS_HCD); + precursor->activation.cvParams.emplace(precursor->activation.cvParams.begin(), MS_HCD); //else // TODO: log about invalid attribute value if (!windowWideness.empty()) { double isolationWindowWidth = lexical_cast(windowWideness) / 2.0; - precursor->isolationWindow.set(MS_isolation_window_lower_offset, isolationWindowWidth); - precursor->isolationWindow.set(MS_isolation_window_upper_offset, isolationWindowWidth); + precursor->isolationWindow.set(MS_isolation_window_lower_offset, isolationWindowWidth, MS_m_z); + precursor->isolationWindow.set(MS_isolation_window_upper_offset, isolationWindowWidth, MS_m_z); } if (!driftTime.empty()) @@ -200,7 +203,7 @@ scan->set(MS_inverse_reduced_ion_mobility, invK0, MS_Vs_cm_2); if (!collisionalCrossSection.empty()) - scan->userParams.emplace_back("CCS", collisionalCrossSection); + precursor->selectedIons.back().set(MS_collisional_cross_sectional_area, collisionalCrossSection, UO_square_angstrom); return Status::Ok; } @@ -214,7 +217,8 @@ if (!precursor) throw runtime_error("[SpectrumList_mzXML::HandlerPrecursor] Null precursor."); - precursor->selectedIons.back().set(MS_selected_ion_m_z, text, MS_m_z); + precursor->selectedIons.back().cvParams.emplace(precursor->selectedIons.back().cvParams.begin(), MS_selected_ion_m_z, text.c_str(), MS_m_z); + precursor->isolationWindow.cvParams.emplace(precursor->isolationWindow.cvParams.begin(), MS_isolation_window_target_m_z, text.c_str(), MS_m_z); return Status::Ok; } @@ -485,16 +489,16 @@ if (endMz > 0) scan.scanWindows.push_back(ScanWindow(startMz, endMz, MS_m_z)); - if (!lowMz.empty()) - spectrum_.set(MS_lowest_observed_m_z, lowMz); - if (!highMz.empty()) - spectrum_.set(MS_highest_observed_m_z, highMz); if (!basePeakMz.empty()) - spectrum_.set(MS_base_peak_m_z, basePeakMz); + spectrum_.set(MS_base_peak_m_z, basePeakMz, MS_m_z); if (!basePeakIntensity.empty()) - spectrum_.set(MS_base_peak_intensity, basePeakIntensity); + spectrum_.set(MS_base_peak_intensity, basePeakIntensity, MS_number_of_detector_counts); if (!totIonCurrent.empty()) spectrum_.set(MS_total_ion_current, totIonCurrent); + if (!lowMz.empty()) + spectrum_.set(MS_lowest_observed_m_z, lowMz, MS_m_z); + if (!highMz.empty()) + spectrum_.set(MS_highest_observed_m_z, highMz, MS_m_z); return Status::Ok; } @@ -566,7 +570,6 @@ bool getBinaryData_; string scanNumber_; string collisionEnergy_; - string activationMethod_; HandlerPeaks handlerPeaks_; HandlerPrecursor handlerPrecursor_; CVID nativeIdFormat_; @@ -824,28 +827,36 @@ if (indexIndexOffset == string::npos) return false; // no index present - is_->seekg(-bufferSize + static_cast(indexIndexOffset), std::ios::end); - if (!*is_) - throw index_not_found("[SpectrumList_mzXML::readIndex()] Error seeking to ."); - - // read - - stream_offset indexOffset = 0; - HandlerIndexOffset handlerIndexOffset(indexOffset); - SAXParser::parse(*is_, handlerIndexOffset); - if (indexOffset == 0) - throw index_not_found("[SpectrumList_mzXML::readIndex()] Error parsing ."); + try + { + is_->seekg(-bufferSize + static_cast(indexIndexOffset), std::ios::end); + if (!*is_) + throw index_not_found("[SpectrumList_mzXML::readIndex()] Error seeking to ."); - // read + // read - is_->seekg(offset_to_position(indexOffset)); - if (!*is_) - throw index_not_found("[SpectrumList_mzXML::readIndex()] Error seeking to ."); + stream_offset indexOffset = 0; + HandlerIndexOffset handlerIndexOffset(indexOffset); + SAXParser::parse(*is_, handlerIndexOffset); + if (indexOffset == 0) + throw index_not_found("[SpectrumList_mzXML::readIndex()] Error parsing ."); + + // read + + is_->seekg(offset_to_position(indexOffset)); + if (!*is_) + throw index_not_found("[SpectrumList_mzXML::readIndex()] Error seeking to ."); - HandlerIndex handlerIndex(index_, msd_); - SAXParser::parse(*is_, handlerIndex); - if (index_.empty()) - throw index_not_found("[SpectrumList_mzXML::readIndex()] is empty."); + HandlerIndex handlerIndex(index_, msd_); + SAXParser::parse(*is_, handlerIndex); + if (index_.empty()) + throw index_not_found("[SpectrumList_mzXML::readIndex()] is empty."); + } + catch (exception& e) + { + cerr << e.what() << endl; // TODO: log + return false; + } return true; } diff -Nru libpwizlite-3.0.8/src/pwiz/utility/chemistry/IsotopeCalculator.hpp libpwizlite-3.0.15/src/pwiz/utility/chemistry/IsotopeCalculator.hpp --- libpwizlite-3.0.8/src/pwiz/utility/chemistry/IsotopeCalculator.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/chemistry/IsotopeCalculator.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -52,7 +52,7 @@ int normalization = 0) const; private: class Impl; - std::auto_ptr impl_; + std::unique_ptr impl_; // no copying IsotopeCalculator(const IsotopeCalculator&); diff -Nru libpwizlite-3.0.8/src/pwiz/utility/chemistry/IsotopeEnvelopeEstimator.hpp libpwizlite-3.0.15/src/pwiz/utility/chemistry/IsotopeEnvelopeEstimator.hpp --- libpwizlite-3.0.8/src/pwiz/utility/chemistry/IsotopeEnvelopeEstimator.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/chemistry/IsotopeEnvelopeEstimator.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -71,7 +71,7 @@ private: class Impl; - std::auto_ptr impl_; + std::unique_ptr impl_; // no copying IsotopeEnvelopeEstimator(const IsotopeEnvelopeEstimator&); diff -Nru libpwizlite-3.0.8/src/pwiz/utility/chemistry/IsotopeTable.hpp libpwizlite-3.0.15/src/pwiz/utility/chemistry/IsotopeTable.hpp --- libpwizlite-3.0.8/src/pwiz/utility/chemistry/IsotopeTable.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/chemistry/IsotopeTable.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -47,7 +47,7 @@ private: class Impl; - std::auto_ptr impl_; + std::unique_ptr impl_; // no copying IsotopeTable(const IsotopeTable&); diff -Nru libpwizlite-3.0.8/src/pwiz/utility/findmf/base/base/scale.hpp libpwizlite-3.0.15/src/pwiz/utility/findmf/base/base/scale.hpp --- libpwizlite-3.0.8/src/pwiz/utility/findmf/base/base/scale.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/findmf/base/base/scale.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -39,7 +39,7 @@ template - struct NthPower : std::unary_function + struct NthPower { TReal operator()(const TReal & x) { @@ -88,7 +88,7 @@ if(center) { scaled.first = ralab::base::base::mean( begin , end); - std::transform(begin, end, begin, std::bind2nd( std::minus(), scaled.first)); + std::transform(begin, end, begin, std::bind( std::minus(), std::placeholders::_1, scaled.first)); } else { @@ -97,7 +97,7 @@ if(scale) { scaled.second = rootMeanSquare( begin , end ); - std::transform(begin, end, begin , std::bind2nd(std::divides(), scaled.second) ); + std::transform(begin, end, begin , std::bind(std::divides(), std::placeholders::_1, scaled.second) ); } else { diff -Nru libpwizlite-3.0.8/src/pwiz/utility/findmf/base/filter/utilities/gauss.hpp libpwizlite-3.0.15/src/pwiz/utility/findmf/base/filter/utilities/gauss.hpp --- libpwizlite-3.0.8/src/pwiz/utility/findmf/base/filter/utilities/gauss.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/findmf/base/filter/utilities/gauss.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -39,7 +39,7 @@ \ingroup FILTER */ template - struct Gauss : std::unary_function { + struct Gauss { Gauss(TReal mu, TReal sigma) :mu_(mu), @@ -68,7 +68,7 @@ \ingroup FILTER */ template - struct Gauss_1deriv : std::unary_function< TReal ,TReal > { + struct Gauss_1deriv { Gauss_1deriv( TReal mu//!< mean @@ -102,7 +102,7 @@ //ensure that are of gaussian is one... TReal sum = std::accumulate(gauss.begin() , gauss.end() , 0.); - std::transform(gauss.begin(),gauss.end(),gauss.begin(),std::bind2nd(std::divides(),sum )) ; + std::transform(gauss.begin(),gauss.end(),gauss.begin(),std::bind(std::divides(), std::placeholders::_1, sum )) ; TReal sumfilter = std::accumulate(gauss.begin(),gauss.end(),0.); return sumfilter; } @@ -116,14 +116,14 @@ //do this so that the sum of wavelet equals zero TReal sum = std::accumulate(mh.begin() , mh.end() , 0.); sum /= mh.size(); - std::transform(mh.begin(),mh.end(),mh.begin(),std::bind2nd(std::minus(), sum )) ; + std::transform(mh.begin(),mh.end(),mh.begin(),std::bind(std::minus(), std::placeholders::_1, sum )) ; //compute sum of square... TReal sumAbs = 0; for(typename std::vector::iterator it = mh.begin() ;it != mh.end(); ++it) { sumAbs += fabs(*it); } - std::transform(mh.begin(),mh.end(),mh.begin(),std::bind2nd(std::divides(), sumAbs )) ; + std::transform(mh.begin(),mh.end(),mh.begin(),std::bind(std::divides(), std::placeholders::_1, sumAbs )) ; } template diff -Nru libpwizlite-3.0.8/src/pwiz/utility/findmf/base/resample/utilities/determinebinwidth.hpp libpwizlite-3.0.15/src/pwiz/utility/findmf/base/resample/utilities/determinebinwidth.hpp --- libpwizlite-3.0.8/src/pwiz/utility/findmf/base/resample/utilities/determinebinwidth.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/findmf/base/resample/utilities/determinebinwidth.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -36,7 +36,7 @@ namespace utilities{ template - struct meanfunctor : std::binary_function{ + struct meanfunctor{ T operator()(const T & x, const T& y){ return (x+y)/2.; } diff -Nru libpwizlite-3.0.8/src/pwiz/utility/math/Stats.hpp libpwizlite-3.0.15/src/pwiz/utility/math/Stats.hpp --- libpwizlite-3.0.8/src/pwiz/utility/math/Stats.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/math/Stats.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -54,7 +54,7 @@ private: class Impl; - std::auto_ptr impl_; + std::unique_ptr impl_; // no copying Stats(const Stats& stats); diff -Nru libpwizlite-3.0.8/src/pwiz/utility/minimxml/SAXParser.cpp libpwizlite-3.0.15/src/pwiz/utility/minimxml/SAXParser.cpp --- libpwizlite-3.0.8/src/pwiz/utility/minimxml/SAXParser.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/minimxml/SAXParser.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -583,7 +583,7 @@ string xml_root_element(const string& fileheader) { - const static bxp::sregex e = bxp::sregex::compile("(?:<\\?xml.*?>)?.*?<([^?!]\\S+?)[\\s>]"); + const bxp::sregex e = bxp::sregex::compile("(?:<\\?xml.*?>)?.*?<([^?!]\\S+?)[\\s>]"); // convert Unicode to ASCII string asciiheader; diff -Nru libpwizlite-3.0.8/src/pwiz/utility/minimxml/XMLWriter.cpp libpwizlite-3.0.15/src/pwiz/utility/minimxml/XMLWriter.cpp --- libpwizlite-3.0.8/src/pwiz/utility/minimxml/XMLWriter.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/minimxml/XMLWriter.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -340,7 +340,7 @@ // but here we'll just encode any non-ASCII value. bool isNCNameStartChar(char& c) { - return std::isalpha(c, std::locale::classic()) || c == '_'; + return ((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')) || c == '_'; } bool isNCNameChar(char& c) diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/BinaryData.hpp libpwizlite-3.0.15/src/pwiz/utility/misc/BinaryData.hpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/BinaryData.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/BinaryData.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -1,9 +1,9 @@ -// +// // $Id$ // -// -// Original author: Matt Chambers -// +// +// Original author: Matt Chambers +// // Copyright 2017 Matt Chambers // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -51,10 +51,16 @@ typedef T &reference; typedef const T &const_reference; - class PWIZ_API_DECL const_iterator : public std::iterator + class PWIZ_API_DECL const_iterator { public: + typedef T value_type; + typedef const T& reference; + typedef const T* pointer; + typedef std::ptrdiff_t difference_type; + typedef std::random_access_iterator_tag iterator_category; + const T& operator*() const { return *current_; } const T* operator->() const { return current_; } const_iterator& operator++() { ++current_; return *this; } @@ -85,10 +91,16 @@ const T* current_; }; - class PWIZ_API_DECL iterator : public std::iterator + class PWIZ_API_DECL iterator { public: + typedef T value_type; + typedef T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + typedef std::random_access_iterator_tag iterator_category; + T& operator*() const { return *current_; } T* operator->() const { return current_; } iterator& operator++() { ++current_; return *this; } diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/Container.hpp libpwizlite-3.0.15/src/pwiz/utility/misc/Container.hpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/Container.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/Container.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -35,7 +35,7 @@ #include #include #include -#include +#include using std::vector; using std::list; diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem-303.cpp libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem-303.cpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem-303.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem-303.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,748 +0,0 @@ -// -// $Id$ -// -// -// Original author: Matt Chambers -// -// Copyright 2008 Spielberg Family Center for Applied Proteomics -// Cedars Sinai Medical Center, Los Angeles, California 90048 -// Copyright 2008 Vanderbilt University - Nashville, TN 37232 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#define PWIZ_SOURCE - -#include "Filesystem.hpp" - -#ifdef MXE -#undef WIN32 -#endif - - -#ifdef WIN32 -#define _WIN32_WINNT 0x0600 -#define WIN32_LEAN_AND_MEAN -#define NOGDI -#include -//#include -#include -#include -#include - -#include -#include -#else -#include -#include -#ifndef MXE -#include -#include -#endif -#include -#include -#include -#ifndef MAX_PATH -#define MAX_PATH 255 -#endif -#endif - -#include -#include -#include -#include - -#include "pwiz/utility/misc/random_access_compressed_ifstream.hpp" -//#include -#include - -using std::runtime_error; -using std::string; -using std::vector; - -namespace { - -class UTF8_BoostFilesystemPathImbuer - : public boost::singleton { - public: - UTF8_BoostFilesystemPathImbuer(boost::restricted) { - std::locale global_loc = std::locale(); - std::locale loc(global_loc, - new boost::filesystem::detail::utf8_codecvt_facet); - bfs::path::imbue(loc); - } - - void imbue() const {}; -}; - -#ifdef WIN32 -#define STATUS_INFO_LENGTH_MISMATCH 0xc0000004 - -#define SystemHandleInformation 16 - -extern "C" { -typedef NTSTATUS(NTAPI* _NtQuerySystemInformation)( - ULONG SystemInformationClass, PVOID SystemInformation, - ULONG SystemInformationLength, PULONG ReturnLength); - -// The same definition but with different member variable names in: -// mingw64/x86_64-w64-mingw32/include/winternl.h// -// typedef struct _SYSTEM_HANDLE_ENTRY { -// ULONG OwnerPid; -// BYTE ObjectType; -// BYTE HandleFlags; -// USHORT HandleValue; -// PVOID ObjectPointer; -// ULONG AccessMask; -//} SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY; - -// So I do comment out this declaration and fix -// the variable names in this unit. -//struct SYSTEM_HANDLE { - //ULONG ProcessID; - //BYTE HandleType; - //BYTE Flags; - //USHORT Handle; - //PVOID Object; - //ACCESS_MASK GrantedAccess; -//}; - -// The same definition in -// /mingw64/x86_64-w64-mingw32/include/winternl.h, like this: - //typedef struct _SYSTEM_HANDLE_INFORMATION { - //ULONG Count; - //SYSTEM_HANDLE_ENTRY Handle[1]; - //} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION; - -// but with different member var names which had -// to be fixed in this unit. -// struct SYSTEM_HANDLE_INFORMATION { -// ULONG HandleCount; -// SYSTEM_HANDLE Handles[1]; -//}; - -enum SECTION_INHERIT { ViewShare = 1, ViewUnmap = 2 }; - -struct SYSTEM_HANDLE_TABLE_ENTRY_INFO { - USHORT UniqueProcessId; - USHORT CreatorBackTraceIndex; - UCHAR ObjectTypeIndex; - UCHAR HandleAttributes; - USHORT HandleValue; - PVOID Object; - ULONG GrantedAccess; -}; - -typedef NTSTATUS(NTAPI* _NtUnmapViewOfSection)(HANDLE ProcessHandle, - PVOID BaseAddress); -typedef NTSTATUS(NTAPI* _NtMapViewOfSection)( - HANDLE SectionHandle, HANDLE ProcessHandle, PVOID* BaseAddress, - ULONG_PTR ZeroBits, SIZE_T CommitSize, PLARGE_INTEGER SectionOffset, - PSIZE_T ViewSize, SECTION_INHERIT InheritDisposition, ULONG AllocationType, - ULONG Win32Protect); - -typedef NTSTATUS(NTAPI* _NtQueryObject)( - HANDLE Handle, OBJECT_INFORMATION_CLASS ObjectInformationClass, - PVOID ObjectInformation, ULONG ObjectInformationLength, - PULONG ReturnLength); - -PVOID GetLibraryProcAddress(PSTR LibraryName, PSTR ProcName) { - return (void*)GetProcAddress(GetModuleHandleA(LibraryName), ProcName); -} -} - -int GetFileHandleTypeNumber(SYSTEM_HANDLE_INFORMATION* handleInfos) { - DWORD currentProcessId = GetCurrentProcessId(); - wstring fileType = L"File"; - std::vector typeInfoBytes(sizeof(PUBLIC_OBJECT_TYPE_INFORMATION)); - - _NtQueryObject NtQueryObject = - (_NtQueryObject)GetLibraryProcAddress("ntdll.dll", "NtQueryObject"); - if (NtQueryObject == nullptr) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error getting " - "NtQueryObject function.\n"); - return 0; - } - - map handlesPerType; - for (size_t i = 0; i < handleInfos->Count; ++i) { - if (handleInfos->Handle[i].OwnerPid != currentProcessId) continue; - - if (handleInfos->Handle[i].ObjectType < - 20) // this is not the File string you're looking for - continue; - - const auto handle = - reinterpret_cast(handleInfos->Handle[i].HandleValue); - ULONG size; - auto queryResult = - NtQueryObject(handle, ObjectTypeInformation, typeInfoBytes.data(), - typeInfoBytes.size(), &size); - if (queryResult == STATUS_INFO_LENGTH_MISMATCH) { - typeInfoBytes.resize(size); - queryResult = NtQueryObject(handle, ObjectTypeInformation, - typeInfoBytes.data(), size, nullptr); - } - - if (NT_SUCCESS(queryResult)) { - const auto typeInfo = - reinterpret_cast( - typeInfoBytes.data()); - const auto type = - std::wstring(typeInfo->TypeName.Buffer, - typeInfo->TypeName.Length / sizeof(WCHAR)); - if (type == fileType) - // return handleInfos->Handles[i].HandleType; - ++handlesPerType[handleInfos->Handle[i].ObjectType]; - } - } - - if (handlesPerType.empty()) return 0; - - auto typeMode = std::max_element( - handlesPerType.begin(), handlesPerType.end(), - [](const auto& a, const auto& b) { return a.second < b.second; }); - return typeMode->first; -} - -bool GetFileNameFromHandle(HANDLE hFile, wchar_t* filepathBuffer, - size_t bufferLength) { - // Get the file size. - DWORD dwFileSizeHi = 0; - DWORD dwFileSizeLo = GetFileSize(hFile, &dwFileSizeHi); - - // Cannot map 0-byte files - if (dwFileSizeLo == 0 && dwFileSizeHi == 0) return false; - - // Create a file mapping object. - HANDLE hFileMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 1, NULL); - - if (!hFileMap) return false; - - void* pMem = MapViewOfFile(hFileMap, FILE_MAP_READ, 0, 0, 1); - - if (!pMem) return false; - - if (!GetMappedFileNameW(GetCurrentProcess(), pMem, filepathBuffer, - bufferLength)) - return false; - - UnmapViewOfFile(pMem); - CloseHandle(hFileMap); - - return true; -} -#endif -} // namespace - -namespace pwiz { -namespace util { - -PWIZ_API_DECL bool running_on_wine() { -#ifdef WIN32 - return GetLibraryProcAddress("ntdll.dll", "wine_get_version") != NULL; -#else - return false; -#endif -} - -PWIZ_API_DECL void force_close_handles_to_filepath( - const std::string& filepath, - bool closeMemoryMappedSections) noexcept(true) { -#ifdef WIN32 - if (running_on_wine()) return; - - _NtQuerySystemInformation NtQuerySystemInformation = - (_NtQuerySystemInformation)GetLibraryProcAddress( - "ntdll.dll", "NtQuerySystemInformation"); - if (NtQuerySystemInformation == nullptr) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error getting " - "NtQuerySystemInformation function.\n"); - return; - } - - _NtUnmapViewOfSection NtUnmapViewOfSection = nullptr; - _NtMapViewOfSection NtMapViewOfSection = nullptr; - if (closeMemoryMappedSections) { - NtUnmapViewOfSection = (_NtUnmapViewOfSection)GetLibraryProcAddress( - "ntdll.dll", "NtUnmapViewOfSection"); - if (NtUnmapViewOfSection == nullptr) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error getting " - "NtUnmapViewOfSection function.\n"); - return; - } - - NtMapViewOfSection = (_NtMapViewOfSection)GetLibraryProcAddress( - "ntdll.dll", "NtMapViewOfSection"); - if (NtMapViewOfSection == nullptr) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error getting " - "NtMapViewOfSection function.\n"); - return; - } - } - - NTSTATUS status = 0; - DWORD dwSize = sizeof(SYSTEM_HANDLE_INFORMATION); - vector pInfoBytes(dwSize); - - do { - // keep reallocing until buffer is big enough - DWORD newSize = 0; - status = NtQuerySystemInformation(SystemHandleInformation, - pInfoBytes.data(), dwSize, &newSize); - if (status == STATUS_INFO_LENGTH_MISMATCH) { - if (newSize > 0) - dwSize = newSize; - else - dwSize *= 2; - pInfoBytes.resize(dwSize); - } - } while (status == STATUS_INFO_LENGTH_MISMATCH); - - if (status != 0) { - char messageBuffer[256]; - memset(messageBuffer, 0, 256); - FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, status, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPSTR)&messageBuffer, 255, NULL); - - fprintf(stderr, - "[force_close_handles_to_filepath()] Error calling " - "NtQuerySystemInformation function: %s\n", - messageBuffer); - return; - } - - auto pInfo = - reinterpret_cast(pInfoBytes.data()); - int fileHandleType = GetFileHandleTypeNumber(pInfo); - if (fileHandleType == 0) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Unable to determine file " - "handle type number.\n"); - return; - } - - auto currentProcessId = GetCurrentProcessId(); - HANDLE currentProcessHandle = - OpenProcess(PROCESS_ALL_ACCESS, FALSE, currentProcessId); - - SYSTEM_INFO si; - GetSystemInfo(&si); - MEMORY_BASIC_INFORMATION mbi; - PCHAR lpMem = 0; - vector mappedFilename(260); - string narrowFilename = bfs::path(filepath).filename().string(); - vector wideFilename(narrowFilename.length()); - std::use_facet>(std::locale()) - .widen(narrowFilename.c_str(), - narrowFilename.c_str() + narrowFilename.length(), - &wideFilename[0]); - wstring wideFilepathWithoutRoot = - bfs::path(filepath).relative_path().wstring(); - - if (closeMemoryMappedSections) { - bool closedMappedSection = false; - while (lpMem < si.lpMaximumApplicationAddress) { - VirtualQueryEx(currentProcessHandle, lpMem, &mbi, - sizeof(MEMORY_BASIC_INFORMATION)); - lpMem += mbi.RegionSize; - - if (mbi.Type != MEM_MAPPED || mbi.State != MEM_COMMIT || - mbi.Protect == PAGE_NOACCESS || mbi.RegionSize <= 4096) - continue; - - if (GetMappedFileNameW(currentProcessHandle, mbi.BaseAddress, - &mappedFilename[0], 260) == 0) - continue; - - if (!bal::iends_with(wstring(mappedFilename.data()), wideFilename)) - continue; - - if (!UnmapViewOfFile(mbi.BaseAddress)) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error calling " - "UnmapViewOfFile.\n"); - return; - } else { - // fprintf(stderr, "[force_close_handles_to_filepath()] Closed - // memory mapped section.\n"); - closedMappedSection = true; - } - } - - if (!closedMappedSection) - fprintf(stderr, - "[force_close_handles_to_filepath()] Failed to find memory " - "mapped section.\n"); - } - - wchar_t szPath[260]; - - // iterate over every handle and close file handles that match the filepath - for (DWORD i = 0; i < pInfo->Count; i++) { - auto& handleInfo = pInfo->Handle[i]; - if (handleInfo.OwnerPid != currentProcessId) continue; - - if (handleInfo.ObjectType == fileHandleType) { - szPath[0] = '\0'; - if (!GetFileNameFromHandle((HANDLE)handleInfo.HandleValue, szPath, - 260)) { - /*char messageBuffer[256]; - memset(messageBuffer, 0, 256); - FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPSTR)&messageBuffer, 255, NULL); - - fprintf(stderr, "[force_close_handles_to_filepath()] Error - calling GetFileNameFromHandle: %s\n", messageBuffer);*/ - continue; - } - - wchar_t* handlePath = szPath; - if (bal::iends_with(handlePath, wideFilepathWithoutRoot.c_str())) { - if (!CloseHandle((HANDLE)handleInfo.HandleValue)) - fprintf(stderr, - "[force_close_handles_to_filepath()] Error closing " - "file handle.\n"); - // else - // fprintf(stderr, "[force_close_handles_to_filepath()] - // Closed file handle: " + gcnew String(handlePath)); - } - } else if (closeMemoryMappedSections) { - // close handle to memory mapped section - SIZE_T viewSize = 1; - PVOID viewBase = NULL; - - NTSTATUS status = NtMapViewOfSection( - (HANDLE)handleInfo.HandleValue, currentProcessHandle, &viewBase, 0, - 0, NULL, &viewSize, ViewShare, 0, PAGE_READONLY); - - if (!NT_SUCCESS(status)) continue; - - vector mappedFilename(260); - auto result = GetMappedFileNameW(currentProcessHandle, viewBase, - &mappedFilename[0], 260); - - NtUnmapViewOfSection(currentProcessHandle, viewBase); - - if (result == 0) continue; - - if (!bal::iends_with(wstring(mappedFilename.data()), wideFilename)) - continue; - - if (!CloseHandle((HANDLE)handleInfo.HandleValue)) - fprintf(stderr, - "[force_close_handles_to_filepath()] Error closing " - "section handle.\n"); - // else - // fprintf(stderr, "[force_close_handles_to_filepath()] Closed - // section handle.\n"); - } - } -#endif -} - -PWIZ_API_DECL void enable_utf8_path_operations() { - UTF8_BoostFilesystemPathImbuer::instance->imbue(); -} - -#ifndef MXE -PWIZ_API_DECL int expand_pathmask(const bfs::path& pathmask, - vector& matchingPaths) { - UTF8_BoostFilesystemPathImbuer::instance->imbue(); - - using bfs::path; - int matchingPathCount = 0; - -#ifdef WIN32 - path maskParentPath = pathmask.branch_path(); - WIN32_FIND_DATAW fdata; - HANDLE srcFile = FindFirstFileExW( - boost::nowide::widen(pathmask.string()).c_str(), FindExInfoStandard, - &fdata, FindExSearchNameMatch, NULL, 0); - if (srcFile == INVALID_HANDLE_VALUE) return 0; // no matches - - do { - if (!bal::equals(fdata.cFileName, L".") && - !bal::equals(fdata.cFileName, L"..") != 0) { - matchingPaths.push_back(maskParentPath / fdata.cFileName); - ++matchingPathCount; - } - } while (FindNextFileW(srcFile, &fdata)); - - FindClose(srcFile); - -#else - - glob_t globbuf; - int rv = glob(pathmask.string().c_str(), 0, NULL, &globbuf); - if (rv > 0 && rv != GLOB_NOMATCH) - throw runtime_error("FindFilesByMask(): glob() error"); - - DIR* curDir = opendir("."); - struct stat curEntryData; - - for (size_t i = 0; i < globbuf.gl_pathc; ++i) { - stat(globbuf.gl_pathv[i], &curEntryData); - if (S_ISDIR(curEntryData.st_mode) || S_ISREG(curEntryData.st_mode) || - S_ISLNK(curEntryData.st_mode)) { - matchingPaths.push_back(globbuf.gl_pathv[i]); - ++matchingPathCount; - } - } - closedir(curDir); - - globfree(&globbuf); - -#endif - - return matchingPathCount; -} -#endif - -namespace { -void copy_recursive(const bfs::path& from, const bfs::path& to) { - bfs::copy_directory(from, to); - - for (bfs::directory_entry& entry : bfs::directory_iterator(from)) { - bfs::file_status status = entry.status(); - if (status.type() == bfs::directory_file) - copy_recursive(entry.path(), to / entry.path().filename()); - else if (status.type() == bfs::regular_file) - bfs::copy_file(entry.path(), to / entry.path().filename()); - else - throw bfs::filesystem_error( - "[copy_directory] invalid path type", entry.path(), - boost::system::error_code( - boost::system::errc::no_such_file_or_directory, - boost::system::system_category())); - } -} - -void copy_recursive(const bfs::path& from, const bfs::path& to, - boost::system::error_code& ec) { - bfs::copy_directory(from, to, ec); - if (ec.value() != 0) return; - - for (bfs::directory_entry& entry : bfs::directory_iterator(from)) { - bfs::file_status status = entry.status(ec); - if (status.type() == bfs::directory_file) - copy_recursive(entry.path(), to / entry.path().filename(), ec); - else if (status.type() == bfs::regular_file) - bfs::copy_file(entry.path(), to / entry.path().filename(), ec); - else if (ec.value() != 0) - ec.assign(boost::system::errc::no_such_file_or_directory, - boost::system::system_category()); - } -} -} // namespace - -PWIZ_API_DECL void copy_directory(const bfs::path& from, const bfs::path& to, - bool recursive, - boost::system::error_code* ec) { - if (!bfs::is_directory(from)) - throw bfs::filesystem_error( - "[copy_directory] source path is not a directory", from, - boost::system::error_code(boost::system::errc::not_a_directory, - boost::system::system_category())); - - if (bfs::exists(to)) { - if (ec != NULL) - ec->assign(boost::system::errc::file_exists, - boost::system::system_category()); - else - throw bfs::filesystem_error( - "[copy_directory] target path exists", to, - boost::system::error_code(boost::system::errc::file_exists, - boost::system::system_category())); - } - - if (recursive) { - if (ec != NULL) - copy_recursive(from, to, *ec); - else - copy_recursive(from, to); - } else { - if (ec != NULL) - bfs::copy_directory(from, to, *ec); - else - bfs::copy_directory(from, to); - } -} - -using boost::uintmax_t; - -template -struct double3_policy : boost::spirit::karma::real_policies { - // up to 3 digits total, but no unnecessary precision - static unsigned int precision(T n) { - double fracPart, intPart; - fracPart = modf(n, &intPart); - return fracPart < 0.005 ? 0 : n < 10 ? 2 : n < 100 ? 1 : 0; - } - static bool trailing_zeros(T) { return false; } - - template - static bool dot(OutputIterator& sink, T n, unsigned int precision) { - if (precision == 0) return false; - return boost::spirit::karma::real_policies::dot(sink, n, precision); - } -}; - -PWIZ_API_DECL -string abbreviate_byte_size(uintmax_t byteSize, - ByteSizeAbbreviation abbreviationType) { - uintmax_t G, M, K; - string GS, MS, KS; - - switch (abbreviationType) { - default: - case ByteSizeAbbreviation_IEC: - G = (M = (K = 1024) << 10) << 10; - GS = " GiB"; - MS = " MiB"; - KS = " KiB"; - break; - - case ByteSizeAbbreviation_JEDEC: - G = (M = (K = 1024) << 10) << 10; - GS = " GB"; - MS = " MB"; - KS = " KB"; - break; - - case ByteSizeAbbreviation_SI: - G = (M = (K = 1000) * 1000) * 1000; - GS = " GB"; - MS = " MB"; - KS = " KB"; - break; - } - - string suffix; - double byteSizeDbl; - - if (byteSize >= G) { - byteSizeDbl = (double)byteSize / G; - // byteSizeDbl = round(byteSizeDbl * 100) / 100; - suffix = GS; - } else if (byteSize >= M) { - byteSizeDbl = (double)byteSize / M; - suffix = MS; - } else if (byteSize >= K) { - byteSizeDbl = (double)byteSize / K; - suffix = KS; - } else { - byteSizeDbl = (double)byteSize; - suffix = " B"; - return lexical_cast(byteSize) + suffix; - } - - using namespace boost::spirit::karma; - typedef real_generator> double3_type; - static const double3_type double3 = double3_type(); - char buffer[256]; - char* p = buffer; - generate(p, double3, byteSizeDbl); - return std::string(&buffer[0], p) + suffix; -} - -PWIZ_API_DECL bool isHTTP(const string& s) { - // using namespace boost::xpressive; - - // from URI RFC via http://stackoverflow.com/a/26766402/638445 - // sregex uriRegex = - // sregex::compile("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"); - // return regex_match(s, uriRegex); - - return bal::istarts_with(s, "http://") || bal::istarts_with(s, "https://"); -} - -#ifdef WIN32 -namespace { -struct FileWrapper : boost::noncopyable { - FileWrapper(HANDLE h) : h(h) {} - ~FileWrapper() { CloseHandle(h); } - bool operator==(const HANDLE& rhs) { return h == rhs; } - - private: - HANDLE h; -}; -} // namespace -#endif - -PWIZ_API_DECL string read_file_header(const string& filepath, size_t length) { - UTF8_BoostFilesystemPathImbuer::instance->imbue(); - - string head; - if (!bfs::is_directory(filepath) && !isHTTP(filepath)) { - if (!bfs::exists(filepath)) - throw runtime_error("[read_file_header()] Unable to open file " + - filepath + " (file does not exist)"); - -#ifdef WIN32 // check for locked files which can be opened by ifstream but only - // produce garbage when read (at least in VC12) - { - std::wstring wide_filepath = - boost::locale::conv::utf_to_utf(filepath); - FileWrapper handle(::CreateFileW(wide_filepath.c_str(), - GENERIC_READ, FILE_SHARE_READ, - NULL, OPEN_EXISTING, 0, NULL)); - if (handle == INVALID_HANDLE_VALUE) - throw runtime_error( - "[read_file_header()] Unable to open file " + filepath + - " (invalid permission or file locked)"); - } -#endif - - random_access_compressed_ifstream is(filepath.c_str()); - if (!is) - throw runtime_error("[read_file_header()] Unable to open file " + - filepath + " (" + strerror(errno) + ")"); - - head.resize(length, '\0'); - if (!is.read(&head[0], (std::streamsize)head.size()) && !is.eof()) - throw runtime_error("[read_file_header()] Unable to read file " + - filepath + " (" + strerror(errno) + ")"); - } - return head; -} - -#ifndef MXE -PWIZ_API_DECL std::pair get_console_bounds( - const std::pair& defaultBounds) { -#ifdef WIN32 - CONSOLE_SCREEN_BUFFER_INFO csbi; - BOOL ret; - ret = GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); - if (ret) - return make_pair(csbi.dwSize.X, csbi.dwSize.Y); - else - return defaultBounds; -#else - winsize max; - if (ioctl(0, TIOCGWINSZ, &max) == 0) - return make_pair(max.ws_col, max.ws_row); - else - return defaultBounds; -#endif -} -#endif - -} // namespace util -} // namespace pwiz diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem-reduced-to-min-for-build-in-win10-mingw64.cpp libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem-reduced-to-min-for-build-in-win10-mingw64.cpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem-reduced-to-min-for-build-in-win10-mingw64.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem-reduced-to-min-for-build-in-win10-mingw64.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,784 +0,0 @@ -// -// $Id$ -// -// -// Original author: Matt Chambers -// -// Copyright 2008 Spielberg Family Center for Applied Proteomics -// Cedars Sinai Medical Center, Los Angeles, California 90048 -// Copyright 2008 Vanderbilt University - Nashville, TN 37232 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#define PWIZ_SOURCE - -#include "Filesystem.hpp" - -#ifdef WIN32 - -#pragma GCC warning "WIN32 is defined" - -#define _WIN32_WINNT 0x0600 -#define WIN32_LEAN_AND_MEAN -//#define NOMINMAX -#define NOGDI -#include -#include -//#include -#include -#include - -#include -#include -#endif - -#include -#include -#include -#include -#include - -#include "pwiz/utility/misc/random_access_compressed_ifstream.hpp" -//#include -#include -#include - -using std::runtime_error; -using std::string; -using std::vector; - -namespace { - -class UTF8_BoostFilesystemPathImbuer - : public boost::singleton { - public: - UTF8_BoostFilesystemPathImbuer(boost::restricted) { - std::locale global_loc = std::locale(); - std::locale loc(global_loc, - new boost::filesystem::detail::utf8_codecvt_facet); - bfs::path::imbue(loc); - } - - void imbue() const {}; -}; - -#ifdef WIN32 -#define STATUS_INFO_LENGTH_MISMATCH 0xc0000004 - -#define SystemHandleInformation 16 - -extern "C" { -typedef NTSTATUS(NTAPI* _NtQuerySystemInformation)( - ULONG SystemInformationClass, PVOID SystemInformation, - ULONG SystemInformationLength, PULONG ReturnLength); - -struct SYSTEM_HANDLE { - ULONG ProcessID; - BYTE HandleType; - BYTE Flags; - USHORT Handle; - PVOID Object; - ACCESS_MASK GrantedAccess; -}; - -// Rusconi -- This define is performed in CMakeStuff/systemUname.cmake -#ifdef WIN10MINGW64 - -// In file /c/msys64/mingw64/include/winternl.h -// this is what is declared: - // typedef struct _SYSTEM_HANDLE_INFORMATION { - // ULONG Count; - // SYSTEM_HANDLE_ENTRY Handle[1]; - // } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION; - -// This declaration clashes with the above. - -struct PWIZ_SYSTEM_HANDLE_INFORMATION { - ULONG HandleCount; - SYSTEM_HANDLE Handles[1]; -}; - -#else - -struct SYSTEM_HANDLE_INFORMATION { - ULONG HandleCount; - SYSTEM_HANDLE Handles[1]; -}; - -#endif - -enum SECTION_INHERIT { ViewShare = 1, ViewUnmap = 2 }; - -struct SYSTEM_HANDLE_TABLE_ENTRY_INFO { - USHORT UniqueProcessId; - USHORT CreatorBackTraceIndex; - UCHAR ObjectTypeIndex; - UCHAR HandleAttributes; - USHORT HandleValue; - PVOID Object; - ULONG GrantedAccess; -}; - -typedef NTSTATUS(NTAPI* _NtUnmapViewOfSection)(HANDLE ProcessHandle, - PVOID BaseAddress); -typedef NTSTATUS(NTAPI* _NtMapViewOfSection)( - HANDLE SectionHandle, HANDLE ProcessHandle, PVOID* BaseAddress, - ULONG_PTR ZeroBits, SIZE_T CommitSize, PLARGE_INTEGER SectionOffset, - PSIZE_T ViewSize, SECTION_INHERIT InheritDisposition, ULONG AllocationType, - ULONG Win32Protect); - -typedef NTSTATUS(NTAPI* _NtQueryObject)( - HANDLE Handle, OBJECT_INFORMATION_CLASS ObjectInformationClass, - PVOID ObjectInformation, ULONG ObjectInformationLength, - PULONG ReturnLength); - -FARPROC GetLibraryProcAddress(PSTR LibraryName, PSTR ProcName) { - return GetProcAddress(GetModuleHandleA(LibraryName), ProcName); -} -} - -#ifdef WIN10MINGW64 -int GetFileHandleTypeNumber(PWIZ_SYSTEM_HANDLE_INFORMATION* handleInfos) { -#else -int GetFileHandleTypeNumber(SYSTEM_HANDLE_INFORMATION* handleInfos) { -#endif - DWORD currentProcessId = GetCurrentProcessId(); - wstring fileType = L"File"; - std::vector typeInfoBytes(sizeof(PUBLIC_OBJECT_TYPE_INFORMATION)); - - _NtQueryObject NtQueryObject = - (_NtQueryObject)GetLibraryProcAddress("ntdll.dll", "NtQueryObject"); - if (NtQueryObject == nullptr) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error getting NtQueryObject " - "function.\n"); - return 0; - } - - map handlesPerType; - for (size_t i = 0; i < handleInfos->HandleCount; ++i) { - if (handleInfos->Handles[i].ProcessID != currentProcessId) continue; - - if (handleInfos->Handles[i].HandleType < - 20) // this is not the File string you're looking for - continue; - - const auto handle = - reinterpret_cast(handleInfos->Handles[i].Handle); - ULONG size; - auto queryResult = - NtQueryObject(handle, ObjectTypeInformation, typeInfoBytes.data(), - typeInfoBytes.size(), &size); - if (queryResult == STATUS_INFO_LENGTH_MISMATCH) { - typeInfoBytes.resize(size); - queryResult = NtQueryObject(handle, ObjectTypeInformation, - typeInfoBytes.data(), size, nullptr); - } - - if (NT_SUCCESS(queryResult)) { - const auto typeInfo = reinterpret_cast( - typeInfoBytes.data()); - const auto type = std::wstring(typeInfo->TypeName.Buffer, - typeInfo->TypeName.Length / sizeof(WCHAR)); - if (type == fileType) - // return handleInfos->Handles[i].HandleType; - ++handlesPerType[handleInfos->Handles[i].HandleType]; - } - } - - if (handlesPerType.empty()) return 0; - - auto typeMode = std::max_element( - handlesPerType.begin(), handlesPerType.end(), - [](const auto& a, const auto& b) { return a.second < b.second; }); - return typeMode->first; -} - -bool GetFileNameFromHandle(HANDLE hFile, wchar_t* filepathBuffer, - size_t bufferLength) { - // Get the file size. - DWORD dwFileSizeHi = 0; - DWORD dwFileSizeLo = GetFileSize(hFile, &dwFileSizeHi); - - // Cannot map 0-byte files - if (dwFileSizeLo == 0 && dwFileSizeHi == 0) return false; - - // Create a file mapping object. - HANDLE hFileMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 1, NULL); - - if (!hFileMap) return false; - - void* pMem = MapViewOfFile(hFileMap, FILE_MAP_READ, 0, 0, 1); - - if (!pMem) return false; - - if (!GetMappedFileNameW(GetCurrentProcess(), pMem, filepathBuffer, - bufferLength)) - return false; - - UnmapViewOfFile(pMem); - CloseHandle(hFileMap); - - return true; -} -#endif -} // namespace - -namespace pwiz { -namespace util { - -PWIZ_API_DECL bool running_on_wine() { -#ifdef WIN32 - return GetLibraryProcAddress("ntdll.dll", "wine_get_version") != NULL; -#else - return false; -#endif -} - -PWIZ_API_DECL void force_close_handles_to_filepath( - const std::string& filepath, - bool closeMemoryMappedSections) noexcept(true) { -#ifdef WIN32 - if (running_on_wine()) return; - - _NtQuerySystemInformation NtQuerySystemInformation = - (_NtQuerySystemInformation)GetLibraryProcAddress( - "ntdll.dll", "NtQuerySystemInformation"); - if (NtQuerySystemInformation == nullptr) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error getting " - "NtQuerySystemInformation function.\n"); - return; - } - - _NtUnmapViewOfSection NtUnmapViewOfSection = nullptr; - _NtMapViewOfSection NtMapViewOfSection = nullptr; - if (closeMemoryMappedSections) { - NtUnmapViewOfSection = (_NtUnmapViewOfSection)GetLibraryProcAddress( - "ntdll.dll", "NtUnmapViewOfSection"); - if (NtUnmapViewOfSection == nullptr) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error getting " - "NtUnmapViewOfSection function.\n"); - return; - } - - NtMapViewOfSection = (_NtMapViewOfSection)GetLibraryProcAddress( - "ntdll.dll", "NtMapViewOfSection"); - if (NtMapViewOfSection == nullptr) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error getting " - "NtMapViewOfSection function.\n"); - return; - } - } - - NTSTATUS status = 0; -#ifdef WIN10MINGW64 - DWORD dwSize = sizeof(PWIZ_SYSTEM_HANDLE_INFORMATION); -#else - DWORD dwSize = sizeof(SYSTEM_HANDLE_INFORMATION); -#endif - vector pInfoBytes(dwSize); - - do { - // keep reallocing until buffer is big enough - DWORD newSize = 0; - status = NtQuerySystemInformation(SystemHandleInformation, - pInfoBytes.data(), dwSize, &newSize); - if (status == STATUS_INFO_LENGTH_MISMATCH) { - if (newSize > 0) - dwSize = newSize; - else - dwSize *= 2; - pInfoBytes.resize(dwSize); - } - } while (status == STATUS_INFO_LENGTH_MISMATCH); - - if (status != 0) { - char messageBuffer[256]; - memset(messageBuffer, 0, 256); - FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, status, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPSTR)&messageBuffer, 255, NULL); - - fprintf(stderr, - "[force_close_handles_to_filepath()] Error calling " - "NtQuerySystemInformation function: %s\n", - messageBuffer); - return; - } - -#ifdef WIN10MINGW64 - auto pInfo = reinterpret_cast(pInfoBytes.data()); -#else - auto pInfo = reinterpret_cast(pInfoBytes.data()); -#endif - int fileHandleType = GetFileHandleTypeNumber(pInfo); - if (fileHandleType == 0) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Unable to determine file " - "handle type number.\n"); - return; - } - - auto currentProcessId = GetCurrentProcessId(); - HANDLE currentProcessHandle = - OpenProcess(PROCESS_ALL_ACCESS, FALSE, currentProcessId); - - SYSTEM_INFO si; - GetSystemInfo(&si); - MEMORY_BASIC_INFORMATION mbi; - PCHAR lpMem = 0; - vector mappedFilename(260); - string narrowFilename = bfs::path(filepath).filename().string(); - vector wideFilename(narrowFilename.length()); - std::use_facet>(std::locale()) - .widen(narrowFilename.c_str(), - narrowFilename.c_str() + narrowFilename.length(), - &wideFilename[0]); - wstring wideFilepathWithoutRoot = - bfs::path(filepath).relative_path().wstring(); - - if (closeMemoryMappedSections) { - bool closedMappedSection = false; - while (lpMem < si.lpMaximumApplicationAddress) { - VirtualQueryEx(currentProcessHandle, lpMem, &mbi, - sizeof(MEMORY_BASIC_INFORMATION)); - lpMem += mbi.RegionSize; - - if (mbi.Type != MEM_MAPPED || mbi.State != MEM_COMMIT || - mbi.Protect == PAGE_NOACCESS || mbi.RegionSize <= 4096) - continue; - - if (GetMappedFileNameW(currentProcessHandle, mbi.BaseAddress, - &mappedFilename[0], 260) == 0) - continue; - - if (!bal::iends_with(wstring(mappedFilename.data()), wideFilename)) - continue; - - if (!UnmapViewOfFile(mbi.BaseAddress)) { - fprintf(stderr, - "[force_close_handles_to_filepath()] Error calling " - "UnmapViewOfFile.\n"); - return; - } else { - // fprintf(stderr, "[force_close_handles_to_filepath()] Closed memory - // mapped section.\n"); - closedMappedSection = true; - } - } - - if (!closedMappedSection) - fprintf(stderr, - "[force_close_handles_to_filepath()] Failed to find memory " - "mapped section.\n"); - } - - wchar_t szPath[260]; - - // iterate over every handle and close file handles that match the filepath - for (DWORD i = 0; i < pInfo->HandleCount; i++) { - auto& handleInfo = pInfo->Handles[i]; - if (handleInfo.ProcessID != currentProcessId) continue; - - if (handleInfo.HandleType == fileHandleType) { - szPath[0] = '\0'; - if (!GetFileNameFromHandle((HANDLE)handleInfo.Handle, szPath, 260)) { - /*char messageBuffer[256]; - memset(messageBuffer, 0, 256); - FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&messageBuffer, 255, - NULL); - - fprintf(stderr, "[force_close_handles_to_filepath()] Error calling - GetFileNameFromHandle: %s\n", messageBuffer);*/ - continue; - } - - wchar_t* handlePath = szPath; - if (bal::iends_with(handlePath, wideFilepathWithoutRoot.c_str())) { - if (!CloseHandle((HANDLE)handleInfo.Handle)) - fprintf(stderr, - "[force_close_handles_to_filepath()] Error closing file " - "handle.\n"); - // else - // fprintf(stderr, "[force_close_handles_to_filepath()] Closed file - // handle: " + gcnew String(handlePath)); - } - } else if (closeMemoryMappedSections) { - // close handle to memory mapped section - SIZE_T viewSize = 1; - PVOID viewBase = NULL; - - NTSTATUS status = NtMapViewOfSection( - (HANDLE)handleInfo.Handle, currentProcessHandle, &viewBase, 0, 0, - NULL, &viewSize, ViewShare, 0, PAGE_READONLY); - - if (!NT_SUCCESS(status)) continue; - - vector mappedFilename(260); - auto result = GetMappedFileNameW(currentProcessHandle, viewBase, - &mappedFilename[0], 260); - - NtUnmapViewOfSection(currentProcessHandle, viewBase); - - if (result == 0) continue; - - if (!bal::iends_with(wstring(mappedFilename.data()), wideFilename)) - continue; - - if (!CloseHandle((HANDLE)handleInfo.Handle)) - fprintf(stderr, - "[force_close_handles_to_filepath()] Error closing section " - "handle.\n"); - // else - // fprintf(stderr, "[force_close_handles_to_filepath()] Closed section - // handle.\n"); - } - } -#endif -} - -PWIZ_API_DECL void enable_utf8_path_operations() { - UTF8_BoostFilesystemPathImbuer::instance->imbue(); -} - -// Begin added PAPPSO for MXE -#ifndef MXE -// End added PAPPSO for MXE - -PWIZ_API_DECL int expand_pathmask(const bfs::path& pathmask, - vector& matchingPaths) { - UTF8_BoostFilesystemPathImbuer::instance->imbue(); - - using bfs::path; - int matchingPathCount = 0; - -#ifdef WIN32 - path maskParentPath = pathmask.branch_path(); - WIN32_FIND_DATAW fdata; - HANDLE srcFile = FindFirstFileExW( - boost::nowide::widen(pathmask.string()).c_str(), FindExInfoStandard, - &fdata, FindExSearchNameMatch, NULL, 0); - if (srcFile == INVALID_HANDLE_VALUE) return 0; // no matches - - do { - if (!bal::equals(fdata.cFileName, L".") && - !bal::equals(fdata.cFileName, L"..") != 0) { - matchingPaths.push_back(maskParentPath / fdata.cFileName); - ++matchingPathCount; - } - } while (FindNextFileW(srcFile, &fdata)); - - FindClose(srcFile); - -#else - - glob_t globbuf; - int rv = glob(pathmask.string().c_str(), 0, NULL, &globbuf); - if (rv > 0 && rv != GLOB_NOMATCH) - throw runtime_error("FindFilesByMask(): glob() error"); - - DIR* curDir = opendir("."); - struct stat curEntryData; - - for (size_t i = 0; i < globbuf.gl_pathc; ++i) { - stat(globbuf.gl_pathv[i], &curEntryData); - if (S_ISDIR(curEntryData.st_mode) || S_ISREG(curEntryData.st_mode) || - S_ISLNK(curEntryData.st_mode)) { - matchingPaths.push_back(globbuf.gl_pathv[i]); - ++matchingPathCount; - } - } - closedir(curDir); - - globfree(&globbuf); - -#endif - - return matchingPathCount; -} -// Begin added PAPPSO for MXE -#endif -// End added PAPPSO for MXE - -namespace { -void copy_recursive(const bfs::path& from, const bfs::path& to) { - bfs::copy_directory(from, to); - - for (bfs::directory_entry& entry : bfs::directory_iterator(from)) { - bfs::file_status status = entry.status(); - if (status.type() == bfs::directory_file) - copy_recursive(entry.path(), to / entry.path().filename()); - else if (status.type() == bfs::regular_file) - bfs::copy_file(entry.path(), to / entry.path().filename()); - else - throw bfs::filesystem_error( - "[copy_directory] invalid path type", entry.path(), - boost::system::error_code( - boost::system::errc::no_such_file_or_directory, - boost::system::system_category())); - } -} - -void copy_recursive(const bfs::path& from, const bfs::path& to, - boost::system::error_code& ec) { - bfs::copy_directory(from, to, ec); - if (ec.value() != 0) return; - - for (bfs::directory_entry& entry : bfs::directory_iterator(from)) { - bfs::file_status status = entry.status(ec); - if (status.type() == bfs::directory_file) - copy_recursive(entry.path(), to / entry.path().filename(), ec); - else if (status.type() == bfs::regular_file) - bfs::copy_file(entry.path(), to / entry.path().filename(), ec); - else if (ec.value() != 0) - ec.assign(boost::system::errc::no_such_file_or_directory, - boost::system::system_category()); - } -} -} // namespace - -PWIZ_API_DECL void copy_directory(const bfs::path& from, const bfs::path& to, - bool recursive, - boost::system::error_code* ec) { - if (!bfs::is_directory(from)) - throw bfs::filesystem_error( - "[copy_directory] source path is not a directory", from, - boost::system::error_code(boost::system::errc::not_a_directory, - boost::system::system_category())); - - if (bfs::exists(to)) { - if (ec != NULL) - ec->assign(boost::system::errc::file_exists, - boost::system::system_category()); - else - throw bfs::filesystem_error( - "[copy_directory] target path exists", to, - boost::system::error_code(boost::system::errc::file_exists, - boost::system::system_category())); - } - - if (recursive) { - if (ec != NULL) - copy_recursive(from, to, *ec); - else - copy_recursive(from, to); - } else { - if (ec != NULL) - bfs::copy_directory(from, to, *ec); - else - bfs::copy_directory(from, to); - } -} - -using boost::uintmax_t; - -template -struct double3_policy : boost::spirit::karma::real_policies { - // up to 3 digits total, but no unnecessary precision - static unsigned int precision(T n) { - double fracPart, intPart; - fracPart = modf(n, &intPart); - return fracPart < 0.005 ? 0 : n < 10 ? 2 : n < 100 ? 1 : 0; - } - static bool trailing_zeros(T) { return false; } - - template - static bool dot(OutputIterator& sink, T n, unsigned int precision) { - if (precision == 0) return false; - return boost::spirit::karma::real_policies::dot(sink, n, precision); - } -}; - -PWIZ_API_DECL -string abbreviate_byte_size(uintmax_t byteSize, - ByteSizeAbbreviation abbreviationType) { - uintmax_t G, M, K; - string GS, MS, KS; - - switch (abbreviationType) { - default: - case ByteSizeAbbreviation_IEC: - G = (M = (K = 1024) << 10) << 10; - GS = " GiB"; - MS = " MiB"; - KS = " KiB"; - break; - - case ByteSizeAbbreviation_JEDEC: - G = (M = (K = 1024) << 10) << 10; - GS = " GB"; - MS = " MB"; - KS = " KB"; - break; - - case ByteSizeAbbreviation_SI: - G = (M = (K = 1000) * 1000) * 1000; - GS = " GB"; - MS = " MB"; - KS = " KB"; - break; - } - - string suffix; - double byteSizeDbl; - - if (byteSize >= G) { - byteSizeDbl = (double)byteSize / G; - // byteSizeDbl = round(byteSizeDbl * 100) / 100; - suffix = GS; - } else if (byteSize >= M) { - byteSizeDbl = (double)byteSize / M; - suffix = MS; - } else if (byteSize >= K) { - byteSizeDbl = (double)byteSize / K; - suffix = KS; - } else { - byteSizeDbl = (double)byteSize; - suffix = " B"; - return lexical_cast(byteSize) + suffix; - } - - using namespace boost::spirit::karma; - typedef real_generator> double3_type; - static const double3_type double3 = double3_type(); - char buffer[256]; - char* p = buffer; - generate(p, double3, byteSizeDbl); - return std::string(&buffer[0], p) + suffix; -} - -PWIZ_API_DECL bool isHTTP(const string& s) { - // using namespace boost::xpressive; - - // from URI RFC via http://stackoverflow.com/a/26766402/638445 - // sregex uriRegex = - // sregex::compile("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"); - // return regex_match(s, uriRegex); - - return bal::istarts_with(s, "http:") || bal::istarts_with(s, "https:"); -} - -#ifdef WIN32 -namespace { -struct FileWrapper : boost::noncopyable { - FileWrapper(HANDLE h) : h(h) {} - ~FileWrapper() { CloseHandle(h); } - bool operator==(const HANDLE& rhs) { return h == rhs; } - - private: - HANDLE h; -}; -} // namespace -#endif - -PWIZ_API_DECL string read_file_header(const string& filepath, size_t length) { - UTF8_BoostFilesystemPathImbuer::instance->imbue(); - - string head; - if (bfs::is_directory(filepath) || isHTTP(filepath)) return head; - - if (!bfs::exists(filepath)) - throw runtime_error("[read_file_header()] Unable to open file " + filepath + - " (file does not exist)"); - - const int RETRY_COUNT = 10; - for (int retry = 1; retry <= RETRY_COUNT; ++retry) { - try { -#ifdef WIN32 // check for locked files which can be opened by ifstream but only - // produce garbage when read (at least in VC12) - { - std::wstring wide_filepath = - boost::locale::conv::utf_to_utf(filepath); - FileWrapper handle(::CreateFileW(wide_filepath.c_str(), GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL)); - if (handle == INVALID_HANDLE_VALUE) - throw runtime_error("[read_file_header()] Unable to open file " + - filepath + - " (invalid permission or file locked)"); - } -#endif - - random_access_compressed_ifstream is(filepath.c_str()); - if (!is) - throw runtime_error("[read_file_header()] Unable to open file " + - filepath + " (" + strerror(errno) + ")"); - - head.resize(length, '\0'); - if (!is.read(&head[0], (std::streamsize)head.size()) && !is.eof()) - throw runtime_error("[read_file_header()] Unable to read file " + - filepath + " (" + strerror(errno) + ")"); - - break; - } catch (runtime_error& e) { - if (retry == RETRY_COUNT) throw e; - std::this_thread::sleep_for(std::chrono::milliseconds(200)); - } - } - return head; -} - -PWIZ_API_DECL void check_path_length(const string& path) { -#ifdef WIN32 - if (isHTTP(path)) return; - std::wstring wide_path = - boost::locale::conv::utf_to_utf(bfs::absolute(path).string()); - if (wide_path.length() > 250) - throw std::invalid_argument( - "path is too long (must be 250 characters or less): " + - bfs::absolute(path).string()); -#endif -} - -PWIZ_API_DECL TemporaryFile::TemporaryFile(const string& extension) { - filepath = bfs::temp_directory_path() / - bfs::unique_path("%%%%%%%%%%%%%%%%" + extension); -} - -PWIZ_API_DECL TemporaryFile::~TemporaryFile() { - if (bfs::exists(filepath)) bfs::remove(filepath); -} - -// Begin added PAPPSO for MXE -#ifndef MXE -// End added PAPPSO for MXE -PWIZ_API_DECL std::pair get_console_bounds( - const std::pair& defaultBounds) { -#ifdef WIN32 - CONSOLE_SCREEN_BUFFER_INFO csbi; - BOOL ret; - ret = GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); - if (ret) - return make_pair(csbi.dwSize.X, csbi.dwSize.Y); - else - return defaultBounds; -#else - winsize max; - if (ioctl(0, TIOCGWINSZ, &max) == 0) - return make_pair(max.ws_col, max.ws_row); - else - return defaultBounds; -#endif -} -// Begin added PAPPSO for MXE -#endif -// End added PAPPSO for MXE - -} // namespace util -} // namespace pwiz diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem-works-with-mxe.cpp libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem-works-with-mxe.cpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem-works-with-mxe.cpp 1970-01-01 00:00:00.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem-works-with-mxe.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -0,0 +1,914 @@ +// +// $Id$ +// +// +// Original author: Matt Chambers +// +// Copyright 2008 Spielberg Family Center for Applied Proteomics +// Cedars Sinai Medical Center, Los Angeles, California 90048 +// Copyright 2008 Vanderbilt University - Nashville, TN 37232 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#define PWIZ_SOURCE + +#include "Filesystem.hpp" + +// Begin added PAPPSO for MXE +#ifdef MXE +#pragma GCC warning "MXE is defined" +#undef WIN32 +#endif +// End added PAPPSO for MXE + +#ifdef WIN32 + +#pragma GCC warning "WIN32 is defined" +#define _WIN32_WINNT 0x0600 +#define WIN32_LEAN_AND_MEAN +// #define NOMINMAX +#define NOGDI +#include +#include +// #include +#include +#include +#include +#include +#else // ifdef WIN32 + +#pragma GCC warning "WIN32 is NOT defined" + +#include +#include + +// Begin added PAPPSO for MXE +#ifndef MXE +// End added PAPPSO for MXE + +#include +#include + +// Begin added PAPPSO for MXE +#endif // ifndef MXE +// End added PAPPSO for MXE + +#include +#include +#include +#ifndef MAX_PATH +#define MAX_PATH 255 +#endif // MAX_PATH +#endif // #else // ifdef WIN32 + +#include +#include "pwiz/utility/misc/random_access_compressed_ifstream.hpp" +#include +#include +#include +#include +// #include +#include +#include +// #include + +using std::runtime_error; +using std::string; +using std::vector; + +namespace +{ + +class UTF8_BoostFilesystemPathImbuer + : public boost::singleton +{ + public: + UTF8_BoostFilesystemPathImbuer(boost::restricted) + { + std::locale global_loc = std::locale(); + std::locale loc(global_loc, + new boost::filesystem::detail::utf8_codecvt_facet); + bfs::path::imbue(loc); + } + + void imbue() const {}; +}; + +#ifdef WIN32 +#define STATUS_INFO_LENGTH_MISMATCH 0xc0000004 + +#define SystemHandleInformation 16 + +extern "C" +{ + typedef NTSTATUS(NTAPI *_NtQuerySystemInformation)( + ULONG SystemInformationClass, + PVOID SystemInformation, + ULONG SystemInformationLength, + PULONG ReturnLength); + + struct SYSTEM_HANDLE + { + ULONG ProcessID; + BYTE HandleType; + BYTE Flags; + USHORT Handle; + PVOID Object; + ACCESS_MASK GrantedAccess; + }; + + struct SYSTEM_HANDLE_INFORMATION + { + ULONG HandleCount; + SYSTEM_HANDLE Handles[1]; + }; + + enum SECTION_INHERIT + { + ViewShare = 1, + ViewUnmap = 2 + }; + + struct SYSTEM_HANDLE_TABLE_ENTRY_INFO + { + USHORT UniqueProcessId; + USHORT CreatorBackTraceIndex; + UCHAR ObjectTypeIndex; + UCHAR HandleAttributes; + USHORT HandleValue; + PVOID Object; + ULONG GrantedAccess; + }; + + typedef NTSTATUS(NTAPI *_NtUnmapViewOfSection)(HANDLE ProcessHandle, + PVOID BaseAddress); + typedef NTSTATUS(NTAPI *_NtMapViewOfSection)( + HANDLE SectionHandle, + HANDLE ProcessHandle, + PVOID *BaseAddress, + ULONG_PTR ZeroBits, + SIZE_T CommitSize, + PLARGE_INTEGER SectionOffset, + PSIZE_T ViewSize, + SECTION_INHERIT InheritDisposition, + ULONG AllocationType, + ULONG Win32Protect); + + typedef NTSTATUS(NTAPI *_NtQueryObject)( + HANDLE Handle, + OBJECT_INFORMATION_CLASS ObjectInformationClass, + PVOID ObjectInformation, + ULONG ObjectInformationLength, + PULONG ReturnLength); + + PVOID + GetLibraryProcAddress(PSTR LibraryName, PSTR ProcName) + { + return GetProcAddress(GetModuleHandleA(LibraryName), ProcName); + } +} + +int +GetFileHandleTypeNumber(SYSTEM_HANDLE_INFORMATION *handleInfos) +{ + DWORD currentProcessId = GetCurrentProcessId(); + wstring fileType = L"File"; + std::vector typeInfoBytes(sizeof(PUBLIC_OBJECT_TYPE_INFORMATION)); + + _NtQueryObject NtQueryObject = + (_NtQueryObject)GetLibraryProcAddress("ntdll.dll", "NtQueryObject"); + if(NtQueryObject == nullptr) + { + fprintf(stderr, + "[force_close_handles_to_filepath()] Error getting NtQueryObject " + "function.\n"); + return 0; + } + + map handlesPerType; + for(size_t i = 0; i < handleInfos->HandleCount; ++i) + { + if(handleInfos->Handles[i].ProcessID != currentProcessId) + continue; + + if(handleInfos->Handles[i].HandleType < + 20) // this is not the File string you're looking for + continue; + + const auto handle = + reinterpret_cast(handleInfos->Handles[i].Handle); + ULONG size; + auto queryResult = NtQueryObject(handle, + ObjectTypeInformation, + typeInfoBytes.data(), + typeInfoBytes.size(), + &size); + if(queryResult == STATUS_INFO_LENGTH_MISMATCH) + { + typeInfoBytes.resize(size); + queryResult = NtQueryObject( + handle, ObjectTypeInformation, typeInfoBytes.data(), size, nullptr); + } + + if(NT_SUCCESS(queryResult)) + { + const auto typeInfo = + reinterpret_cast( + typeInfoBytes.data()); + const auto type = + std::wstring(typeInfo->TypeName.Buffer, + typeInfo->TypeName.Length / sizeof(WCHAR)); + if(type == fileType) + // return handleInfos->Handles[i].HandleType; + ++handlesPerType[handleInfos->Handles[i].HandleType]; + } + } + + if(handlesPerType.empty()) + return 0; + + auto typeMode = std::max_element(handlesPerType.begin(), + handlesPerType.end(), + [](const auto &a, const auto &b) { + return a.second < b.second; + }); + return typeMode->first; +} + +bool +GetFileNameFromHandle(HANDLE hFile, + wchar_t *filepathBuffer, + size_t bufferLength) +{ + // Get the file size. + DWORD dwFileSizeHi = 0; + DWORD dwFileSizeLo = GetFileSize(hFile, &dwFileSizeHi); + + // Cannot map 0-byte files + if(dwFileSizeLo == 0 && dwFileSizeHi == 0) + return false; + + // Create a file mapping object. + HANDLE hFileMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 1, NULL); + + if(!hFileMap) + return false; + + void *pMem = MapViewOfFile(hFileMap, FILE_MAP_READ, 0, 0, 1); + + if(!pMem) + return false; + + if(!GetMappedFileNameW( + GetCurrentProcess(), pMem, filepathBuffer, bufferLength)) + return false; + + UnmapViewOfFile(pMem); + CloseHandle(hFileMap); + + return true; +} +#endif +} // namespace + +namespace pwiz +{ +namespace util +{ + + +PWIZ_API_DECL bool +running_on_wine() +{ +#ifdef WIN32 + return GetLibraryProcAddress("ntdll.dll", "wine_get_version") != NULL; +#else + return false; +#endif +} + +PWIZ_API_DECL void +force_close_handles_to_filepath(const std::string &filepath, + bool closeMemoryMappedSections) noexcept(true) +{ +#ifdef WIN32 + if(running_on_wine()) + return; + + _NtQuerySystemInformation NtQuerySystemInformation = + (_NtQuerySystemInformation)GetLibraryProcAddress( + "ntdll.dll", "NtQuerySystemInformation"); + if(NtQuerySystemInformation == nullptr) + { + fprintf(stderr, + "[force_close_handles_to_filepath()] Error getting " + "NtQuerySystemInformation function.\n"); + return; + } + + _NtUnmapViewOfSection NtUnmapViewOfSection = nullptr; + _NtMapViewOfSection NtMapViewOfSection = nullptr; + if(closeMemoryMappedSections) + { + NtUnmapViewOfSection = (_NtUnmapViewOfSection)GetLibraryProcAddress( + "ntdll.dll", "NtUnmapViewOfSection"); + if(NtUnmapViewOfSection == nullptr) + { + fprintf(stderr, + "[force_close_handles_to_filepath()] Error getting " + "NtUnmapViewOfSection function.\n"); + return; + } + + NtMapViewOfSection = (_NtMapViewOfSection)GetLibraryProcAddress( + "ntdll.dll", "NtMapViewOfSection"); + if(NtMapViewOfSection == nullptr) + { + fprintf(stderr, + "[force_close_handles_to_filepath()] Error getting " + "NtMapViewOfSection function.\n"); + return; + } + } + + NTSTATUS status = 0; + DWORD dwSize = sizeof(SYSTEM_HANDLE_INFORMATION); + vector pInfoBytes(dwSize); + + do + { + // keep reallocing until buffer is big enough + DWORD newSize = 0; + status = NtQuerySystemInformation( + SystemHandleInformation, pInfoBytes.data(), dwSize, &newSize); + if(status == STATUS_INFO_LENGTH_MISMATCH) + { + if(newSize > 0) + dwSize = newSize; + else + dwSize *= 2; + pInfoBytes.resize(dwSize); + } + } + while(status == STATUS_INFO_LENGTH_MISMATCH); + + if(status != 0) + { + char messageBuffer[256]; + memset(messageBuffer, 0, 256); + FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + status, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)&messageBuffer, + 255, + NULL); + + fprintf(stderr, + "[force_close_handles_to_filepath()] Error calling " + "NtQuerySystemInformation function: %s\n", + messageBuffer); + return; + } + + auto pInfo = reinterpret_cast(pInfoBytes.data()); + int fileHandleType = GetFileHandleTypeNumber(pInfo); + if(fileHandleType == 0) + { + fprintf(stderr, + "[force_close_handles_to_filepath()] Unable to determine file " + "handle type number.\n"); + return; + } + + auto currentProcessId = GetCurrentProcessId(); + HANDLE currentProcessHandle = + OpenProcess(PROCESS_ALL_ACCESS, FALSE, currentProcessId); + + SYSTEM_INFO si; + GetSystemInfo(&si); + MEMORY_BASIC_INFORMATION mbi; + PCHAR lpMem = 0; + vector mappedFilename(260); + string narrowFilename = bfs::path(filepath).filename().string(); + vector wideFilename(narrowFilename.length()); + std::use_facet>(std::locale()) + .widen(narrowFilename.c_str(), + narrowFilename.c_str() + narrowFilename.length(), + &wideFilename[0]); + wstring wideFilepathWithoutRoot = + bfs::path(filepath).relative_path().wstring(); + + if(closeMemoryMappedSections) + { + bool closedMappedSection = false; + while(lpMem < si.lpMaximumApplicationAddress) + { + VirtualQueryEx(currentProcessHandle, + lpMem, + &mbi, + sizeof(MEMORY_BASIC_INFORMATION)); + lpMem += mbi.RegionSize; + + if(mbi.Type != MEM_MAPPED || mbi.State != MEM_COMMIT || + mbi.Protect == PAGE_NOACCESS || mbi.RegionSize <= 4096) + continue; + + if(GetMappedFileNameW(currentProcessHandle, + mbi.BaseAddress, + &mappedFilename[0], + 260) == 0) + continue; + + if(!bal::iends_with(wstring(mappedFilename.data()), wideFilename)) + continue; + + if(!UnmapViewOfFile(mbi.BaseAddress)) + { + fprintf(stderr, + "[force_close_handles_to_filepath()] Error calling " + "UnmapViewOfFile.\n"); + return; + } + else + { + // fprintf(stderr, "[force_close_handles_to_filepath()] Closed + // memory mapped section.\n"); + closedMappedSection = true; + } + } + + if(!closedMappedSection) + fprintf(stderr, + "[force_close_handles_to_filepath()] Failed to find memory " + "mapped section.\n"); + } + + wchar_t szPath[260]; + + // iterate over every handle and close file handles that match the filepath + for(DWORD i = 0; i < pInfo->HandleCount; i++) + { + auto &handleInfo = pInfo->Handles[i]; + if(handleInfo.ProcessID != currentProcessId) + continue; + + if(handleInfo.HandleType == fileHandleType) + { + szPath[0] = '\0'; + if(!GetFileNameFromHandle((HANDLE)handleInfo.Handle, szPath, 260)) + { + /*char messageBuffer[256]; + memset(messageBuffer, 0, 256); + FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&messageBuffer, + 255, NULL); + + fprintf(stderr, "[force_close_handles_to_filepath()] Error calling + GetFileNameFromHandle: %s\n", messageBuffer);*/ + continue; + } + + wchar_t *handlePath = szPath; + if(bal::iends_with(handlePath, wideFilepathWithoutRoot.c_str())) + { + if(!CloseHandle((HANDLE)handleInfo.Handle)) + fprintf(stderr, + "[force_close_handles_to_filepath()] Error closing " + "file handle.\n"); + // else + // fprintf(stderr, "[force_close_handles_to_filepath()] Closed + // file handle: " + gcnew String(handlePath)); + } + } + else if(closeMemoryMappedSections) + { + // close handle to memory mapped section + SIZE_T viewSize = 1; + PVOID viewBase = NULL; + + NTSTATUS status = NtMapViewOfSection((HANDLE)handleInfo.Handle, + currentProcessHandle, + &viewBase, + 0, + 0, + NULL, + &viewSize, + ViewShare, + 0, + PAGE_READONLY); + + if(!NT_SUCCESS(status)) + continue; + + vector mappedFilename(260); + auto result = GetMappedFileNameW( + currentProcessHandle, viewBase, &mappedFilename[0], 260); + + NtUnmapViewOfSection(currentProcessHandle, viewBase); + + if(result == 0) + continue; + + if(!bal::iends_with(wstring(mappedFilename.data()), wideFilename)) + continue; + + if(!CloseHandle((HANDLE)handleInfo.Handle)) + fprintf(stderr, + "[force_close_handles_to_filepath()] Error closing section " + "handle.\n"); + // else + // fprintf(stderr, "[force_close_handles_to_filepath()] Closed + // section handle.\n"); + } + } +#endif +} + +PWIZ_API_DECL void +enable_utf8_path_operations() +{ + UTF8_BoostFilesystemPathImbuer::instance->imbue(); +} + +// Begin added PAPPSO for MXE +#if !defined(MXE) && !defined(WIN10MINGW64) +// End added PAPPSO for MXE + +PWIZ_API_DECL int +expand_pathmask(const bfs::path &pathmask, vector &matchingPaths) +{ + UTF8_BoostFilesystemPathImbuer::instance->imbue(); + + using bfs::path; + int matchingPathCount = 0; + +#ifdef WIN32 + path maskParentPath = pathmask.parent_path(); + WIN32_FIND_DATAW fdata; + HANDLE srcFile = + FindFirstFileExW(boost::nowide::widen(pathmask.string()).c_str(), + FindExInfoStandard, + &fdata, + FindExSearchNameMatch, + NULL, + 0); + if(srcFile == INVALID_HANDLE_VALUE) + return 0; // no matches + + do + { + if(!bal::equals(fdata.cFileName, L".") && + !bal::equals(fdata.cFileName, L"..") != 0) + { + matchingPaths.push_back(maskParentPath / fdata.cFileName); + ++matchingPathCount; + } + } + while(FindNextFileW(srcFile, &fdata)); + + FindClose(srcFile); + +#else + + glob_t globbuf; + int rv = glob(pathmask.string().c_str(), 0, NULL, &globbuf); + if(rv > 0 && rv != GLOB_NOMATCH) + throw runtime_error("FindFilesByMask(): glob() error"); + + DIR *curDir = opendir("."); + struct stat curEntryData; + + for(size_t i = 0; i < globbuf.gl_pathc; ++i) + { + stat(globbuf.gl_pathv[i], &curEntryData); + if(S_ISDIR(curEntryData.st_mode) || S_ISREG(curEntryData.st_mode) || + S_ISLNK(curEntryData.st_mode)) + { + matchingPaths.push_back(globbuf.gl_pathv[i]); + ++matchingPathCount; + } + } + closedir(curDir); + + globfree(&globbuf); + +#endif + + return matchingPathCount; +} + +// Begin added PAPPSO for MXE +#endif +// End added PAPPSO for MXE + +PWIZ_API_DECL void +copy_directory(const bfs::path &from, + const bfs::path &to, + bool recursive, + boost::system::error_code *ec) +{ + if(!bfs::is_directory(from)) + throw bfs::filesystem_error( + "[copy_directory] source path is not a directory", + from, + boost::system::error_code(boost::system::errc::not_a_directory, + boost::system::system_category())); + + if(bfs::exists(to)) + { + if(ec != NULL) + ec->assign(boost::system::errc::file_exists, + boost::system::system_category()); + else + throw bfs::filesystem_error( + "[copy_directory] target path exists", + to, + boost::system::error_code(boost::system::errc::file_exists, + boost::system::system_category())); + } + + if(recursive) + { + if(ec != NULL) + bfs::copy(from, to, bfs::copy_options::recursive, *ec); + else + bfs::copy(from, to, bfs::copy_options::recursive); + } + else + { + if(ec != NULL) + bfs::copy(from, to, *ec); + else + bfs::copy(from, to); + } +} + + + +using boost::uintmax_t; + +template +struct double3_policy: boost::spirit::karma::real_policies +{ + // up to 3 digits total, but no unnecessary precision + static unsigned int + precision(T n) + { + double fracPart, intPart; + fracPart = modf(n, &intPart); + return fracPart < 0.005 ? 0 : n < 10 ? 2 : n < 100 ? 1 : 0; + } + + static bool + trailing_zeros(T) + { + return false; + } + + template + static bool + dot(OutputIterator &sink, T n, unsigned int precision) + { + if(precision == 0) + return false; + return boost::spirit::karma::real_policies::dot(sink, n, precision); + } +}; + +PWIZ_API_DECL +string +abbreviate_byte_size(uintmax_t byteSize, ByteSizeAbbreviation abbreviationType) +{ + uintmax_t G, M, K; + string GS, MS, KS; + + switch(abbreviationType) + { + default: + case ByteSizeAbbreviation_IEC: + G = (M = (K = 1024) << 10) << 10; + GS = " GiB"; + MS = " MiB"; + KS = " KiB"; + break; + + case ByteSizeAbbreviation_JEDEC: + G = (M = (K = 1024) << 10) << 10; + GS = " GB"; + MS = " MB"; + KS = " KB"; + break; + + case ByteSizeAbbreviation_SI: + G = (M = (K = 1000) * 1000) * 1000; + GS = " GB"; + MS = " MB"; + KS = " KB"; + break; + } + + string suffix; + double byteSizeDbl; + + if(byteSize >= G) + { + byteSizeDbl = (double)byteSize / G; + // byteSizeDbl = round(byteSizeDbl * 100) / 100; + suffix = GS; + } + else if(byteSize >= M) + { + byteSizeDbl = (double)byteSize / M; + suffix = MS; + } + else if(byteSize >= K) + { + byteSizeDbl = (double)byteSize / K; + suffix = KS; + } + else + { + byteSizeDbl = (double)byteSize; + suffix = " B"; + return lexical_cast(byteSize) + suffix; + } + + using namespace boost::spirit::karma; + typedef real_generator> double3_type; + static const double3_type double3 = double3_type(); + char buffer[256]; + char *p = buffer; + generate(p, double3, byteSizeDbl); + return std::string(&buffer[0], p) + suffix; +} + +PWIZ_API_DECL bool +isHTTP(const string &s) +{ + // using namespace boost::xpressive; + + // from URI RFC via http://stackoverflow.com/a/26766402/638445 + // sregex uriRegex = + // sregex::compile("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"); + // return regex_match(s, uriRegex); + + return bal::istarts_with(s, "http:") || bal::istarts_with(s, "https:"); +} + + +#ifdef WIN32 +namespace +{ +struct FileWrapper: boost::noncopyable +{ + FileWrapper(HANDLE h): h(h) + { + } + + ~FileWrapper() + { + CloseHandle(h); + } + + bool + operator==(const HANDLE &rhs) + { + return h == rhs; + } + + private: + HANDLE h; +}; +} // namespace +#endif + + +PWIZ_API_DECL string +read_file_header(const string &filepath, size_t length) +{ + UTF8_BoostFilesystemPathImbuer::instance->imbue(); + + string head; + if(bfs::is_directory(filepath) || isHTTP(filepath)) + return head; + + if(!bfs::exists(filepath)) + throw runtime_error("[read_file_header()] Unable to open file " + filepath + + " (file does not exist)"); + + const int RETRY_COUNT = 10; + for(int retry = 1; retry <= RETRY_COUNT; ++retry) + { + try + { +#ifdef WIN32 // check for locked files which can be opened by ifstream but only + // produce garbage when read (at least in VC12) + { + std::wstring wide_filepath = + boost::locale::conv::utf_to_utf(filepath); + FileWrapper handle(::CreateFileW(wide_filepath.c_str(), + GENERIC_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL)); + if(handle == INVALID_HANDLE_VALUE) + throw runtime_error("[read_file_header()] Unable to open file " + + filepath + + " (invalid permission or file locked)"); + } +#endif + + random_access_compressed_ifstream is(filepath.c_str()); + if(!is) + throw runtime_error("[read_file_header()] Unable to open file " + + filepath + " (" + strerror(errno) + ")"); + + head.resize(length, '\0'); + if(!is.read(&head[0], (std::streamsize)head.size()) && !is.eof()) + throw runtime_error("[read_file_header()] Unable to read file " + + filepath + " (" + strerror(errno) + ")"); + + break; + } + catch(runtime_error &e) + { + if(retry == RETRY_COUNT) + throw e; + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + } + } + return head; +} + +PWIZ_API_DECL void +check_path_length(const string &path) +{ +#ifdef WIN32 + if(isHTTP(path)) + return; + std::wstring wide_path = + boost::locale::conv::utf_to_utf(bfs::absolute(path).string()); + if(wide_path.length() > 250) + throw std::invalid_argument( + "path is too long (must be 250 characters or less): " + + bfs::absolute(path).string()); +#endif +} + +PWIZ_API_DECL +TemporaryFile::TemporaryFile(const string &filenamePrefix, + const string &extension) +{ + filepath = bfs::temp_directory_path() / + bfs::unique_path(filenamePrefix + "%%%%%%%%%%%%%%%%" + extension); +} + +PWIZ_API_DECL TemporaryFile::~TemporaryFile() +{ + if(bfs::exists(filepath)) + bfs::remove(filepath); +} + +// Begin added PAPPSO for MXE +#if !defined(MXE) && !defined(WIN10MINGW64) +// End added PAPPSO for MXE +PWIZ_API_DECL std::pair +get_console_bounds(const std::pair &defaultBounds) +{ +#ifdef WIN32 + CONSOLE_SCREEN_BUFFER_INFO csbi; + BOOL ret; + ret = GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); + if(ret) + return make_pair(csbi.dwSize.X, csbi.dwSize.Y); + else + return defaultBounds; +#else + winsize max; + if(ioctl(0, TIOCGWINSZ, &max) == 0) + return make_pair(max.ws_col, max.ws_row); + else + return defaultBounds; +#endif +} + +// Begin added PAPPSO for MXE +#endif +// End added PAPPSO for MXE + +} // namespace util +} // namespace pwiz diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem.cpp libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem.cpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem.cpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem.cpp 2026-11-10 12:51:53.000000000 +0000 @@ -35,7 +35,6 @@ #ifdef WIN32 #pragma GCC warning "WIN32 is defined" - #define _WIN32_WINNT 0x0600 #define WIN32_LEAN_AND_MEAN // #define NOMINMAX @@ -45,10 +44,8 @@ // #include #include #include - #include #include - #else // ifdef WIN32 #pragma GCC warning "WIN32 is NOT defined" @@ -64,22 +61,18 @@ #include // Begin added PAPPSO for MXE -#endif +#endif // ifndef MXE // End added PAPPSO for MXE #include #include +#include #include - #ifndef MAX_PATH - #define MAX_PATH 255 - -#endif - +#endif // MAX_PATH #endif // #else // ifdef WIN32 - #include #include "pwiz/utility/misc/random_access_compressed_ifstream.hpp" #include @@ -89,12 +82,12 @@ // #include #include #include +// #include using std::runtime_error; using std::string; using std::vector; - namespace { @@ -116,7 +109,7 @@ #ifdef WIN32 #define STATUS_INFO_LENGTH_MISMATCH 0xc0000004 -#define SystemHandleInformation 16 +#define SystemHandleInformation 16 extern "C" { @@ -136,35 +129,12 @@ ACCESS_MASK GrantedAccess; }; -// Begin F. Rusconi -- This define is performed in CMakeStuff/systemUname.cmake -#ifdef WIN10MINGW64 - - // In file /c/msys64/mingw64/include/winternl.h - // this is what is declared: - // typedef struct _SYSTEM_HANDLE_INFORMATION { - // ULONG Count; - // SYSTEM_HANDLE_ENTRY Handle[1]; - // } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION; - - // This declaration clashes with the above. - - struct PWIZ_SYSTEM_HANDLE_INFORMATION - { - ULONG HandleCount; - SYSTEM_HANDLE Handles[1]; - }; - -#else - struct SYSTEM_HANDLE_INFORMATION { ULONG HandleCount; SYSTEM_HANDLE Handles[1]; }; -#endif - // End F. Rusconi - enum SECTION_INHERIT { ViewShare = 1, @@ -203,33 +173,16 @@ ULONG ObjectInformationLength, PULONG ReturnLength); - PVOID GetLibraryProcAddress(PSTR LibraryName, PSTR ProcName) { - - // Begin added F. Rusconi -#ifdef WIN10MINGW64 - return (void *)GetProcAddress(GetModuleHandleA(LibraryName), ProcName); -#else return GetProcAddress(GetModuleHandleA(LibraryName), ProcName); -#endif - // End added F. Rusconi } } -// Begin added F. Rusconi -#ifdef WIN10MINGW64 -int -GetFileHandleTypeNumber(PWIZ_SYSTEM_HANDLE_INFORMATION *handleInfos) -{ -#else int GetFileHandleTypeNumber(SYSTEM_HANDLE_INFORMATION *handleInfos) { -#endif - // End added F. Rusconi - DWORD currentProcessId = GetCurrentProcessId(); wstring fileType = L"File"; std::vector typeInfoBytes(sizeof(PUBLIC_OBJECT_TYPE_INFORMATION)); @@ -286,10 +239,11 @@ if(handlesPerType.empty()) return 0; - auto typeMode = std::max_element( - handlesPerType.begin(), - handlesPerType.end(), - [](const auto &a, const auto &b) { return a.second < b.second; }); + auto typeMode = std::max_element(handlesPerType.begin(), + handlesPerType.end(), + [](const auto &a, const auto &b) { + return a.second < b.second; + }); return typeMode->first; } @@ -345,7 +299,6 @@ #endif } - PWIZ_API_DECL void force_close_handles_to_filepath(const std::string &filepath, bool closeMemoryMappedSections) noexcept(true) @@ -391,15 +344,7 @@ } NTSTATUS status = 0; - -// Begin added F. Rusconi -#ifdef WIN10MINGW64 - DWORD dwSize = sizeof(PWIZ_SYSTEM_HANDLE_INFORMATION); -#else - DWORD dwSize = sizeof(SYSTEM_HANDLE_INFORMATION); -#endif - // End added F. Rusconi - + DWORD dwSize = sizeof(SYSTEM_HANDLE_INFORMATION); vector pInfoBytes(dwSize); do @@ -438,15 +383,7 @@ return; } -// Begin added F. Rusconi -#ifdef WIN10MINGW64 - auto pInfo = - reinterpret_cast(pInfoBytes.data()); -#else auto pInfo = reinterpret_cast(pInfoBytes.data()); -#endif - // End added F. Rusconi - int fileHandleType = GetFileHandleTypeNumber(pInfo); if(fileHandleType == 0) { @@ -600,7 +537,6 @@ #endif } - PWIZ_API_DECL void enable_utf8_path_operations() { @@ -608,7 +544,7 @@ } // Begin added PAPPSO for MXE -#ifndef MXE +#if !defined(MXE) && !defined(WIN10MINGW64) // End added PAPPSO for MXE PWIZ_API_DECL int @@ -620,7 +556,7 @@ int matchingPathCount = 0; #ifdef WIN32 - path maskParentPath = pathmask.branch_path(); + path maskParentPath = pathmask.parent_path(); WIN32_FIND_DATAW fdata; HANDLE srcFile = FindFirstFileExW(boost::nowide::widen(pathmask.string()).c_str(), @@ -678,53 +614,6 @@ #endif // End added PAPPSO for MXE -namespace -{ -void -copy_recursive(const bfs::path &from, const bfs::path &to) -{ - bfs::copy_directory(from, to); - - for(bfs::directory_entry &entry : bfs::directory_iterator(from)) - { - bfs::file_status status = entry.status(); - if(status.type() == bfs::directory_file) - copy_recursive(entry.path(), to / entry.path().filename()); - else if(status.type() == bfs::regular_file) - bfs::copy_file(entry.path(), to / entry.path().filename()); - else - throw bfs::filesystem_error( - "[copy_directory] invalid path type", - entry.path(), - boost::system::error_code( - boost::system::errc::no_such_file_or_directory, - boost::system::system_category())); - } -} - -void -copy_recursive(const bfs::path &from, - const bfs::path &to, - boost::system::error_code &ec) -{ - bfs::copy_directory(from, to, ec); - if(ec.value() != 0) - return; - - for(bfs::directory_entry &entry : bfs::directory_iterator(from)) - { - bfs::file_status status = entry.status(ec); - if(status.type() == bfs::directory_file) - copy_recursive(entry.path(), to / entry.path().filename(), ec); - else if(status.type() == bfs::regular_file) - bfs::copy_file(entry.path(), to / entry.path().filename(), ec); - else if(ec.value() != 0) - ec.assign(boost::system::errc::no_such_file_or_directory, - boost::system::system_category()); - } -} -} // namespace - PWIZ_API_DECL void copy_directory(const bfs::path &from, const bfs::path &to, @@ -754,24 +643,25 @@ if(recursive) { if(ec != NULL) - copy_recursive(from, to, *ec); + bfs::copy(from, to, bfs::copy_options::recursive, *ec); else - copy_recursive(from, to); + bfs::copy(from, to, bfs::copy_options::recursive); } else { if(ec != NULL) - bfs::copy_directory(from, to, *ec); + bfs::copy(from, to, *ec); else - bfs::copy_directory(from, to); + bfs::copy(from, to); } } + using boost::uintmax_t; template -struct double3_policy : boost::spirit::karma::real_policies +struct double3_policy: boost::spirit::karma::real_policies { // up to 3 digits total, but no unnecessary precision static unsigned int @@ -781,6 +671,7 @@ fracPart = modf(n, &intPart); return fracPart < 0.005 ? 0 : n < 10 ? 2 : n < 100 ? 1 : 0; } + static bool trailing_zeros(T) { @@ -836,7 +727,7 @@ { byteSizeDbl = (double)byteSize / G; // byteSizeDbl = round(byteSizeDbl * 100) / 100; - suffix = GS; + suffix = GS; } else if(byteSize >= M) { @@ -864,7 +755,6 @@ return std::string(&buffer[0], p) + suffix; } - PWIZ_API_DECL bool isHTTP(const string &s) { @@ -878,18 +768,21 @@ return bal::istarts_with(s, "http:") || bal::istarts_with(s, "https:"); } + #ifdef WIN32 namespace { -struct FileWrapper : boost::noncopyable +struct FileWrapper: boost::noncopyable { - FileWrapper(HANDLE h) : h(h) + FileWrapper(HANDLE h): h(h) { } + ~FileWrapper() { CloseHandle(h); } + bool operator==(const HANDLE &rhs) { @@ -962,7 +855,6 @@ return head; } - PWIZ_API_DECL void check_path_length(const string &path) { @@ -978,12 +870,12 @@ #endif } - PWIZ_API_DECL -TemporaryFile::TemporaryFile(const string &extension) +TemporaryFile::TemporaryFile(const string &filenamePrefix, + const string &extension) { filepath = bfs::temp_directory_path() / - bfs::unique_path("%%%%%%%%%%%%%%%%" + extension); + bfs::unique_path(filenamePrefix + "%%%%%%%%%%%%%%%%" + extension); } PWIZ_API_DECL TemporaryFile::~TemporaryFile() @@ -993,9 +885,8 @@ } // Begin added PAPPSO for MXE -#ifndef MXE +#if !defined(MXE) && !defined(WIN10MINGW64) // End added PAPPSO for MXE - PWIZ_API_DECL std::pair get_console_bounds(const std::pair &defaultBounds) { diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem.hpp libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem.hpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/Filesystem.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/Filesystem.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -34,8 +34,9 @@ #include "String.hpp" #include "Container.hpp" #include -#include #include +#include +#include #include #include "pwiz/utility/misc/random_access_compressed_ifstream.hpp" @@ -54,19 +55,43 @@ // and v3 breaks the API in surprising ways // see http://www.boost.org/doc/libs/1_47_0/libs/filesystem/v3/doc/deprecated.html #if BOOST_FILESYSTEM_VERSION == 2 -// in BFS2 p.filename() or p.leaf() or p.extension() returns a string +// in BFS2 p.filename() or p.filename() or p.extension() returns a string #define BFS_STRING(p) p #define BFS_GENERIC_STRING(p) p // in BFS2 complete() is in namespace #define BFS_COMPLETE bfs::complete #else -// in BFS3 p.filename() or p.leaf() or p.extension() returns a bfs::path +// in BFS3 p.filename() or p.filename() or p.extension() returns a bfs::path #define BFS_STRING(p) (p).string() #define BFS_GENERIC_STRING(p) (p).generic_string() // in BFS3 complete() is not in namespace #define BFS_COMPLETE bfs::system_complete #endif + +namespace boost { +namespace filesystem { + + inline std::string extension(const path& p) + { + return p.extension().string(); + } + + inline std::string basename(const path& p) + { + return p.stem().string(); + } + + inline path change_extension(const path& p, const path& new_extension) + { + path new_p(p); + new_p.replace_extension(new_extension); + return new_p; + } +} // filesystem +} // boost + + namespace pwiz { namespace util { @@ -77,10 +102,10 @@ /// on Windows, closes all file handles and memory mapped sections relating to the given filepath PWIZ_API_DECL void force_close_handles_to_filepath(const std::string& filepath, bool closeMemoryMappedSections = false) noexcept(true); - - -/// adds utf8_codecvt_facet to boost::filesystem::path's default behavior so it works with UTF-8 std::strings; -/// uses a singleton so the imbuement is only done once + + +/// adds utf8_codecvt_facet to boost::filesystem::path's default behavior so it works with UTF-8 std::strings; +/// uses a singleton so the imbuement is only done once PWIZ_API_DECL void enable_utf8_path_operations(); @@ -97,6 +122,11 @@ /// - if "ec" is NULL, a boost::filesystem_error is thrown PWIZ_API_DECL void copy_directory(const bfs::path& from, const bfs::path& to, bool recursive = true, boost::system::error_code* ec = 0); + +/// wrapper for std::filesystem::canonical because boost::filesystem::canonical has an issue on Wine +PWIZ_API_DECL bfs::path canonical(const bfs::path from); + + PWIZ_API_DECL enum ByteSizeAbbreviation { /// sizes are treated as multiples of 2; @@ -131,7 +161,8 @@ PWIZ_API_DECL class TemporaryFile { public: - TemporaryFile(const string& extension/* = ".tmp"*/); + TemporaryFile(const string& filenamePrefix, const string& extension); + TemporaryFile(const string& extension/* = ".tmp"*/) : TemporaryFile("", extension) {}; ~TemporaryFile(); const bfs::path& path() const { return filepath; } diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/Image.hpp libpwizlite-3.0.15/src/pwiz/utility/misc/Image.hpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/Image.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/Image.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -67,7 +67,7 @@ /// create an instance /// optional output_width and output_height allows easy scaling to a desired output /// image size without complicating the drawing code (default is to use logical width and height) - static std::auto_ptr create(int logical_width, int logical_height, + static std::unique_ptr create(int logical_width, int logical_height, int output_width=-1, int output_height=-1); // -1 means use logical /// draw pixel diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/Std.hpp libpwizlite-3.0.15/src/pwiz/utility/misc/Std.hpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/Std.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/Std.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -50,7 +50,6 @@ #include #include #include -using std::auto_ptr; using std::unique_ptr; using boost::shared_ptr; using boost::weak_ptr; diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/VendorReaderTestHarness.hpp libpwizlite-3.0.15/src/pwiz/utility/misc/VendorReaderTestHarness.hpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/VendorReaderTestHarness.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/VendorReaderTestHarness.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -69,7 +69,7 @@ struct PWIZ_API_DECL ReaderTestConfig : public pwiz::msdata::Reader::Config { - ReaderTestConfig() : peakPicking(false), peakPickingCWT(false), thresholdCount(0), doublePrecision(false), autoTest(false) {} + ReaderTestConfig() : peakPicking(false), peakPickingCWT(false), thresholdCount(0), doublePrecision(false), autoTest(false), reportTimings(false) {} ReaderTestConfig(const ReaderTestConfig& rhs) : pwiz::msdata::Reader::Config(rhs) { peakPicking = rhs.peakPicking; @@ -94,6 +94,7 @@ boost::optional runIndex; bool autoTest; // test config variant generated automatically (e.g. thresholdCount) that does not use a separate mzML file + bool reportTimings; }; /// A common test harness for vendor readers; returns a TestResult (with count of failedTests and totalTests) diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/cpp_cli_utilities.hpp libpwizlite-3.0.15/src/pwiz/utility/misc/cpp_cli_utilities.hpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/cpp_cli_utilities.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/cpp_cli_utilities.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -293,7 +293,7 @@ #define CATCH_AND_FORWARD_EX(param) \ catch (std::exception&) {throw;} \ catch (_com_error& e) {throw std::runtime_error(std::string("COM error: ") + e.ErrorMessage());} \ - /*catch (CException* e) {std::auto_ptr exceptionDeleter(e); char message[1024]; e->GetErrorMessage(message, 1024); throw std::runtime_error(string("MFC error: ") + message);}*/ \ + /*catch (CException* e) {std::unique_ptr exceptionDeleter(e); char message[1024]; e->GetErrorMessage(message, 1024); throw std::runtime_error(string("MFC error: ") + message);}*/ \ catch (System::AggregateException^ e) { throw std::runtime_error(trimFunctionMacro(__FUNCTION__, (param)) + pwiz::util::ToStdString(e->ToString())); } \ catch (System::Exception^ e) { throw std::runtime_error(trimFunctionMacro(__FUNCTION__, (param)) + flattenInnerExceptions(e)); } diff -Nru libpwizlite-3.0.8/src/pwiz/utility/misc/unit.hpp libpwizlite-3.0.15/src/pwiz/utility/misc/unit.hpp --- libpwizlite-3.0.8/src/pwiz/utility/misc/unit.hpp 2024-05-15 21:33:07.000000000 +0000 +++ libpwizlite-3.0.15/src/pwiz/utility/misc/unit.hpp 2026-11-10 12:51:53.000000000 +0000 @@ -88,8 +88,10 @@ ((os) << (!(x) ? pwiz::util::unit_assert_message(__FILE__, __LINE__, #x) + "\n" : "")) -#define unit_assert_operator_equal(expected, actual) \ - (!((expected) == (actual)) ? throw std::runtime_error(pwiz::util::unit_assert_equal_message(__FILE__, __LINE__, lexical_cast(expected), lexical_cast(actual), #actual)) : 0) +#define unit_assert_operator_equal(expected, actual) unit_assert_operator_equal_message(expected, actual, "") + +#define unit_assert_operator_equal_message(expected, actual, message) \ + (!((expected) == (actual)) ? throw std::runtime_error(pwiz::util::unit_assert_equal_message(__FILE__, __LINE__, lexical_cast(expected), lexical_cast(actual), #actual) + (message)) : 0) #define unit_assert_operator_equal_to_stream(expected, actual, os) \ ((os) << (!((expected) == (actual)) ? pwiz::util::unit_assert_equal_message(__FILE__, __LINE__, lexical_cast(expected), lexical_cast(actual), #actual) + "\n" : ""))