Skip to content

Commit

Permalink
Merge branch 'master' into feature/update-to-boost-1.86
Browse files Browse the repository at this point in the history
  • Loading branch information
chambm authored Jan 13, 2025
2 parents 2f16aa7 + 8ace8f0 commit 2827d10
Show file tree
Hide file tree
Showing 2,705 changed files with 20,362 additions and 11,229 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ jobs:
# compiler: g++-9,
# toolset: 'toolset=gcc'
# }
- {
name: "macOS Latest Clang",
os: macos-12,
compiler: 'latest clang',
toolset: 'toolset=darwin'
}
# - {
# name: "macOS Latest Clang",
# os: macos-12,
# compiler: 'latest clang',
# toolset: 'toolset=darwin'
# }

# Using the value from the matrix above we select the platform (operating system) to run on
runs-on: ${{ matrix.config.os }}
Expand Down
66 changes: 37 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ ASALocalRun/
# NVidia Nsight GPU debugger configuration file
*.nvuser

/build-nt-x86
build-nt-x86
/src_subset
/*.log
/libraries/boost_1_*
/libraries/expat*
Expand All @@ -379,7 +380,8 @@ Version.cpp
/pwiz_tools/Bumbershoot/**/AssemblyInfo.cpp
/pwiz_tools/Bumbershoot/**/AssemblyInfo.cs
/pwiz_tools/Bumbershoot/idpicker/Resources/Resources.*
/pwiz_tools/Skyline/Executables/SkylineBatch/SkylineBatch/Properties/AssemblyInfo.cs
/pwiz/utility/bindings/CLI/example/binaries
/artifact_xml

