CoreMS 2.0.1__tar.gz → 2.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {CoreMS-2.0.1 → CoreMS-2.0.6}/CoreMS.egg-info/PKG-INFO +7 -5
- {CoreMS-2.0.1 → CoreMS-2.0.6}/PKG-INFO +7 -5
- {CoreMS-2.0.1 → CoreMS-2.0.6}/README.md +6 -4
- CoreMS-2.0.6/corems/__init__.py +464 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/constant.py +271 -197
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/factory/parameters.py +7 -1
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/factory/processingSetting.py +12 -3
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/rawFileReader.py +1 -1
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/PeakPicking.py +5 -4
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/factory/MassSpectrumClasses.py +7 -4
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/input/massList.py +9 -1
- CoreMS-2.0.6/corems/mass_spectrum/input/numpyArray.py +108 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/output/export.py +4 -1
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_formula/calc/MolecularFormulaCalc.py +1 -3
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_formula/factory/MolecularFormulaFactory.py +78 -11
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/factory/MolecularLookupTable.py +107 -20
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/ms_peak/calc/MSPeakCalc.py +15 -8
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/transient/calc/TransientCalc.py +25 -8
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/transient/factory/TransientClasses.py +6 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/transient/input/brukerSolarix.py +94 -6
- {CoreMS-2.0.1 → CoreMS-2.0.6}/setup.py +1 -1
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_mass_spectrum.py +2 -2
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_molecularFormula.py +22 -4
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_molecularFormulaSearch.py +75 -34
- CoreMS-2.0.1/corems/__init__.py +0 -137
- CoreMS-2.0.1/corems/mass_spectrum/input/numpyArray.py +0 -87
- {CoreMS-2.0.1 → CoreMS-2.0.6}/CoreMS.egg-info/SOURCES.txt +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/CoreMS.egg-info/dependency_links.txt +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/CoreMS.egg-info/requires.txt +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/CoreMS.egg-info/top_level.txt +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/Dockerfile +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/LICENSE +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/MANIFEST.in +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/chroma_peak/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/chroma_peak/calc/ChromaPeakCalc.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/chroma_peak/calc/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/chroma_peak/factory/ChromaPeakClasses.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/chroma_peak/factory/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/collection/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/collection/factory/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/collection/input/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/collection/output/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/factory/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/input/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/input/parameter_from_json.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/output/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/output/parameter_to_dict.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/encapsulation/output/parameter_to_json.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/calc/GC_Calc.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/calc/GC_Deconvolution.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/calc/GC_RI_Calibration.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/calc/LC_Calc.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/calc/LF_Targeted.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/calc/MZSearch.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/calc/SignalProcessing.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/calc/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/factory/GC_Class.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/factory/LC_Class.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/factory/LC_Temp.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/factory/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/andiNetCDF.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/boosterHDF5.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/brukerSolarix.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/coremsHDF5.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/massList.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/win_only/BrukerCompassXtract.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/win_only/ThermoMSFileReader.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/input/win_only/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/output/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectra/output/export.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/AutoRecalibration.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/Calibration.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/CalibrationCalc.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/KendrickGroup.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/MassErrorPrediction.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/MassSpectrumCalc.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/MeanResolvingPowerFilter.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/NoiseCalc.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/NoiseCalc_Bayes.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/calc/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/factory/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/input/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/input/baseClass.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/input/boosterHDF5.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/input/coremsHDF5.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/input/win_only/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/mass_spectrum/output/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_formula/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_formula/calc/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_formula/factory/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_formula/input/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_formula/input/masslist_ref.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/calc/ClusterFilter.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/calc/KendrickGroup.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/calc/MolecularFilter.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/calc/SpectralSimilarity.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/calc/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/calc/math_distance.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/factory/EI_SQL.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/factory/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/factory/classification.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/factory/molecularSQL.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/input/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/input/nistMSI.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/search/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/search/compoundSearch.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/search/findOxygenPeaks.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/search/molecularFormulaSearch.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/molecular_id/search/priorityAssignment.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/ms_peak/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/ms_peak/calc/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/ms_peak/factory/MSPeakClasses.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/ms_peak/factory/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/transient/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/transient/calc/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/transient/factory/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/transient/input/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/corems/transient/input/midasDatFile.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/disclaimer.txt +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/ChemstationMSFileReader.dll +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/ChemstationMSFileReader.xml +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/RawFileReaderLicense.doc +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.BackgroundSubtraction.dll +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.BackgroundSubtraction.xml +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.Data.dll +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.Data.xml +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.MassPrecisionEstimator.dll +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.RawFileReader.dll +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.RawFileReader.xml +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/ext_lib/__init__.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/requirements.txt +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/setup.cfg +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_LossFinder.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_assembly_identification.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_calibration.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_classification.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_gcms.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_input.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_massErrorPrediction.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_molecularFormulaDBFactory.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_mspeak.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_mz_search.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_output.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_searchMassListRef.py +0 -0
- {CoreMS-2.0.1 → CoreMS-2.0.6}/tests/test_setting_settings.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: CoreMS
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.6
|
|
4
4
|
Summary: Mass Spectrometry Framework for Small Molecules Analysis
|
|
5
5
|
Home-page: https://github.com/EMSL-Computing/CoreMS
|
|
6
6
|
Author: Corilo, Yuri
|
|
@@ -14,7 +14,7 @@ Classifier: Development Status :: 4 - Beta
|
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
|
|
17
|
-

