CoreMS 2.0.3__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.3 → CoreMS-2.0.6}/CoreMS.egg-info/PKG-INFO +4 -4
- {CoreMS-2.0.3 → CoreMS-2.0.6}/PKG-INFO +4 -4
- {CoreMS-2.0.3 → CoreMS-2.0.6}/README.md +3 -3
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/__init__.py +1 -1
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/constant.py +2 -1
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/factory/parameters.py +7 -1
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/factory/processingSetting.py +1 -1
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/rawFileReader.py +1 -1
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/PeakPicking.py +5 -4
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/factory/MassSpectrumClasses.py +7 -4
- {CoreMS-2.0.3 → 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.3 → CoreMS-2.0.6}/corems/mass_spectrum/output/export.py +4 -1
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_formula/factory/MolecularFormulaFactory.py +78 -11
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/search/compoundSearch.py +0 -2
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/ms_peak/calc/MSPeakCalc.py +15 -8
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/transient/calc/TransientCalc.py +25 -8
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/transient/factory/TransientClasses.py +6 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/transient/input/brukerSolarix.py +94 -6
- {CoreMS-2.0.3 → CoreMS-2.0.6}/setup.py +1 -1
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_mass_spectrum.py +2 -2
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_molecularFormula.py +22 -4
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_molecularFormulaSearch.py +75 -34
- CoreMS-2.0.3/corems/mass_spectrum/input/numpyArray.py +0 -87
- {CoreMS-2.0.3 → CoreMS-2.0.6}/CoreMS.egg-info/SOURCES.txt +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/CoreMS.egg-info/dependency_links.txt +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/CoreMS.egg-info/requires.txt +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/CoreMS.egg-info/top_level.txt +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/Dockerfile +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/LICENSE +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/MANIFEST.in +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/chroma_peak/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/chroma_peak/calc/ChromaPeakCalc.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/chroma_peak/calc/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/chroma_peak/factory/ChromaPeakClasses.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/chroma_peak/factory/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/collection/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/collection/factory/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/collection/input/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/collection/output/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/factory/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/input/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/input/parameter_from_json.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/output/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/output/parameter_to_dict.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/encapsulation/output/parameter_to_json.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/calc/GC_Calc.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/calc/GC_Deconvolution.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/calc/GC_RI_Calibration.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/calc/LC_Calc.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/calc/LF_Targeted.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/calc/MZSearch.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/calc/SignalProcessing.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/calc/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/factory/GC_Class.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/factory/LC_Class.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/factory/LC_Temp.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/factory/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/andiNetCDF.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/boosterHDF5.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/brukerSolarix.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/coremsHDF5.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/massList.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/win_only/BrukerCompassXtract.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/win_only/ThermoMSFileReader.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/input/win_only/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/output/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectra/output/export.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/AutoRecalibration.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/Calibration.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/CalibrationCalc.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/KendrickGroup.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/MassErrorPrediction.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/MassSpectrumCalc.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/MeanResolvingPowerFilter.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/NoiseCalc.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/NoiseCalc_Bayes.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/calc/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/factory/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/input/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/input/baseClass.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/input/boosterHDF5.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/input/coremsHDF5.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/input/win_only/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/mass_spectrum/output/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_formula/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_formula/calc/MolecularFormulaCalc.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_formula/calc/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_formula/factory/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_formula/input/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_formula/input/masslist_ref.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/calc/ClusterFilter.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/calc/KendrickGroup.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/calc/MolecularFilter.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/calc/SpectralSimilarity.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/calc/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/calc/math_distance.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/factory/EI_SQL.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/factory/MolecularLookupTable.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/factory/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/factory/classification.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/factory/molecularSQL.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/input/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/input/nistMSI.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/search/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/search/findOxygenPeaks.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/search/molecularFormulaSearch.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/molecular_id/search/priorityAssignment.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/ms_peak/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/ms_peak/calc/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/ms_peak/factory/MSPeakClasses.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/ms_peak/factory/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/transient/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/transient/calc/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/transient/factory/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/transient/input/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/corems/transient/input/midasDatFile.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/disclaimer.txt +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/ChemstationMSFileReader.dll +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/ChemstationMSFileReader.xml +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/RawFileReaderLicense.doc +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.BackgroundSubtraction.dll +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.BackgroundSubtraction.xml +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.Data.dll +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.Data.xml +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.MassPrecisionEstimator.dll +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.RawFileReader.dll +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/ThermoFisher.CommonCore.RawFileReader.xml +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/ext_lib/__init__.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/requirements.txt +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/setup.cfg +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_LossFinder.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_assembly_identification.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_calibration.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_classification.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_gcms.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_input.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_massErrorPrediction.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_molecularFormulaDBFactory.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_mspeak.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_mz_search.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_output.py +0 -0
- {CoreMS-2.0.3 → CoreMS-2.0.6}/tests/test_searchMassListRef.py +0 -0
- {CoreMS-2.0.3 → 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
|
|
|
@@ -339,7 +339,7 @@ UML (unified modeling language) diagrams for Direct Infusion FT-MS and GC-MS cla
|
|
|
339
339
|
|
|
340
340
|
If you use CoreMS in your work, please use the following citation:
|
|
341
341
|
|
|
342
|
-
Version [2.0.
|
|
342
|
+
Version [2.0.6 Release on GitHub](https://github.com/EMSL-Computing/CoreMS/releases/tag/v2.0.6), archived on Zenodo:
|
|
343
343
|
|
|
344
344
|
[](https://doi.org/10.5281/zenodo.4641552)
|
|
345
345
|
|
|
@@ -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
|
|
|
@@ -339,7 +339,7 @@ UML (unified modeling language) diagrams for Direct Infusion FT-MS and GC-MS cla
|
|
|
339
339
|
|
|
340
340
|
If you use CoreMS in your work, please use the following citation:
|
|
341
341
|
|
|
342
|
-
Version [2.0.
|
|
342
|
+
Version [2.0.6 Release on GitHub](https://github.com/EMSL-Computing/CoreMS/releases/tag/v2.0.6), archived on Zenodo:
|
|
343
343
|
|
|
344
344
|
[](https://doi.org/10.5281/zenodo.4641552)
|
|
345
345
|
|
|
@@ -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
|
|
|
@@ -323,7 +323,7 @@ UML (unified modeling language) diagrams for Direct Infusion FT-MS and GC-MS cla
|
|
|
323
323
|
|
|
324
324
|
If you use CoreMS in your work, please use the following citation:
|
|
325
325
|
|
|
326
|
-
Version [2.0.
|
|
326
|
+
Version [2.0.6 Release on GitHub](https://github.com/EMSL-Computing/CoreMS/releases/tag/v2.0.6), archived on Zenodo:
|
|
327
327
|
|
|
328
328
|
[](https://doi.org/10.5281/zenodo.4641552)
|
|
329
329
|
|
|
@@ -36,7 +36,8 @@ class Labels: #pragma: no cover
|
|
|
36
36
|
ion_type_translate = { 'protonated': 'DE_OR_PROTONATED',
|
|
37
37
|
'de-protonated': 'DE_OR_PROTONATED',
|
|
38
38
|
'radical': 'RADICAL',
|
|
39
|
-
'adduct': 'ADDUCT'
|
|
39
|
+
'adduct': 'ADDUCT',
|
|
40
|
+
'ADDUCT': 'ADDUCT'}
|
|
40
41
|
|
|
41
42
|
class Atoms: #pragma: no cover
|
|
42
43
|
""" Class for Atoms in CoreMS
|
|
@@ -100,11 +100,17 @@ def default_parameters(file_location): # pragma: no cover
|
|
|
100
100
|
|
|
101
101
|
parameters["exc_low_freq"] = 0
|
|
102
102
|
|
|
103
|
+
parameters["mw_low"] = 0
|
|
104
|
+
|
|
105
|
+
parameters["mw_high"] = 0
|
|
106
|
+
|
|
107
|
+
parameters["qpd_enabled"] = 0
|
|
108
|
+
|
|
103
109
|
parameters["bandwidth"] = 0
|
|
104
110
|
|
|
105
111
|
parameters['analyzer'] = 'Unknown'
|
|
106
112
|
|
|
107
|
-
parameters['
|
|
113
|
+
parameters['acquisition_time'] = None
|
|
108
114
|
|
|
109
115
|
parameters['instrument_label'] = 'Unknown'
|
|
110
116
|
|
|
@@ -252,7 +252,7 @@ class MassSpectrumSetting:
|
|
|
252
252
|
# How many data points (in each direction) to extrapolate the mz axis and 0 pad the abundance axis
|
|
253
253
|
# This will fix peak picking at spectrum limit issues
|
|
254
254
|
# 0 to keep normal behaviour, typical value 3 to fix
|
|
255
|
-
picking_point_extrapolate: int =
|
|
255
|
+
picking_point_extrapolate: int = 0
|
|
256
256
|
|
|
257
257
|
calib_minimize_method: str = 'Powell'
|
|
258
258
|
calib_pol_order: int = 2
|
|
@@ -759,7 +759,7 @@ class ThermoBaseClass:
|
|
|
759
759
|
|
|
760
760
|
d_params["analyzer"] = self.iRawDataPlus.GetInstrumentData().Model
|
|
761
761
|
|
|
762
|
-
d_params["
|
|
762
|
+
d_params["acquisition_time"] = self.get_creation_time()
|
|
763
763
|
|
|
764
764
|
d_params["instrument_label"] = self.iRawDataPlus.GetInstrumentData().Name
|
|
765
765
|
|
|
@@ -147,10 +147,11 @@ class PeakPicking:
|
|
|
147
147
|
self.abundance_profile = abundance
|
|
148
148
|
self.freq_exp_profile = freq
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
if self.settings.picking_point_extrapolate > 0:
|
|
151
|
+
mz, abundance, freq = self.extrapolate_axes_for_pp()
|
|
152
|
+
self.mz_exp_profile = mz
|
|
153
|
+
self.abundance_profile = abundance
|
|
154
|
+
self.freq_exp_profile = freq
|
|
154
155
|
|
|
155
156
|
if self.label == Labels.bruker_frequency or self.label == Labels.midas_frequency:
|
|
156
157
|
|
|
@@ -3,7 +3,7 @@ from copy import deepcopy
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
#from matplotlib import rcParamsDefault, rcParams
|
|
6
|
-
from numpy import array, power, float64, where, histogram
|
|
6
|
+
from numpy import array, power, float64, where, histogram, trapz
|
|
7
7
|
|
|
8
8
|
from pandas import DataFrame
|
|
9
9
|
from lmfit.models import GaussianModel
|
|
@@ -217,7 +217,7 @@ class MassSpecBase(MassSpecCalc, KendrickGrouping):
|
|
|
217
217
|
- _calibration_terms
|
|
218
218
|
- label
|
|
219
219
|
- analyzer
|
|
220
|
-
-
|
|
220
|
+
- acquisition_time
|
|
221
221
|
- instrument_label
|
|
222
222
|
- polarity
|
|
223
223
|
- scan_number
|
|
@@ -240,7 +240,7 @@ class MassSpecBase(MassSpecCalc, KendrickGrouping):
|
|
|
240
240
|
|
|
241
241
|
self.analyzer = d_params.get('analyzer')
|
|
242
242
|
|
|
243
|
-
self.
|
|
243
|
+
self.acquisition_time = d_params.get('acquisition_time')
|
|
244
244
|
|
|
245
245
|
self.instrument_label = d_params.get('instrument_label')
|
|
246
246
|
|
|
@@ -612,7 +612,7 @@ class MassSpecBase(MassSpecCalc, KendrickGrouping):
|
|
|
612
612
|
@property
|
|
613
613
|
def tic(self):
|
|
614
614
|
"""Return the total ion current of the mass spectrum."""
|
|
615
|
-
return
|
|
615
|
+
return trapz(self.abundance_profile, self.mz_exp_profile)
|
|
616
616
|
|
|
617
617
|
def check_mspeaks_warning(self):
|
|
618
618
|
"""Check if the mass spectrum has MSpeaks objects.
|
|
@@ -1263,6 +1263,7 @@ class MassSpecfromFreq(MassSpecBase):
|
|
|
1263
1263
|
if self._mz_exp[0] > self._mz_exp[-1]:
|
|
1264
1264
|
self._mz_exp = self._mz_exp[::-1]
|
|
1265
1265
|
self._abundance = self._abundance[::-1]
|
|
1266
|
+
self._frequency_domain = self._frequency_domain[::-1]
|
|
1266
1267
|
|
|
1267
1268
|
def _set_mz_domain(self):
|
|
1268
1269
|
"""Set the m/z domain of the mass spectrum based on the settings of d_params."""
|
|
@@ -1375,6 +1376,8 @@ class MassSpecCentroid(MassSpecBase):
|
|
|
1375
1376
|
|
|
1376
1377
|
self.is_centroid = True
|
|
1377
1378
|
self.data_dict = data_dict
|
|
1379
|
+
self._mz_exp = data_dict[Labels.mz]
|
|
1380
|
+
self._abundance = data_dict[Labels.abundance]
|
|
1378
1381
|
|
|
1379
1382
|
if auto_process:
|
|
1380
1383
|
self.process_mass_spec()
|
|
@@ -83,6 +83,10 @@ class ReadCoremsMasslist(MassListBaseClass):
|
|
|
83
83
|
ion_type_df = dataframe["Ion Type"]
|
|
84
84
|
ion_charge_df = dataframe["Ion Charge"]
|
|
85
85
|
is_isotopologue_df = dataframe['Is Isotopologue']
|
|
86
|
+
if 'Adduct' in dataframe:
|
|
87
|
+
adduct_df = dataframe['Adduct']
|
|
88
|
+
else:
|
|
89
|
+
adduct_df = None
|
|
86
90
|
|
|
87
91
|
mass_spec_mz_exp_list = mass_spec_obj.mz_exp
|
|
88
92
|
|
|
@@ -102,7 +106,11 @@ class ReadCoremsMasslist(MassListBaseClass):
|
|
|
102
106
|
if sum(counts) > 0:
|
|
103
107
|
|
|
104
108
|
ion_type = str(Labels.ion_type_translate.get(ion_type_df[df_index]))
|
|
105
|
-
|
|
109
|
+
if adduct_df is not None:
|
|
110
|
+
adduct_atom = str(adduct_df[df_index])
|
|
111
|
+
else:
|
|
112
|
+
adduct_atom = None
|
|
113
|
+
mfobj = MolecularFormula(formula_list, int(ion_charge_df[df_index]), mspeak_parent=mass_spec_obj[ms_peak_index] , ion_type=ion_type, adduct_atom=adduct_atom)
|
|
106
114
|
mfobj.is_isotopologue = bool(is_isotopologue_df[df_index])
|
|
107
115
|
mass_spec_obj[ms_peak_index].add_molecular_formula(mfobj)
|
|
108
116
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
|
|
2
|
+
__author__ = "Yuri E. Corilo"
|
|
3
|
+
__date__ = "Oct 23, 2019"
|
|
4
|
+
|
|
5
|
+
from corems.mass_spectrum.factory.MassSpectrumClasses import MassSpecProfile, MassSpecCentroid
|
|
6
|
+
from corems.encapsulation.factory.parameters import default_parameters
|
|
7
|
+
from corems.encapsulation.constant import Labels
|
|
8
|
+
|
|
9
|
+
def ms_from_array_profile(mz, abundance, dataname:str, polarity:int = -1, auto_process:bool = True, data_type:str = Labels.simulated_profile):
|
|
10
|
+
"""Create a MassSpecProfile object from an array of m/z values and abundance values.
|
|
11
|
+
|
|
12
|
+
Parameters
|
|
13
|
+
----------
|
|
14
|
+
mz : numpy.ndarray
|
|
15
|
+
Array of m/z values.
|
|
16
|
+
abundance : numpy.ndarray
|
|
17
|
+
Array of abundance values.
|
|
18
|
+
dataname : str
|
|
19
|
+
Name of the data.
|
|
20
|
+
polarity : int, optional
|
|
21
|
+
Polarity of the data. The default is -1.
|
|
22
|
+
auto_process : bool, optional
|
|
23
|
+
Flag to automatically process the data. The default is True.
|
|
24
|
+
data_type : str, optional
|
|
25
|
+
Type of the data. The default is Labels.simulated_profile.
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
MassSpecProfile
|
|
30
|
+
The created MassSpecProfile object.
|
|
31
|
+
"""
|
|
32
|
+
data_dict = {Labels.mz: mz, Labels.abundance: abundance}
|
|
33
|
+
|
|
34
|
+
output_parameters = get_output_parameters(polarity, dataname)
|
|
35
|
+
|
|
36
|
+
output_parameters[Labels.label] = data_type
|
|
37
|
+
|
|
38
|
+
ms = MassSpecProfile(data_dict, output_parameters, auto_process=auto_process)
|
|
39
|
+
|
|
40
|
+
return ms
|
|
41
|
+
|
|
42
|
+
def ms_from_array_centroid(mz, abundance, rp:list[float], s2n:list[float], dataname:str, polarity:int=-1, auto_process:bool=True):
|
|
43
|
+
"""Create a MassSpecCentroid object from an array of m/z values, abundance values, resolution power, and signal-to-noise ratio.
|
|
44
|
+
|
|
45
|
+
Parameters
|
|
46
|
+
----------
|
|
47
|
+
mz : numpy.ndarray
|
|
48
|
+
Array of m/z values.
|
|
49
|
+
abundance : numpy.ndarray
|
|
50
|
+
Array of abundance values.
|
|
51
|
+
rp : list(float)
|
|
52
|
+
List of resolving power values.
|
|
53
|
+
s2n : list(float)
|
|
54
|
+
List of signal-to-noise ratio values.
|
|
55
|
+
dataname : str
|
|
56
|
+
Name of the data.
|
|
57
|
+
polarity : int, optional
|
|
58
|
+
Polarity of the data. The default is -1.
|
|
59
|
+
auto_process : bool, optional
|
|
60
|
+
|
|
61
|
+
Returns
|
|
62
|
+
-------
|
|
63
|
+
MassSpecCentroid
|
|
64
|
+
The created MassSpecCentroid object.
|
|
65
|
+
"""
|
|
66
|
+
data_dict = {Labels.mz: mz, Labels.abundance: abundance, Labels.s2n : s2n, Labels.rp: rp}
|
|
67
|
+
|
|
68
|
+
output_parameters = get_output_parameters(polarity, dataname)
|
|
69
|
+
output_parameters[Labels.label] = Labels.corems_centroid
|
|
70
|
+
|
|
71
|
+
return MassSpecCentroid(data_dict, output_parameters, auto_process)
|
|
72
|
+
|
|
73
|
+
def get_output_parameters(polarity:int, file_location:str):
|
|
74
|
+
"""Generate the output parameters for creating a MassSpecProfile or MassSpecCentroid object.
|
|
75
|
+
|
|
76
|
+
Parameters
|
|
77
|
+
----------
|
|
78
|
+
polarity : int
|
|
79
|
+
Polarity of the data.
|
|
80
|
+
file_location : str
|
|
81
|
+
File location.
|
|
82
|
+
|
|
83
|
+
Returns
|
|
84
|
+
-------
|
|
85
|
+
dict
|
|
86
|
+
Output parameters.
|
|
87
|
+
"""
|
|
88
|
+
d_params = default_parameters(file_location)
|
|
89
|
+
|
|
90
|
+
d_params['analyzer'] = 'Generic Simulated'
|
|
91
|
+
|
|
92
|
+
d_params['instrument_label'] = 'Generic Simulated'
|
|
93
|
+
|
|
94
|
+
d_params["polarity"] = polarity
|
|
95
|
+
|
|
96
|
+
d_params["filename_path"] = file_location
|
|
97
|
+
|
|
98
|
+
d_params["mobility_scan"] = 0
|
|
99
|
+
|
|
100
|
+
d_params["mobility_rt"] = 0
|
|
101
|
+
|
|
102
|
+
d_params["scan_number"] = 0
|
|
103
|
+
|
|
104
|
+
d_params["rt"] = 0
|
|
105
|
+
|
|
106
|
+
d_params[Labels.label] = Labels.simulated_profile
|
|
107
|
+
|
|
108
|
+
return d_params
|
|
@@ -111,6 +111,7 @@ class HighResMassSpecExport(Thread):
|
|
|
111
111
|
'O/C',
|
|
112
112
|
'Heteroatom Class',
|
|
113
113
|
'Ion Type',
|
|
114
|
+
'Adduct',
|
|
114
115
|
'Is Isotopologue',
|
|
115
116
|
'Mono Isotopic Index',
|
|
116
117
|
'Molecular Formula'
|
|
@@ -160,7 +161,6 @@ class HighResMassSpecExport(Thread):
|
|
|
160
161
|
|
|
161
162
|
def get_pandas_df(self):
|
|
162
163
|
"""Returns the mass spectrum data as a pandas DataFrame."""
|
|
163
|
-
|
|
164
164
|
columns = self.columns_label + self.get_all_used_atoms_in_order(self.mass_spectrum)
|
|
165
165
|
dict_data_list = self.get_list_dict_data(self.mass_spectrum)
|
|
166
166
|
df = DataFrame(dict_data_list, columns=columns)
|
|
@@ -563,6 +563,9 @@ class HighResMassSpecExport(Thread):
|
|
|
563
563
|
'Is Isotopologue': int(mformula.is_isotopologue),
|
|
564
564
|
'Molecular Formula': eval("mformula.string{}".format(encode))
|
|
565
565
|
}
|
|
566
|
+
|
|
567
|
+
if mformula.adduct_atom:
|
|
568
|
+
dict_result['Adduct'] = eval("mformula.adduct_atom{}".format(encode))
|
|
566
569
|
|
|
567
570
|
if mformula.is_isotopologue:
|
|
568
571
|
dict_result['Mono Isotopic Index'] = mformula.mspeak_index_mono_isotopic
|
|
@@ -98,9 +98,7 @@ class MolecularFormulaBase(MolecularFormulaCalc):
|
|
|
98
98
|
|
|
99
99
|
def __init__(self, molecular_formula, ion_charge, ion_type=None,
|
|
100
100
|
adduct_atom=None, mspeak_parent=None, external_mz=None):
|
|
101
|
-
|
|
102
101
|
# clear dictionary of atoms with 0 value
|
|
103
|
-
|
|
104
102
|
if type(molecular_formula) is dict:
|
|
105
103
|
self._from_dict(molecular_formula, ion_type, adduct_atom)
|
|
106
104
|
|
|
@@ -110,7 +108,6 @@ class MolecularFormulaBase(MolecularFormulaCalc):
|
|
|
110
108
|
elif type(molecular_formula) is str:
|
|
111
109
|
self._from_str(molecular_formula, ion_type, adduct_atom)
|
|
112
110
|
|
|
113
|
-
|
|
114
111
|
self._ion_charge = ion_charge
|
|
115
112
|
self._external_mz = external_mz
|
|
116
113
|
self._confidence_score = None
|
|
@@ -176,13 +173,14 @@ class MolecularFormulaBase(MolecularFormulaCalc):
|
|
|
176
173
|
|
|
177
174
|
self._d_molecular_formula = {key:val for key, val in molecular_formula.items() if val != 0}
|
|
178
175
|
|
|
179
|
-
if ion_type:
|
|
176
|
+
if ion_type is not None:
|
|
180
177
|
self._d_molecular_formula[Labels.ion_type] = ion_type
|
|
181
178
|
|
|
182
179
|
if adduct_atom:
|
|
183
180
|
if adduct_atom in self._d_molecular_formula:
|
|
184
181
|
self._d_molecular_formula[adduct_atom] += 1
|
|
185
182
|
else: self._d_molecular_formula[adduct_atom] = 1
|
|
183
|
+
self.adduct_atom = adduct_atom
|
|
186
184
|
|
|
187
185
|
def _from_list(self, molecular_formula_list, ion_type, adduct_atom):
|
|
188
186
|
# list has to be in the format
|
|
@@ -198,9 +196,12 @@ class MolecularFormulaBase(MolecularFormulaCalc):
|
|
|
198
196
|
|
|
199
197
|
self._d_molecular_formula[Labels.ion_type] = ion_type
|
|
200
198
|
if adduct_atom:
|
|
199
|
+
self.adduct_atom = adduct_atom
|
|
201
200
|
if adduct_atom in self._d_molecular_formula:
|
|
202
201
|
self._d_molecular_formula[adduct_atom] += 1
|
|
203
202
|
else: self._d_molecular_formula[adduct_atom] = 1
|
|
203
|
+
else:
|
|
204
|
+
self.adduct_atom = None
|
|
204
205
|
|
|
205
206
|
def _from_str(self, molecular_formula_str, ion_type, adduct_atom):
|
|
206
207
|
# string has to be in the format
|
|
@@ -317,7 +318,16 @@ class MolecularFormulaBase(MolecularFormulaCalc):
|
|
|
317
318
|
def ion_charge(self): return self._ion_charge
|
|
318
319
|
|
|
319
320
|
@property
|
|
320
|
-
def atoms(self):
|
|
321
|
+
def atoms(self):
|
|
322
|
+
"""Get the atoms in the molecular formula."""
|
|
323
|
+
# if there is an adduct_atom, them reduce it from the atoms list
|
|
324
|
+
if self.adduct_atom is None:
|
|
325
|
+
return [key for key in self._d_molecular_formula.keys() if key != Labels.ion_type]
|
|
326
|
+
else:
|
|
327
|
+
temp_dict = self._d_molecular_formula.copy()
|
|
328
|
+
temp_dict[self.adduct_atom] -= 1
|
|
329
|
+
return [key for key,val in temp_dict.items() if key != Labels.ion_type and val > 0]
|
|
330
|
+
|
|
321
331
|
|
|
322
332
|
@property
|
|
323
333
|
def confidence_score(self):
|
|
@@ -399,7 +409,13 @@ class MolecularFormulaBase(MolecularFormulaCalc):
|
|
|
399
409
|
|
|
400
410
|
for mf in self._cal_isotopologues(self._d_molecular_formula, min_abundance, current_mono_abundance, dynamic_range ):
|
|
401
411
|
|
|
402
|
-
yield MolecularFormulaIsotopologue(
|
|
412
|
+
yield MolecularFormulaIsotopologue(
|
|
413
|
+
*mf,
|
|
414
|
+
current_mono_abundance,
|
|
415
|
+
self.ion_charge,
|
|
416
|
+
ion_type=self.ion_type,
|
|
417
|
+
adduct_atom=self.adduct_atom
|
|
418
|
+
)
|
|
403
419
|
|
|
404
420
|
def atoms_qnt(self,atom):
|
|
405
421
|
"""Get the atom quantity of a specific atom in the molecular formula."""
|
|
@@ -414,12 +430,20 @@ class MolecularFormulaBase(MolecularFormulaCalc):
|
|
|
414
430
|
|
|
415
431
|
@property
|
|
416
432
|
def string(self):
|
|
417
|
-
|
|
433
|
+
"""Returns the molecular formula as a string."""
|
|
418
434
|
if self._d_molecular_formula:
|
|
435
|
+
if self.adduct_atom is None:
|
|
436
|
+
mol_form_dict = self._d_molecular_formula
|
|
437
|
+
else:
|
|
438
|
+
mol_form_dict = self._d_molecular_formula.copy()
|
|
439
|
+
if self.adduct_atom not in mol_form_dict.keys():
|
|
440
|
+
raise Exception("Adduct atom not found in molecular formula dict")
|
|
441
|
+
mol_form_dict[self.adduct_atom] -= 1
|
|
442
|
+
mol_form_dict = {key:val for key, val in mol_form_dict.items() if val != 0}
|
|
419
443
|
formula_srt = ''
|
|
420
444
|
for atom in Atoms.atoms_order:
|
|
421
|
-
if atom in
|
|
422
|
-
formula_srt += atom + str(int(
|
|
445
|
+
if atom in mol_form_dict.keys():
|
|
446
|
+
formula_srt += atom + str(int(mol_form_dict.get(atom))) + ' '
|
|
423
447
|
return formula_srt.strip()
|
|
424
448
|
|
|
425
449
|
else:
|
|
@@ -547,6 +571,10 @@ class MolecularFormulaIsotopologue(MolecularFormulaBase):
|
|
|
547
571
|
The ion charge.
|
|
548
572
|
mspeak_parent : object, optional
|
|
549
573
|
The parent mass spectrum peak object instance. Defaults to None.
|
|
574
|
+
ion_type : str, optional
|
|
575
|
+
The ion type. Defaults to None.
|
|
576
|
+
adduct_atom : str, optional
|
|
577
|
+
The adduct atom. Defaults to None.
|
|
550
578
|
|
|
551
579
|
Attributes
|
|
552
580
|
----------
|
|
@@ -565,9 +593,48 @@ class MolecularFormulaIsotopologue(MolecularFormulaBase):
|
|
|
565
593
|
mono_isotopic_formula_index : int
|
|
566
594
|
The index of the monoisotopic formula in the molecular formula list. Defaults to None.
|
|
567
595
|
"""
|
|
568
|
-
def __init__(
|
|
596
|
+
def __init__(
|
|
597
|
+
self,
|
|
598
|
+
_d_molecular_formula,
|
|
599
|
+
prob_ratio,
|
|
600
|
+
mono_abundance,
|
|
601
|
+
ion_charge,
|
|
602
|
+
mspeak_parent=None,
|
|
603
|
+
ion_type = None,
|
|
604
|
+
adduct_atom = None
|
|
605
|
+
):
|
|
606
|
+
|
|
607
|
+
if ion_type is None:
|
|
608
|
+
# check if ion type or adduct_atom is in the molecular formula dict
|
|
609
|
+
if Labels.ion_type in _d_molecular_formula:
|
|
610
|
+
ion_type = _d_molecular_formula.get(Labels.ion_type)
|
|
611
|
+
else:
|
|
612
|
+
ion_type = None
|
|
613
|
+
else:
|
|
614
|
+
ion_type = Labels.ion_type_translate.get(ion_type)
|
|
569
615
|
|
|
570
|
-
|
|
616
|
+
if ion_type == Labels.adduct_ion:
|
|
617
|
+
adduct_atom_int = None
|
|
618
|
+
if adduct_atom in _d_molecular_formula.keys():
|
|
619
|
+
adduct_atom_int = adduct_atom
|
|
620
|
+
else:
|
|
621
|
+
# Check to see if adduct_atom should actually be an isotope of the adduct atom
|
|
622
|
+
for adduct_iso in Atoms.isotopes.get(adduct_atom)[1]:
|
|
623
|
+
if adduct_iso in _d_molecular_formula.keys():
|
|
624
|
+
adduct_atom_int = adduct_iso
|
|
625
|
+
adduct_atom = adduct_atom_int
|
|
626
|
+
if adduct_atom is None:
|
|
627
|
+
raise Exception("adduct_atom is required for adduct ion")
|
|
628
|
+
_d_molecular_formula[adduct_atom] -= 1
|
|
629
|
+
_d_molecular_formula = {key:val for key, val in _d_molecular_formula.items() if val != 0}
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
super().__init__(
|
|
633
|
+
molecular_formula =_d_molecular_formula,
|
|
634
|
+
ion_charge = ion_charge,
|
|
635
|
+
ion_type=ion_type,
|
|
636
|
+
adduct_atom=adduct_atom
|
|
637
|
+
)
|
|
571
638
|
#prob_ratio is relative to the monoisotopic peak p_isotopologue/p_mono_isotopic
|
|
572
639
|
|
|
573
640
|
self.prob_ratio = prob_ratio
|
|
@@ -49,9 +49,7 @@ class LowResMassSpectralMatch(Thread):
|
|
|
49
49
|
self.calibration = calibration
|
|
50
50
|
# reading local file for now,
|
|
51
51
|
if not sql_obj:
|
|
52
|
-
|
|
53
52
|
self.sql_obj = EI_LowRes_SQLite(url=self.gcms_obj.molecular_search_settings.url_database)
|
|
54
|
-
|
|
55
53
|
else:
|
|
56
54
|
self.sql_obj = sql_obj
|
|
57
55
|
|
|
@@ -717,9 +717,11 @@ class MSPeakCalculation:
|
|
|
717
717
|
"""
|
|
718
718
|
|
|
719
719
|
candidates = list(filter(lambda mf: mf.get("O") > 0 and mf.get("N") <=3 and mf.get("P") <= 2 and (3 * mf.get("P")) <= mf.get("O"), self.molecular_formulas))
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
720
|
+
if len(candidates) >0:
|
|
721
|
+
if lowest_error:
|
|
722
|
+
return min(candidates, key=lambda m: abs(m.mz_error))
|
|
723
|
+
else:
|
|
724
|
+
return candidates
|
|
723
725
|
else:
|
|
724
726
|
return candidates
|
|
725
727
|
|
|
@@ -752,9 +754,11 @@ class MSPeakCalculation:
|
|
|
752
754
|
"""
|
|
753
755
|
|
|
754
756
|
candidates = list(filter(lambda mf: mf.get("O") > 0 and mf.get("N") <=3 and mf.get("S") <=2 and mf.get("P") <= 2, self.molecular_formulas))
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
757
|
+
if len(candidates) >0:
|
|
758
|
+
if lowest_error:
|
|
759
|
+
return min(candidates, key=lambda m: abs(m.mz_error))
|
|
760
|
+
else:
|
|
761
|
+
return candidates
|
|
758
762
|
else:
|
|
759
763
|
return candidates
|
|
760
764
|
|
|
@@ -789,8 +793,11 @@ class MSPeakCalculation:
|
|
|
789
793
|
|
|
790
794
|
candidates = list(filter(lambda mf: mf.get("O") > 0 and mf.get("N") <=2 and mf.get("S") <=1 and mf.get("P") == 0 and 3* (mf.get("S") + mf.get("N")) <= mf.get("O"), self.molecular_formulas))
|
|
791
795
|
|
|
792
|
-
if
|
|
793
|
-
|
|
796
|
+
if len(candidates) >0:
|
|
797
|
+
if lowest_error:
|
|
798
|
+
return min(candidates, key=lambda m: abs(m.mz_error))
|
|
799
|
+
else:
|
|
800
|
+
return candidates
|
|
794
801
|
else:
|
|
795
802
|
return candidates
|
|
796
803
|
|
|
@@ -238,18 +238,35 @@ class TransientCalculations(object):
|
|
|
238
238
|
|
|
239
239
|
|
|
240
240
|
"""
|
|
241
|
+
# If the mw_low and mw_high are set, the frequency domain is cut to the mw range
|
|
242
|
+
# this accounts for the detection settings, not the excitation settings.
|
|
243
|
+
# TODO: Implement this - right now the f to mz function is in the ms class, not the transient class, so it doesnt work.
|
|
244
|
+
#if (self._mw_low != 0) & (self._mw_high != 0):
|
|
245
|
+
# high_freq = self._f_to_mz(self._mw_high)
|
|
246
|
+
# low_freq = self._f_to_mz(self._mw_low)
|
|
247
|
+
#
|
|
248
|
+
# final = where(freqdomain_X < high_freq)[-1][-1]
|
|
249
|
+
# start = where(freqdomain_X > low_freq)[0][0]
|
|
250
|
+
#else:
|
|
251
|
+
if self._qpd_enabled == 1:
|
|
252
|
+
low_freq = self._exc_low_freq *2
|
|
253
|
+
high_freq = self._exc_high_freq *2
|
|
254
|
+
else:
|
|
255
|
+
low_freq = self._exc_low_freq
|
|
256
|
+
high_freq = self._exc_high_freq
|
|
241
257
|
|
|
242
|
-
|
|
243
258
|
if self._exc_low_freq > self._exc_high_freq:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
259
|
+
# TODO: This needs to be tested
|
|
260
|
+
# I'm not sure that this is relevant anyway - the excitation pulse is ramped in frequency but the detection is simulatenous
|
|
261
|
+
print("This is not tested. Please check the results.")
|
|
262
|
+
final = where(freqdomain_X > low_freq)[0][0]
|
|
263
|
+
start = where(freqdomain_X > high_freq)[0][0]
|
|
264
|
+
|
|
248
265
|
else:
|
|
249
266
|
|
|
250
|
-
final = where(freqdomain_X
|
|
251
|
-
start = where(freqdomain_X >
|
|
252
|
-
|
|
267
|
+
final = where(freqdomain_X < high_freq)[-1][-1]
|
|
268
|
+
start = where(freqdomain_X > low_freq)[0][0]
|
|
269
|
+
|
|
253
270
|
|
|
254
271
|
return freqdomain_X[start:final], freqdomain_Y[start:final]
|
|
255
272
|
#del freqdomain_X, freqdomain_Y
|
|
@@ -119,6 +119,12 @@ class Transient(TransientCalculations):
|
|
|
119
119
|
|
|
120
120
|
self._exc_low_freq = d_params.get("exc_low_freq")
|
|
121
121
|
|
|
122
|
+
self._qpd_enabled = d_params.get("qpd_enabled") #Quadrupolar detection enabled
|
|
123
|
+
|
|
124
|
+
self._mw_low = d_params.get("mw_low") # low mass for detection
|
|
125
|
+
|
|
126
|
+
self._mw_high = d_params.get("mw_high") # high mass for detection
|
|
127
|
+
|
|
122
128
|
self.bandwidth = d_params.get("bandwidth")
|
|
123
129
|
|
|
124
130
|
self.number_data_points = d_params.get("number_data_points")
|