# Vendor reader test data extracted from tarballs (newer data should be committed directly to git)
/pwiz/data/vendor_readers/*/Reader*Test.data/**/1SRef
Expand All @@ -391,6 +393,7 @@ Version.cpp
/pwiz_aux/msrc/utility/vendor_api/**/*.dll
/pwiz_aux/msrc/utility/vendor_api/*/EULA.*
/pwiz_aux/msrc/utility/vendor_api/ABI/LicenseKey.h
/pwiz_aux/msrc/utility/vendor_api/ABI/SCIEX.Apis.Data.v1.xml
/pwiz_aux/msrc/utility/vendor_api/Agilent/x64/
/pwiz_aux/msrc/utility/vendor_api/Agilent/x86/
/pwiz_aux/msrc/utility/vendor_api/Bruker/BAF2SQL-README.txt
Expand All @@ -399,10 +402,12 @@ Version.cpp
/pwiz_aux/msrc/utility/vendor_api/Bruker/x64/
/pwiz_aux/msrc/utility/vendor_api/Bruker/x86/
/pwiz_aux/msrc/utility/vendor_api/Bruker/**/*.h
/pwiz_aux/msrc/utility/vendor_api/Bruker/**.SxS.manifest
/pwiz_aux/msrc/utility/vendor_api/Mobilion/*.h
/pwiz_aux/msrc/utility/vendor_api/Shimadzu/*.xml
/pwiz_aux/msrc/utility/vendor_api/Shimadzu/*.txt
/pwiz_aux/msrc/utility/vendor_api/Waters/MassLynx*.h*
/pwiz_aux/msrc/utility/vendor_api/thermo/x64
/pwiz_aux/msrc/utility/vendor_api/thermo/ThermoFisher.CommonCore.RawFileReader.xml
/pwiz_aux/msrc/utility/vendor_api/thermo/ThermoFisher.CommonCore.MassPrecisionEstimator.xml
/pwiz_aux/msrc/utility/vendor_api/thermo/ThermoFisher.CommonCore.Data.xml
Expand All @@ -420,45 +425,48 @@ SkylineTester Results
/bs32.bat
/bso64.bat
/bso32.bat
/qb64.bat
/SignAfterPublishPW.bat
/OnyxTOFMS.试验.wiff.scan
/160109_Mix1_calcurve_074_raw.skyl
/160109_Mix1_calcurve_074_raw.skyd
/160109_Mix1_calcurve_074_raw
/160109_Mix1_calcurve_073_mzML.skyl
/160109_Mix1_calcurve_073_mzML.skyd
/160109_Mix1_calcurve_073_mzML
/160109_Mix1_calcurve_071_raw.skyl
/160109_Mix1_calcurve_071_raw.skyd
/160109_Mix1_calcurve_071_raw
/160109_Mix1_calcurve_070_mzML.skyl
/160109_Mix1_calcurve_070_mzML.skyd
/160109_Mix1_calcurve_070_mzML
/REP02_CE_Vantage_15mTorr_0001_REP2_02_raw.skyl
/REP02_CE_Vantage_15mTorr_0001_REP2_02_raw.skyd
/REP02_CE_Vantage_15mTorr_0001_REP2_02_raw
/REP02_CE_Vantage_15mTorr_0001_REP2_01_raw.skyl
/REP02_CE_Vantage_15mTorr_0001_REP2_01_raw.skyd
/REP02_CE_Vantage_15mTorr_0001_REP2_01_raw
/REP01_CE_Vantage_15mTorr_0001_REP1_02_raw.skyl
/REP01_CE_Vantage_15mTorr_0001_REP1_02_raw.skyd
/REP01_CE_Vantage_15mTorr_0001_REP1_02_raw
/REP01_CE_Vantage_15mTorr_0001_REP1_01_raw.skyl
/REP01_CE_Vantage_15mTorr_0001_REP1_01_raw.skyd
/REP01_CE_Vantage_15mTorr_0001_REP1_01_raw
/160109_Mix1_calcurve_074_raw*
/160109_Mix1_calcurve_073_mzML*
/160109_Mix1_calcurve_071_raw*
/160109_Mix1_calcurve_070_mzML*
/REP02_CE_Vantage_15mTorr_0001_REP2_02_raw*
/REP02_CE_Vantage_15mTorr_0001_REP2_01_raw*
/REP01_CE_Vantage_15mTorr_0001_REP1_02_raw*
/REP01_CE_Vantage_15mTorr_0001_REP1_01_raw*
/pwiz_tools/Skyline/Properties/AssemblyInfo.cs
/pwiz_tools/Skyline/SkylineCmd/Properties/AssemblyInfo.cs
/pwiz_tools/Skyline/SkylineNightly/Properties/AssemblyInfo.cs
/pwiz_tools/Skyline/SkylineNightlyShim/Properties/AssemblyInfo.cs
/pwiz_tools/Skyline/SkylineTester/Properties/AssemblyInfo.cs
/pwiz_tools/Skyline/TestRunner/Properties/AssemblyInfo.cs
/pwiz_tools/Skyline/Executables/SkylineBatch/SkylineBatch/Properties/AssemblyInfo.cs
/pwiz_tools/Skyline/Executables/Installer/FileList64.txt
/pwiz_tools/Skyline/TestSettings_x??.testsettings
/pwiz_tools/Skyline/SignAfterPublishPW.bat
/BrowseOnly
/x64/BrowseOnly
/qb64.bat
/pwiz_tools/Skyline/Test/ProtocolBuffers/GeneratedCode/*.cs
/pwiz_tools/Skyline/Test/ProtocolBuffers/tmp/*.cs
/pwiz_tools/Skyline/Test/ProtocolBuffers/tmp
/pwiz_aux/msrc/utility/vendor_api/ABI/SCIEX.Apis.Data.v1.xml
/SearchControlLog.txt

# created by WIFF2 SDK in working directory
/UserSettings.data
/UserSettings.data-journal

# created by TeamCity for Skyline versions that need PrositConfig.xml
/pwiz_tools/Skyline/Model/Prosit/

# created by older versions of the code in the working directory
/Enolase_repeats_AQv1.4.2*
/PressureTrace1*
/7600ZenoTOFMSMS*
/swath.api*
/timstof_prm_scheduler.prmsqlite

# created by tc-perftests.bat
/perfTestNames.txt
/tutorialTestNames.txt
/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,30 @@ ChromatogramList_LockmassRefiner::ChromatogramList_LockmassRefiner(const msdata:
: ChromatogramListWrapper(inner), mzPositiveScans_(lockmassMzPosScans), mzNegativeScans_(lockmassMzNegScans), tolerance_(lockmassTolerance)
{

// add processing methods to the copy of the inner ChromatogramList's data processing
ProcessingMethod method;
method.order = dp_->processingMethods.size();
method.set(MS_m_z_calibration);

if (!dp_->processingMethods.empty())
method.softwarePtr = dp_->processingMethods[0].softwarePtr;

detail::ChromatogramList_Waters* waters = dynamic_cast<detail::ChromatogramList_Waters*>(&*inner);
if (waters)
{
// add processing methods to the copy of the inner ChromatogramList's data processing
ProcessingMethod method;
method.order = dp_->processingMethods.size();
method.set(MS_m_z_calibration);

if (!dp_->processingMethods.empty())
method.softwarePtr = dp_->processingMethods[0].softwarePtr;

method.userParams.push_back(UserParam("Waters lockmass correction"));
dp_->processingMethods.push_back(method);
}
else
{
cerr << "Warning: lockmass refinement was requested, but is unavailable";
cerr << "Warning: lockmass refinement for chromatogram data was requested, but is unavailable";
#ifdef WIN32
cerr << " for non-Waters input data. ";
#else
cerr << " as it depends on Windows DLLs. ";
#endif
cerr << endl;
}
dp_->processingMethods.push_back(method);
}


Expand Down
23 changes: 11 additions & 12 deletions pwiz/analysis/spectrum_processing/SpectrumList_LockmassRefiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,30 @@ PWIZ_API_DECL
SpectrumList_LockmassRefiner::SpectrumList_LockmassRefiner(const msdata::SpectrumListPtr& inner, double lockmassMzPosScans, double lockmassMzNegScans, double lockmassTolerance)
: SpectrumListWrapper(inner), mzPositiveScans_(lockmassMzPosScans), mzNegativeScans_(lockmassMzNegScans), tolerance_(lockmassTolerance)
{

// add processing methods to the copy of the inner SpectrumList's data processing
ProcessingMethod method;
method.order = dp_->processingMethods.size();
method.set(MS_m_z_calibration);

if (!dp_->processingMethods.empty())
method.softwarePtr = dp_->processingMethods[0].softwarePtr;

SpectrumList_PeakPicker* peakPicker = dynamic_cast<SpectrumList_PeakPicker*>(&*inner);
SpectrumList_PeakPicker* peakPicker = dynamic_cast<SpectrumList_PeakPicker*>(&*inner); // If there's a peak picker, it will be outermost
detail::SpectrumList_Waters* waters = dynamic_cast<detail::SpectrumList_Waters*>(peakPicker ? &*peakPicker->inner() : &*inner);
if (waters)
{
// add processing methods to the copy of the inner SpectrumList's data processing
ProcessingMethod method;
method.order = dp_->processingMethods.size();
method.set(MS_m_z_calibration);

if (!dp_->processingMethods.empty())
method.softwarePtr = dp_->processingMethods[0].softwarePtr;
method.userParams.push_back(UserParam("Waters lockmass correction"));
dp_->processingMethods.push_back(method);
}
else
{
cerr << "Warning: lockmass refinement was requested, but is unavailable";
cerr << "Warning: lockmass refinement for spectrum data was requested, but is unavailable";
#ifdef WIN32
cerr << " for non-Waters input data. ";
#else
cerr << " as it depends on Windows DLLs. ";
#endif
cerr << endl;
}
dp_->processingMethods.push_back(method);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ PWIZ_API_DECL ChromatogramPtr ChromatogramList_Mobilion::chromatogram(size_t ind
if (!result.get())
throw std::runtime_error("[ChromatogramList_Mobilion::chromatogram()] Allocation error.");

boost::lock_guard<boost::mutex> lock(processWideHdf5Mutex); // lock_guard will unlock mutex when out of scope or when exception thrown (during destruction)
result->index = index;
result->id = ie.id;
result->set(ie.chromatogramType);
Expand Down
2 changes: 0 additions & 2 deletions pwiz/data/vendor_readers/Mobilion/Reader_Mobilion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ void Reader_Mobilion::read(const string& filename,
throw ReaderFail(string("[Reader_Mobilion::read()] Mobilion API does not support Unicode in filepaths ('") + utf8CharAsString(unicodeCharItr, filename.end()) + "')");
}

boost::lock_guard<boost::mutex> lock(processWideHdf5Mutex); // mutex unlocks when out of scope or when exception thrown (during destruction)

MBIFilePtr rawdata(new MBIFileWrapper(filename.c_str()));
result.run.spectrumListPtr = SpectrumListPtr(new SpectrumList_Mobilion(result, rawdata, config));
result.run.chromatogramListPtr = ChromatogramListPtr(new ChromatogramList_Mobilion(rawdata, config));
Expand Down
6 changes: 5 additions & 1 deletion pwiz/data/vendor_readers/Mobilion/Reader_Mobilion_Detail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,23 @@ namespace pwiz {
namespace msdata {
namespace detail {
namespace Mobilion {

extern boost::mutex processWideHdf5Mutex; // HDF5 library isn't thread-safe: allow just one at a time

PWIZ_API_DECL class MBIFileWrapper
{
public:
MBIFileWrapper(const std::string& filepath)
: file(filepath.c_str())
{
processWideHdf5Mutex.lock(); // HDF5 library isn't thread-safe: allow just one at a time
file.Init();
}

~MBIFileWrapper()
{
file.Close();
processWideHdf5Mutex.unlock(); // HDF5 library isn't thread-safe: allow just one at a time
}

MBIFile file;
Expand All @@ -65,7 +70,6 @@ PWIZ_API_DECL CVID translatePolarity(const std::string& polarity);
PWIZ_API_DECL CVID translateAsInletType(IonizationType ionizationType);
PWIZ_API_DECL CVID translate(ActivationType activationType);*/