|
|
18
18
|
|
|
19
19
|
<div align="left">
|
|
20
20
|
|
|
@@ -66,7 +66,7 @@ CoreMS aims to provide
|
|
|
66
66
|
|
|
67
67
|
## Current Version
|
|
68
68
|
|
|
69
|
-
`2.0`
|
|
69
|
+
`2.0.6`
|
|
70
70
|
|
|
71
71
|
***
|
|
72
72
|
|
|
@@ -338,11 +338,13 @@ UML (unified modeling language) diagrams for Direct Infusion FT-MS and GC-MS cla
|
|
|
338
338
|
## Citing CoreMS
|
|
339
339
|
|
|
340
340
|
If you use CoreMS in your work, please use the following citation:
|
|
341
|
-
|
|
341
|
+
|
|
342
|
+
Version [2.0.6 Release on GitHub](https://github.com/EMSL-Computing/CoreMS/releases/tag/v2.0.6), archived on Zenodo:
|
|
342
343
|
|
|
343
344
|
[](https://doi.org/10.5281/zenodo.4641552)
|
|
344
|
-
|
|
345
|
+
|
|
345
346
|
Yuri E. Corilo, William R. Kew, Lee Ann McCue (2021, March 27). EMSL-Computing/CoreMS: CoreMS 2.0.1 (Version v2.0.1), as developed on Github. Zenodo. http://doi.org/10.5281/zenodo.4641552
|
|
347
|
+
|
|
346
348
|
```
|
|
347
349
|
|
|
348
350
|
***
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: CoreMS
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.6
|
|
4
4
|
Summary: Mass Spectrometry Framework for Small Molecules Analysis
|
|
5
5
|
Home-page: https://github.com/EMSL-Computing/CoreMS
|
|
6
6
|
Author: Corilo, Yuri
|
|
@@ -14,7 +14,7 @@ Classifier: Development Status :: 4 - Beta
|
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
|
|
17
|
-

|
|
18
18
|
|
|
19
19
|
<div align="left">
|
|
20
20
|
|
|
@@ -66,7 +66,7 @@ CoreMS aims to provide
|
|
|
66
66
|
|
|
67
67
|
## Current Version
|
|
68
68
|
|
|
69
|
-
`2.0`
|
|
69
|
+
`2.0.6`
|
|
70
70
|
|
|
71
71
|
***
|
|
72
72
|
|
|
@@ -338,11 +338,13 @@ UML (unified modeling language) diagrams for Direct Infusion FT-MS and GC-MS cla
|
|
|
338
338
|
## Citing CoreMS
|
|
339
339
|
|
|
340
340
|
If you use CoreMS in your work, please use the following citation:
|
|
341
|
-
|
|
341
|
+
|
|
342
|
+
Version [2.0.6 Release on GitHub](https://github.com/EMSL-Computing/CoreMS/releases/tag/v2.0.6), archived on Zenodo:
|
|
342
343
|
|
|
343
344
|
[](https://doi.org/10.5281/zenodo.4641552)
|
|
344
|
-
|
|
345
|
+
|
|
345
346
|
Yuri E. Corilo, William R. Kew, Lee Ann McCue (2021, March 27). EMSL-Computing/CoreMS: CoreMS 2.0.1 (Version v2.0.1), as developed on Github. Zenodo. http://doi.org/10.5281/zenodo.4641552
|
|
347
|
+
|
|
346
348
|
```
|
|
347
349
|
|
|
348
350
|
***
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
<div align="left">
|
|
4
4
|
|
|
@@ -50,7 +50,7 @@ CoreMS aims to provide
|
|
|
50
50
|
|
|
51
51
|
## Current Version
|
|
52
52
|
|
|
53
|
-
`2.0`
|
|
53
|
+
`2.0.6`
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
@@ -322,11 +322,13 @@ UML (unified modeling language) diagrams for Direct Infusion FT-MS and GC-MS cla
|
|
|
322
322
|
## Citing CoreMS
|
|
323
323
|
|
|
324
324
|
If you use CoreMS in your work, please use the following citation:
|
|
325
|
-
|
|
325
|
+
|
|
326
|
+
Version [2.0.6 Release on GitHub](https://github.com/EMSL-Computing/CoreMS/releases/tag/v2.0.6), archived on Zenodo:
|
|
326
327
|
|
|
327
328
|
[](https://doi.org/10.5281/zenodo.4641552)
|
|
328
|
-
|
|
329
|
+
|
|
329
330
|
Yuri E. Corilo, William R. Kew, Lee Ann McCue (2021, March 27). EMSL-Computing/CoreMS: CoreMS 2.0.1 (Version v2.0.1), as developed on Github. Zenodo. http://doi.org/10.5281/zenodo.4641552
|
|
331
|
+
|
|
330
332
|
```
|
|
331
333
|
|
|
332
334
|
***
|
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
__author__ = 'Yuri E. Corilo'
|
|
2
|
+
__version__ = '2.0.6'
|
|
3
|
+
__doc__ = '''
|
|
4
|
+
<div align="left">
|
|
5
|
+
|
|
6
|
+
<br>
|
|
7
|
+
<br>
|
|
8
|
+
<a href="https://doi.org/10.5281/zenodo.4641552"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.4641552.svg" alt="CoreMS DOI" style="width:150px;height:25px;"></a>
|
|
9
|
+
<br>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
***
|
|
13
|
+
# Table of Contents
|
|
14
|
+
- Introduction
|
|
15
|
+
- [CoreMS](#CoreMS)
|
|
16
|
+
- [Current Version](#current-version)
|
|
17
|
+
- [Contact Information](#main-developers/contact )
|
|
18
|
+
- [Data Input](#data-input-formats)
|
|
19
|
+
- [Data Output](#data-output-formats)
|
|
20
|
+
- [Data Structure](#data-structure-types)
|
|
21
|
+
- [Features](#available-features)
|
|
22
|
+
- [Overview Slides](examples/CoreMS-Overview.pdf)
|
|
23
|
+
- [Framework Documentation](https://emsl-computing.github.io/CoreMS/)
|
|
24
|
+
- Installation
|
|
25
|
+
- [Installation](#corems-installation)
|
|
26
|
+
- [Thermo Raw File on Mac and Linux](#thermo-raw-file-access)
|
|
27
|
+
- Execution:
|
|
28
|
+
- [Jupyter Notebook and Docker containers](#docker-stack)
|
|
29
|
+
- [Simple Example](#simple-script-example)
|
|
30
|
+
- [Python Examples](examples/scripts)
|
|
31
|
+
- [Jupyter Notebook Examples](examples/notebooks)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
- Sibling Projects:
|
|
35
|
+
- [EnviroMS](https://github.com/EMSL-Computing/EnviroMS)
|
|
36
|
+
- [MetaMS](https://github.com/EMSL-Computing/MetaMS)
|
|
37
|
+
|
|
38
|
+
# CoreMS
|
|
39
|
+
|
|
40
|
+
**CoreMS** is a comprehensive mass spectrometry framework for software development and data analysis of small molecules analysis.
|
|
41
|
+
|
|
42
|
+
Data handling and software development for modern mass spectrometry (MS) is an interdisciplinary endeavor requiring skills in computational science and a deep understanding of MS. To enable scientific software development to keep pace with fast improvements in MS technology, we have developed a Python software framework named CoreMS. The goal of the framework is to provide a fundamental, high-level basis for working with all mass spectrometry data types, allowing custom workflows for data signal processing, annotation, and curation. The data structures were designed with an intuitive, mass spectrometric hierarchical structure, thus allowing organized and easy access to the data and calculations. Moreover, CoreMS supports direct access for almost all vendors’ data formats, allowing for the centralization and automation of all data processing workflows from the raw signal to data annotation and curation.
|
|
43
|
+
|
|
44
|
+
CoreMS aims to provide
|
|
45
|
+
- logical mass spectrometric data structure
|
|
46
|
+
- self-containing data and metadata storage
|
|
47
|
+
- modern molecular formulae assignment algorithms
|
|
48
|
+
- dynamic molecular search space database search and generator
|
|
49
|
+
|
|
50
|
+
## Current Version
|
|
51
|
+
|
|
52
|
+
`2.0`
|
|
53
|
+
|
|
54
|
+
## Main Developers/Contact
|
|
55
|
+
- [Yuri. E. Corilo](mailto:corilo@pnnl.gov)
|
|
56
|
+
- [William Kew](mailto:william.kew@pnnl.gov)
|
|
57
|
+
|
|
58
|
+
## Data formats
|
|
59
|
+
### Data input formats
|
|
60
|
+
|
|
61
|
+
- Bruker Solarix (CompassXtract)
|
|
62
|
+
- Bruker Solarix transients, ser and fid (FT magnitude mode only)
|
|
63
|
+
- ThermoFisher (.raw)
|
|
64
|
+
- Spectroswiss signal booster data-acquisition station (.hdf5)
|
|
65
|
+
- MagLab ICR data-acquisition station (FT and magnitude mode) (.dat)
|
|
66
|
+
- ANDI NetCDF for GC-MS (.cdf)
|
|
67
|
+
- Generic mass list in profile and centroid mde (include all delimiters types and Excel formats)
|
|
68
|
+
- CoreMS exported processed mass list files(excel, .csv, .txt, pandas dataframe as .pkl)
|
|
69
|
+
- CoreMS self-containing Hierarchical Data Format (.hdf5)
|
|
70
|
+
- Pandas Dataframe
|
|
71
|
+
- Support for cloud Storage using s3path.S3path(see examples of usage here: [S3 Support](tests/s3_test.py))
|
|
72
|
+
|
|
73
|
+
### Data output formats
|
|
74
|
+
|
|
75
|
+
- Pandas data frame (can be saved using pickle, h5, etc)
|
|
76
|
+
- Text Files (.csv, tab separated .txt, etc)
|
|
77
|
+
- Microsoft Excel (xlsx)
|
|
78
|
+
- Automatic JSON for metadata storage and reuse
|
|
79
|
+
- Self-containing Hierarchical Data Format (.hdf5) including raw data and ime-series data-point for processed data-sets with all associated metadata stored as json attributes
|
|
80
|
+
|
|
81
|
+
### Data structure types
|
|
82
|
+
|
|
83
|
+
- LC-MS
|
|
84
|
+
- GC-MS
|
|
85
|
+
- Transient
|
|
86
|
+
- Mass Spectra
|
|
87
|
+
- Mass Spectrum
|
|
88
|
+
- Mass Spectral Peak
|
|
89
|
+
- Molecular Formula
|
|
90
|
+
|
|
91
|
+
### In progress data structures
|
|
92
|
+
- IMS-MS
|
|
93
|
+
- LC-IMS-MS
|
|
94
|
+
- Collections
|
|
95
|
+
- Molecular Structure
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
## Available features
|
|
99
|
+
|
|
100
|
+
### FT-MS Signal Processing, Calibration, and Molecular Formula Search and Assignment
|
|
101
|
+
|
|
102
|
+
- Apodization, Zerofilling, and Magnitude mode FT
|
|
103
|
+
- Manual and automatic noise threshold calculation
|
|
104
|
+
- Peak picking using apex quadratic fitting
|
|
105
|
+
- Experimental resolving power calculation
|
|
106
|
+
- Frequency and m/z domain calibration functions:
|
|
107
|
+
- LedFord equation
|
|
108
|
+
- Linear equation
|
|
109
|
+
- Quadratic equation
|
|
110
|
+
- Automatic search most abundant **Ox** homologue series
|
|
111
|
+
- Automatic local (SQLite) or external (PostgreSQL) database check, generation, and search
|
|
112
|
+
- Automatic molecular formulae assignments algorithm for ESI(-) MS for natural organic matter analysis
|
|
113
|
+
- Automatic fine isotopic structure calculation and search for all isotopes
|
|
114
|
+
- Flexible Kendrick normalization base
|
|
115
|
+
- Kendrick filter using density-based clustering
|
|
116
|
+
- Kendrick classification
|
|
117
|
+
- Heteroatoms classification and visualization
|
|
118
|
+
|
|
119
|
+
### GC-MS Signal Processing, Calibration, and Compound Identification
|
|
120
|
+
|
|
121
|
+
- Baseline detection, subtraction, smoothing
|
|
122
|
+
- m/z based Chromatogram Peak Deconvolution,
|
|
123
|
+
- Manual and automatic noise threshold calculation
|
|
124
|
+
- First and second derivatives peak picking methods
|
|
125
|
+
- Peak Area Calculation
|
|
126
|
+
- Retention Index Calibration
|
|
127
|
+
- Automatic local (SQLite) or external (MongoDB or PostgreSQL) database check, generation, and search
|
|
128
|
+
- Automatic molecular match algorithm with all spectral similarity methods
|
|
129
|
+
|
|
130
|
+
### High Resolution Mass Spectrum Simulations
|
|
131
|
+
|
|
132
|
+
- Peak shape (Lorentz, Gaussian, Voigt, and pseudo-Voigt)
|
|
133
|
+
- Peak fitting for peak shape definition
|
|
134
|
+
- Peak position in function of data points, signal to noise and resolving power (Lorentz and Gaussian)
|
|
135
|
+
- Prediction of mass error distribution
|
|
136
|
+
- Calculated ICR Resolving Power based on magnetic field (B), and transient time(T)
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
## Installation
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pip install corems
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
By default the molecular formula database will be generated using SQLite
|
|
146
|
+
|
|
147
|
+
To use Postgresql the easiest way is to build a docker container:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
docker-compose up -d
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
- Change the url_database on MSParameters.molecular_search.url_database to: "postgresql+psycopg2://coremsappdb:coremsapppnnl@localhost:5432/coremsapp"
|
|
154
|
+
- Set the url_database env variable COREMS_DATABASE_URL to: "postgresql+psycopg2://coremsappdb:coremsapppnnl@localhost:5432/coremsapp"
|
|
155
|
+
|
|
156
|
+
### Thermo Raw File Access:
|
|
157
|
+
|
|
158
|
+
To be able to open thermo file a installation of pythonnet is needed:
|
|
159
|
+
- Windows:
|
|
160
|
+
```bash
|
|
161
|
+
pip install pythonnet
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
- Mac and Linux:
|
|
165
|
+
```bash
|
|
166
|
+
brew install mono
|
|
167
|
+
pip install pythonnet
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
## Docker stack
|
|
172
|
+
|
|
173
|
+
Another option to use CoreMS is to run the docker stack that will start the CoreMS containers
|
|
174
|
+
|
|
175
|
+
### Molecular Database and Jupyter Notebook Docker Containers
|
|
176
|
+
|
|
177
|
+
A docker container containing:
|
|
178
|
+
- A custom python distribution will all dependencies installed
|
|
179
|
+
- A Jupyter notebook server with workflow examples
|
|
180
|
+
- A PostgreSQL database for the molecular formulae assignment
|
|
181
|
+
|
|
182
|
+
If you don't have docker installed, the easiest way is to [install docker for desktop](https://hub.docker.com/?overlay=onboarding)
|
|
183
|
+
|
|
184
|
+
1. Start the containers using docker-compose (easiest way):
|
|
185
|
+
|
|
186
|
+
On docker-compose-jupyter.yml there is a volume mapping for the tests_data directory with the data provided for testing, to change to your data location:
|
|
187
|
+
|
|
188
|
+
- locate the volumes on docker-compose-jupyter.yml:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
volumes:
|
|
192
|
+
- ./tests/tests_data:/home/CoreMS/data
|
|
193
|
+
```
|
|
194
|
+
- change "./tests/tests_data" to your data directory location
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
volumes:
|
|
198
|
+
- path_to_your_data_directory:/home/corems/data
|
|
199
|
+
```
|
|
200
|
+
- save the file and then call:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
docker-compose -f docker-compose-jupyter.yml up
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
2. Another option is to manually build the containers:
|
|
207
|
+
|
|
208
|
+
- Build the corems image:
|
|
209
|
+
```bash
|
|
210
|
+
docker build -t corems:local .
|
|
211
|
+
```
|
|
212
|
+
- Start the database container:
|
|
213
|
+
```bash
|
|
214
|
+
docker-compose up -d
|
|
215
|
+
```
|
|
216
|
+
- Start the Jupyter Notebook:
|
|
217
|
+
```bash
|
|
218
|
+
docker run --rm -v ./data:/home/CoreMS/data corems:local
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
- Open your browser, copy and past the URL address provided in the terminal: `http://localhost:8888/?token=<token>.`
|
|
222
|
+
|
|
223
|
+
- Open the CoreMS-Tutorial.ipynb
|
|
224
|
+
|
|
225
|
+
___
|
|
226
|
+
## Simple Script Example
|
|
227
|
+
|
|
228
|
+
More examples can be found under the directory examples/scripts, examples/notebooks
|
|
229
|
+
|
|
230
|
+
- Basic functionality example
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
from corems.transient.input.brukerSolarix import ReadBrukerSolarix
|
|
234
|
+
from corems.molecular_id.search.molecularFormulaSearch import SearchMolecularFormulas
|
|
235
|
+
from corems.mass_spectrum.output.export import HighResMassSpecExport
|
|
236
|
+
from matplotlib import pyplot
|
|
237
|
+
|
|
238
|
+
file_path= 'tests/tests_data/ftms/ESI_NEG_SRFA.d'
|
|
239
|
+
|
|
240
|
+
# Instatiate the Bruker Solarix reader with the filepath
|
|
241
|
+
bruker_reader = ReadBrukerSolarix(file_path)
|
|
242
|
+
|
|
243
|
+
# Use the reader to instatiate a transient object
|
|
244
|
+
bruker_transient_obj = bruker_reader.get_transient()
|
|
245
|
+
|
|
246
|
+
# Calculate the transient duration time
|
|
247
|
+
T = bruker_transient_obj.transient_time
|
|
248
|
+
|
|
249
|
+
# Use the transient object to instatitate a mass spectrum object
|
|
250
|
+
mass_spectrum_obj = bruker_transient_obj.get_mass_spectrum(plot_result=False, auto_process=True)
|
|
251
|
+
|
|
252
|
+
# The following SearchMolecularFormulas function does the following
|
|
253
|
+
# - searches monoisotopic molecular formulas for all mass spectral peaks
|
|
254
|
+
# - calculates fine isotopic structure based on monoisotopic molecular formulas found and current dynamic range
|
|
255
|
+
# - searches molecular formulas of correspondent calculated isotopologues
|
|
256
|
+
# - settings are stored at SearchConfig.json and can be changed directly on the file or inside the framework class
|
|
257
|
+
|
|
258
|
+
SearchMolecularFormulas(mass_spectrum_obj, first_hit=False).run_worker_mass_spectrum()
|
|
259
|
+
|
|
260
|
+
# Iterate over mass spectral peaks objs within the mass_spectrum_obj
|
|
261
|
+
for mspeak in mass_spectrum_obj.sort_by_abundance():
|
|
262
|
+
|
|
263
|
+
# If there is at least one molecular formula associated, mspeak returns True
|
|
264
|
+
if mspeak:
|
|
265
|
+
|
|
266
|
+
# Get the molecular formula with the highest mass accuracy
|
|
267
|
+
molecular_formula = mspeak.molecular_formula_lowest_error
|
|
268
|
+
|
|
269
|
+
# Plot mz and peak height
|
|
270
|
+
pyplot.plot(mspeak.mz_exp, mspeak.abundance, 'o', c='g')
|
|
271
|
+
|
|
272
|
+
# Iterate over all molecular formulas associated with the ms peaks obj
|
|
273
|
+
for molecular_formula in mspeak:
|
|
274
|
+
|
|
275
|
+
# Check if the molecular formula is a isotopologue
|
|
276
|
+
if molecular_formula.is_isotopologue:
|
|
277
|
+
|
|
278
|
+
# Access the molecular formula text representation and print
|
|
279
|
+
print (molecular_formula.string)
|
|
280
|
+
|
|
281
|
+
# Get 13C atoms count
|
|
282
|
+
print (molecular_formula['13C'])
|
|
283
|
+
else:
|
|
284
|
+
# Get mz and peak height
|
|
285
|
+
print(mspeak.mz_exp,mspeak.abundance)
|
|
286
|
+
|
|
287
|
+
# Save data
|
|
288
|
+
## to a csv file
|
|
289
|
+
mass_spectrum_obj.to_csv("filename")
|
|
290
|
+
mass_spectrum_obj.to_hdf("filename")
|
|
291
|
+
# to pandas Datarame pickle
|
|
292
|
+
mass_spectrum_obj.to_pandas("filename")
|
|
293
|
+
|
|
294
|
+
# Extract data as a pandas Dataframe
|
|
295
|
+
df = mass_spectrum_obj.to_dataframe()
|
|
296
|
+
```
|
|
297
|
+
## UML Diagrams
|
|
298
|
+
|
|
299
|
+
UML (unified modeling language) diagrams for Direct Infusion FT-MS and GC-MS classes can be found [here](docs/uml).
|
|
300
|
+
|
|
301
|
+
## Citing CoreMS
|
|
302
|
+
|
|
303
|
+
If you use CoreMS in your work, please use the following citation:
|
|
304
|
+
Version [2.0 Release on GitHub](https://github.com/EMSL-Computing/CoreMS/releases/tag/v2.0), archived on Zenodo:
|
|
305
|
+
|
|
306
|
+
[](https://doi.org/10.5281/zenodo.4641552)
|
|
307
|
+
```
|
|
308
|
+
Yuri E. Corilo, William R. Kew, Lee Ann McCue (2021, March 27). EMSL-Computing/CoreMS: CoreMS 2.0 (Version v2.0), as developed on Github. Zenodo. http://doi.org/10.5281/zenodo.4641552
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
This material was prepared as an account of work sponsored by an agency of the
|
|
313
|
+
United States Government. Neither the United States Government nor the United
|
|
314
|
+
States Department of Energy, nor Battelle, nor any of their employees, nor any
|
|
315
|
+
jurisdiction or organization that has cooperated in the development of these
|
|
316
|
+
materials, makes any warranty, express or implied, or assumes any legal
|
|
317
|
+
liability or responsibility for the accuracy, completeness, or usefulness or
|
|
318
|
+
any information, apparatus, product, software, or process disclosed, or
|
|
319
|
+
represents that its use would not infringe privately owned rights.
|
|
320
|
+
|
|
321
|
+
Reference herein to any specific commercial product, process, or service by
|
|
322
|
+
trade name, trademark, manufacturer, or otherwise does not necessarily
|
|
323
|
+
constitute or imply its endorsement, recommendation, or favoring by the United
|
|
324
|
+
States Government or any agency thereof, or Battelle Memorial Institute. The
|
|
325
|
+
views and opinions of authors expressed herein do not necessarily state or
|
|
326
|
+
reflect those of the United States Government or any agency thereof.
|
|
327
|
+
|
|
328
|
+
PACIFIC NORTHWEST NATIONAL LABORATORY
|
|
329
|
+
operated by
|
|
330
|
+
BATTELLE
|
|
331
|
+
for the
|
|
332
|
+
UNITED STATES DEPARTMENT OF ENERGY
|
|
333
|
+
under Contract DE-AC05-76RL01830
|
|
334
|
+
'''
|
|
335
|
+
import time
|
|
336
|
+
import os
|
|
337
|
+
import sys
|
|
338
|
+
import hashlib
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
def timeit(method):
|
|
342
|
+
def timed(*args, **kw):
|
|
343
|
+
ts = time.time()
|
|
344
|
+
result = method(*args, **kw)
|
|
345
|
+
te = time.time()
|
|
346
|
+
if 'log_time' in kw:
|
|
347
|
+
name = kw.get('log_name', method.__name__.upper())
|
|
348
|
+
kw['log_time'][name] = int((te - ts) * 1000)
|
|
349
|
+
else:
|
|
350
|
+
print("%r %2.2f ms" % (method.__name__, (te - ts) * 1000))
|
|
351
|
+
return result
|
|
352
|
+
return timed
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
class SuppressPrints:
|
|
356
|
+
|
|
357
|
+
def __enter__(self):
|
|
358
|
+
self._original_stdout = sys.stdout
|
|
359
|
+
sys.stdout = open(os.devnull, 'w')
|
|
360
|
+
|
|
361
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
362
|
+
sys.stdout.close()
|
|
363
|
+
sys.stdout = self._original_stdout
|
|
364
|
+
|
|
365
|
+
def get_filenames(app=None):
|
|
366
|
+
|
|
367
|
+
from PySide2.QtCore import Qt, QCoreApplication
|
|
368
|
+
from PySide2.QtWidgets import QApplication, QFileDialog
|
|
369
|
+
from pathlib import Path
|
|
370
|
+
|
|
371
|
+
app = QApplication(sys.argv)
|
|
372
|
+
file_dialog = QFileDialog()
|
|
373
|
+
file_dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
|
|
374
|
+
file_location, _ = file_dialog.getOpenFileNames()
|
|
375
|
+
|
|
376
|
+
if file_location:
|
|
377
|
+
QCoreApplication.processEvents()
|
|
378
|
+
return file_location
|
|
379
|
+
|
|
380
|
+
else:
|
|
381
|
+
|
|
382
|
+
return None
|
|
383
|
+
|
|
384
|
+
def get_filename(app=None):
|
|
385
|
+
|
|
386
|
+
from PySide2.QtCore import Qt, QCoreApplication
|
|
387
|
+
from PySide2.QtWidgets import QApplication, QFileDialog
|
|
388
|
+
from pathlib import Path
|
|
389
|
+
|
|
390
|
+
app = QApplication(sys.argv)
|
|
391
|
+
file_dialog = QFileDialog()
|
|
392
|
+
file_dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
|
|
393
|
+
file_location, _ = file_dialog.getOpenFileName()
|
|
394
|
+
|
|
395
|
+
if file_location:
|
|
396
|
+
QCoreApplication.processEvents()
|
|
397
|
+
return Path(file_location)
|
|
398
|
+
|
|
399
|
+
else:
|
|
400
|
+
|
|
401
|
+
return None
|
|
402
|
+
|
|
403
|
+
def get_dirname(app=None):
|
|
404
|
+
|
|
405
|
+
from PySide2.QtCore import Qt, QCoreApplication
|
|
406
|
+
from PySide2.QtWidgets import QApplication, QFileDialog
|
|
407
|
+
from pathlib import Path
|
|
408
|
+
|
|
409
|
+
app = QApplication(sys.argv)
|
|
410
|
+
file_dialog = QFileDialog()
|
|
411
|
+
file_dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
|
|
412
|
+
file_location = file_dialog.getExistingDirectory()
|
|
413
|
+
|
|
414
|
+
if file_location:
|
|
415
|
+
QCoreApplication.processEvents()
|
|
416
|
+
return Path(file_location)
|
|
417
|
+
|
|
418
|
+
else:
|
|
419
|
+
|
|
420
|
+
return None
|
|
421
|
+
|
|
422
|
+
def get_dirnames(app=None):
|
|
423
|
+
|
|
424
|
+
from PySide2.QtCore import Qt, QCoreApplication
|
|
425
|
+
from PySide2.QtWidgets import QApplication, QFileDialog, QTreeView, QListView, QAbstractItemView
|
|
426
|
+
from pathlib import Path
|
|
427
|
+
|
|
428
|
+
if not app:
|
|
429
|
+
app = QApplication(sys.argv)
|
|
430
|
+
# file_dialog = QFileDialog()
|
|
431
|
+
# file_dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
|
|
432
|
+
# file_location = file_dialog.getOpenFileNames()
|
|
433
|
+
|
|
434
|
+
file_dialog = QFileDialog()
|
|
435
|
+
file_dialog.setFileMode(QFileDialog.DirectoryOnly)
|
|
436
|
+
file_dialog.setOption(QFileDialog.DontUseNativeDialog, True)
|
|
437
|
+
file_view = file_dialog.findChild(QListView, 'listView')
|
|
438
|
+
|
|
439
|
+
# to make it possible to select multiple directories:
|
|
440
|
+
if file_view:
|
|
441
|
+
file_view.setSelectionMode(QAbstractItemView.MultiSelection)
|
|
442
|
+
f_tree_view = file_dialog.findChild(QTreeView)
|
|
443
|
+
if f_tree_view:
|
|
444
|
+
f_tree_view.setSelectionMode(QAbstractItemView.MultiSelection)
|
|
445
|
+
|
|
446
|
+
if file_dialog.exec():
|
|
447
|
+
paths = file_dialog.selectedFiles()
|
|
448
|
+
|
|
449
|
+
QCoreApplication.processEvents()
|
|
450
|
+
for path in paths:
|
|
451
|
+
yield Path(path)
|
|
452
|
+
|
|
453
|
+
def chunks(lst, n):
|
|
454
|
+
"""Yield successive n-sized chunks from lst."""
|
|
455
|
+
for i in range(0, len(lst), n):
|
|
456
|
+
yield lst[i:i + n]
|
|
457
|
+
|
|
458
|
+
def corems_md5(fname):
|
|
459
|
+
|
|
460
|
+
bytes_io = fname.open('rb').read()
|
|
461
|
+
|
|
462
|
+
md5_returned = hashlib.sha256(bytes_io).hexdigest()
|
|
463
|
+
|
|
464
|
+
return "{}:{}".format("sha256", md5_returned)
|