extern boost::mutex processWideHdf5Mutex; // HDF5 library isn't thread-safe
} // Mobilion

using namespace Mobilion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ PWIZ_API_DECL SpectrumPtr SpectrumList_Mobilion::spectrum(size_t index, bool get

PWIZ_API_DECL SpectrumPtr SpectrumList_Mobilion::spectrum(size_t index, DetailLevel detailLevel) const
{
boost::lock_guard<boost::mutex> lock(processWideHdf5Mutex); // lock_guard will unlock mutex when out of scope or when exception thrown (during destruction)
if (index >= size_)
throw runtime_error("[SpectrumList_Mobilion::spectrum()] Bad index: "
+ lexical_cast<string>(index));
Expand Down
13 changes: 7 additions & 6 deletions pwiz/data/vendor_readers/Shimadzu/SpectrumList_Shimadzu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,17 @@ PWIZ_API_DECL SpectrumPtr SpectrumList_Shimadzu::spectrum(size_t index, DetailLe
spectrum->getPrecursorInfo(selectedMz, intensity, charge);

Precursor precursor;
/*if (spectrum->getHasIsolationInfo())
if (spectrum->getHasIsolationInfo())
{
double centerMz, lowerLimit, upperLimit;
spectrum->getIsolationInfo(centerMz, lowerLimit, upperLimit);
precursor.isolationWindow.set(MS_isolation_window_target_m_z, centerMz, MS_m_z);
precursor.isolationWindow.set(MS_isolation_window_lower_offset, centerMz - lowerLimit, MS_m_z);
precursor.isolationWindow.set(MS_isolation_window_upper_offset, upperLimit - centerMz, MS_m_z);
selectedMz = centerMz;
}*/
precursor.isolationWindow.set(MS_isolation_window_target_m_z, selectedMz, MS_m_z);
precursor.isolationWindow.set(MS_isolation_window_lower_offset, lowerLimit, MS_m_z);
precursor.isolationWindow.set(MS_isolation_window_upper_offset, upperLimit, MS_m_z);
selectedMz = centerMz;
}
else
precursor.isolationWindow.set(MS_isolation_window_target_m_z, selectedMz, MS_m_z);

SelectedIon selectedIon;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ int main(int argc, char* argv[])

try
{
bfs::current_path(bfs::path(testArgs[0]).parent_path()); // set working directory to test exe location
if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout;
if (os_) *os_ << "PrmSchedulerTest\n";

Expand Down
56 changes: 15 additions & 41 deletions pwiz/utility/misc/VendorReaderTestHarness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ void testRead(const Reader& reader, const string& rawpath, const bfs::path& pare
bfs::path::string_type unicodeTestString(boost::locale::conv::utf_to_utf<bfs::path::value_type>(L"-试验"));
bfs::path rawpathPath(rawpath);
bfs::path newRawPath = bfs::current_path() / rawpathPath.filename();
vector<bfs::path> extraCopiedPaths;
const auto& oldExtension = newRawPath.extension().native();
newRawPath = newRawPath.replace_extension().native() + unicodeTestString + newRawPath.extension().native();
if (bfs::exists(newRawPath))
Expand All @@ -571,37 +572,19 @@ void testRead(const Reader& reader, const string& rawpath, const bfs::path& pare
// special case for wiff files with accompanying .scan files
if (bal::iends_with(rawpath, ".wiff") || bal::iends_with(rawpath, ".wiff2"))
{
bfs::path wiffscanPath(rawpathPath);
wiffscanPath.replace_extension(".wiff.scan");
if (bfs::exists(wiffscanPath))
for (auto ext : { L".wiff.scan", L".dad.scan", L".dad.sidx" })
{
bfs::path newWiffscanPath = bfs::current_path() / rawpathPath.filename(); // replace_extension won't work as desired on wiffscanPath
newWiffscanPath = newWiffscanPath.replace_extension().native() + unicodeTestString + boost::locale::conv::utf_to_utf<bfs::path::value_type>(L".wiff.scan");
if (bfs::exists(newWiffscanPath))
bfs::remove(newWiffscanPath);
bfs::copy_file(wiffscanPath, newWiffscanPath);
}

wiffscanPath = rawpathPath;
wiffscanPath.replace_extension(".dad.scan");
if (bfs::exists(wiffscanPath))
{
bfs::path newWiffscanPath = bfs::current_path() / rawpathPath.filename(); // replace_extension won't work as desired on wiffscanPath
newWiffscanPath = newWiffscanPath.replace_extension().native() + unicodeTestString + boost::locale::conv::utf_to_utf<bfs::path::value_type>(L".dad.scan");
if (bfs::exists(newWiffscanPath))
bfs::remove(newWiffscanPath);
bfs::copy_file(wiffscanPath, newWiffscanPath);
}

wiffscanPath = rawpathPath;
wiffscanPath.replace_extension(".dad.sidx");
if (bfs::exists(wiffscanPath))
{
bfs::path newWiffscanPath = bfs::current_path() / rawpathPath.filename(); // replace_extension won't work as desired on wiffscanPath
newWiffscanPath = newWiffscanPath.replace_extension().native() + unicodeTestString + boost::locale::conv::utf_to_utf<bfs::path::value_type>(L".dad.sidx");
if (bfs::exists(newWiffscanPath))
bfs::remove(newWiffscanPath);
bfs::copy_file(wiffscanPath, newWiffscanPath);
bfs::path wiffscanPath(rawpathPath);
wiffscanPath.replace_extension(ext);
if (bfs::exists(wiffscanPath))
{
bfs::path newWiffscanPath = bfs::current_path() / rawpathPath.filename(); // replace_extension won't work as desired on wiffscanPath
newWiffscanPath = newWiffscanPath.replace_extension().native() + unicodeTestString + boost::locale::conv::utf_to_utf<bfs::path::value_type>(ext);
if (bfs::exists(newWiffscanPath))
bfs::remove(newWiffscanPath);
bfs::copy_file(wiffscanPath, newWiffscanPath);
extraCopiedPaths.emplace_back(newWiffscanPath);
}
}
}
bfs::copy_file(rawpathPath, newRawPath);
Expand Down Expand Up @@ -682,17 +665,8 @@ void testRead(const Reader& reader, const string& rawpath, const bfs::path& pare
bfs::remove_all(newRawPath); // remove the copy of the RAW file with non-ASCII characters

// special case for wiff files with accompanying .scan files
if (bal::iequals(rawpathPath.extension().string(), ".wiff"))
{
bfs::path wiffscanPath(rawpathPath);
wiffscanPath.replace_extension(".wiff.scan");
if (bfs::exists(wiffscanPath))
{
bfs::path newWiffscanPath = bfs::current_path() / rawpathPath.filename(); // replace_extension won't work as desired on wiffscanPath
newWiffscanPath.replace_extension(unicodeTestString + boost::locale::conv::utf_to_utf<bfs::path::value_type>(L".wiff.scan"));
bfs::remove(newWiffscanPath);
}
}
for (auto extraPath : extraCopiedPaths)
bfs::remove(extraPath);
}
catch (bfs::filesystem_error& e)
{
Expand Down
2 changes: 2 additions & 0 deletions pwiz_aux/msrc/utility/vendor_api/Bruker/Jamfile.jam
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,6 @@ explicit install_pwiz_vendor_api_bruker ;
install install_pwiz_vendor_api_bruker_stub
: [ path.glob $(API_PATH) : *.manifest ]
;

explicit install_pwiz_vendor_api_bruker_stub ;
}
Loading

0 comments on commit 2827d10

Please sign in to comment.