Skip to content

Commit

Permalink
Merge pull request #104 from michaelmarty/v3
Browse files Browse the repository at this point in the history
Version 8.0.0 Beta Version
  • Loading branch information
michaelmarty authored Dec 27, 2024
2 parents 8038479 + a7ab2a7 commit 900b22a
Show file tree
Hide file tree
Showing 227 changed files with 101,294 additions and 113,372 deletions.
20 changes: 16 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ unidec/bin/Example Data/GroEL UniDec_unidecfiles/GroEL UniDec_report.pdf
unidec/bin/Example Data/BSA_unidecfiles/BSA_ofile_crazy.dat
unidec/bin/Example Data/BSA_unidecfiles/BSA_report.html
unidec_src/UniDec/test_match.bat
unidec/LipiDec/LipyDec.py
unidec/LipiDec/SkyQuant.py
Scripts/LipiDec/LipyDec.py
Scripts/LipiDec/SkyQuant.py
docker_commands.txt
unidec/bin/Example Data/BSA_unidecfiles/BSA_conv.bin
.pypirc
Expand Down Expand Up @@ -272,5 +272,17 @@ unidec/modules/gui_elements/UniDec.mplstyle
Dockerfile_isodec
unidec/recent.txt
unidec/src/UniDec/


unidec/IsoDec/src2/
unidec/IsoDec/test.py
unidec/IsoDec/testlooper.py
unidec/IsoDec/oldisodecfunctions.py
Scripts/MTM/HR/Old/src_vs/
unidec/IsoDec/src_cmake/cmake-build*
unidec/IsoDec/src_cmake/.idea/
unidec/IsoDec/IsoDec tests/
unidec/IsoDec/bin/
unidec/IsoDec/lib/
unidec/IsoDec/src_vs/
unidec/bin/Example Data/IsoDec/test2_unidecfiles*
unidec/bin/Example Data/IsoDec/test9_unidecfiles*
unidec/UniDecImporter/reader_tester.py
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM python:3.11.9-bookworm

# C dependencies
RUN apt-get update && apt-get install -y libfftw3-dev hdf5-tools libhdf5-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y libfftw3-dev hdf5-tools libhdf5-dev cmake --no-install-recommends && rm -rf /var/lib/apt/lists/*

# To Run GUI
RUN pip install setuptools attrdict attrdict3 numpy pymzml networkx natsort h5py matplotlib scipy pyteomics mpld3 pandas plotly
RUN pip install setuptools attrdict attrdict3 numpy pymzml networkx natsort h5py matplotlib scipy pyteomics mpld3 pandas plotly numba
# RUN pip install wxpython

# Copy in stuff
Expand All @@ -15,6 +15,10 @@ COPY . /opt/UniDec
WORKDIR /opt/UniDec/unidec/src/
RUN /opt/UniDec/unidec/src/compilelinux.sh

# Compile IsoDec C
WORKDIR /opt/UniDec/unidec/IsoDec/src_cmake/
RUN /opt/UniDec/unidec/IsoDec/src_cmake/compilelinux.sh

# Install Python
WORKDIR /opt/UniDec/
RUN python setupdocker.py install
Expand All @@ -23,4 +27,5 @@ RUN python setupdocker.py install
ENV PATH="$PATH:/opt/UniDec/unidec/bin"

# Test everything
ENV TESTFILE /opt/UniDec/unidec/bin/TestSpectra/test_1.txt
ENV TESTFILE="/opt/UniDec/unidec/bin/TestSpectra/test_1.txt"
ENV TESTFILE2="/opt/UniDec/unidec/bin/TestSpectra/test_2.txt"
38 changes: 27 additions & 11 deletions GUniDec.spec
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ hiddenimportslist=['scipy.special._ufuncs_cxx', 'scipy.linalg.cython_blas', 'sci


excludeslist = ['IPython', 'statsmodels', 'pyopenms', 'sklearn',
'GdkPixbuf', 'pyQT4', 'pygobject', 'pygtk', 'pyside', 'PySide2', 'shiboken2', 'PyQt5']
'GdkPixbuf', 'pyQT4', 'pygobject', 'pygtk', 'pyside', 'PySide2', 'shiboken2', 'PyQt5', 'torch']

# Analysis of packages
a = Analysis(['unidec\\Launcher.py'],
Expand Down Expand Up @@ -105,15 +105,34 @@ if system == "Windows":
a.datas += add
# print add

a.datas += [('RawFileReaderLicense.doc', 'unidec\\modules\\thermo_reader\\RawFileReaderLicense.doc', 'BINARY')]
a.datas += [('ThermoFisher.CommonCore.Data.dll', 'unidec\\modules\\thermo_reader\\ThermoFisher.CommonCore.Data.dll', 'BINARY')]
a.datas += [('ThermoFisher.CommonCore.RawFileReader.dll', 'unidec\\modules\\thermo_reader\\ThermoFisher.CommonCore.RawFileReader.dll', 'BINARY')]
a.datas += [('ThermoFisher.CommonCore.MassPrecisionEstimator.dll', 'unidec\\modules\\thermo_reader\\ThermoFisher.CommonCore.MassPrecisionEstimator.dll', 'BINARY')]
a.datas += [('ThermoFisher.CommonCore.BackgroundSubtraction.dll', 'unidec\\modules\\thermo_reader\\ThermoFisher.CommonCore.BackgroundSubtraction.dll', 'BINARY')]
a.datas += [('RawFileReaderLicense.doc', 'unidec\\UniDecImporter\\Thermo\\RawFileReaderLicense.doc', 'BINARY')]
a.datas += [('ThermoFisher.CommonCore.Data.dll', 'unidec\\UniDecImporter\\Thermo\\ThermoFisher.CommonCore.Data.dll', 'BINARY')]
a.datas += [('ThermoFisher.CommonCore.RawFileReader.dll', 'unidec\\UniDecImporter\\Thermo\\ThermoFisher.CommonCore.RawFileReader.dll', 'BINARY')]
a.datas += [('ThermoFisher.CommonCore.MassPrecisionEstimator.dll', 'unidec\\UniDecImporter\\Thermo\\ThermoFisher.CommonCore.MassPrecisionEstimator.dll', 'BINARY')]
a.datas += [('ThermoFisher.CommonCore.BackgroundSubtraction.dll', 'unidec\\UniDecImporter\\Thermo\\ThermoFisher.CommonCore.BackgroundSubtraction.dll', 'BINARY')]
a.datas += [('Waters_MassLynxSDK_EULA.txt', 'unidec\\bin\\Waters_MassLynxSDK_EULA.txt', 'DATA')]

a.datas += [('BaseCommon.dll', 'unidec\\UniDecImporter\\Agilent\\BaseCommon.dll', 'BINARY')]
a.datas += [('BaseCommon.tlb', 'unidec\\UniDecImporter\\Agilent\\BaseCommon.tlb', 'BINARY')]
a.datas += [('BaseDataAccess.dll', 'unidec\\UniDecImporter\\Agilent\\BaseDataAccess.dll', 'BINARY')]
a.datas += [('BaseDataAccess.tlb', 'unidec\\UniDecImporter\\Agilent\\BaseDataAccess.tlb', 'BINARY')]
a.datas += [('BaseError.dll', 'unidec\\UniDecImporter\\Agilent\\BaseError.dll', 'BINARY')]
a.datas += [('BaseTof.dll', 'unidec\\UniDecImporter\\Agilent\\BaseTof.dll', 'BINARY')]
a.datas += [('MassSpecDataReader.dll', 'unidec\\UniDecImporter\\Agilent\\MassSpecDataReader.dll', 'BINARY')]
a.datas += [('MassSpecDataReader.tlb', 'unidec\\UniDecImporter\\Agilent\\MassSpecDataReader.tlb', 'BINARY')]


a.datas += [('isodeclib.dll', 'unidec\\IsoDec\\isodeclib.dll', 'BINARY')]
a.datas += [('isodeclib.lib', 'unidec\\IsoDec\\isodeclib.lib', 'BINARY')]
a.datas += [('isogenmass.dll', 'unidec\\IsoDec\\isogenmass.dll', 'BINARY')]
a.datas += [('isogenmass.lib', 'unidec\\IsoDec\\isogenmass.lib', 'BINARY')]


elif system == "Linux":
a.datas += [('unideclinux', 'unidec/bin/unideclinux', 'BINARY')]



a.datas += [('cacert.pem', os.path.join('unidec\\bin', 'cacert.pem'), 'DATA')]
a.datas += [('logo.ico', 'unidec\\bin\\logo.ico', 'DATA')]
a.datas += [('mass_table.csv', 'unidec\\bin\\mass_table.csv', 'DATA')]
Expand All @@ -124,8 +143,6 @@ a.datas += [('UniDecLogoMR.png', 'unidec\\bin\\UniDecLogoMR.png', 'DATA')]

a.datas.extend(dir_files(os.path.join(os.path.dirname(pymzml.__file__), 'obo'), 'obo'))

a.datas.extend(dir_files("unidec\\bin\\multiplierz", 'multiplierz'))

a.datas.extend(dir_files("unidec\\bin\\Presets", 'Presets'))
a.datas.extend(dir_files("unidec\\bin\\Example Data", 'Example Data'))
a.datas.extend(dir_files(compat.base_prefix + '\\Lib\\site-packages\\matchms\\data', "matchms\\data"))
Expand All @@ -135,9 +152,8 @@ newdir = "numpy/DLLs"
a.datas.extend(dir_files(mkldir, newdir, type="BINARY"))
#a.datas.extend(
# [(mkldir + "/" + mkl, newdir, 'BINARY') for mkl in listdir(mkldir) if mkl.startswith('mkl_') or mkl.startswith('libio')])

rdkitlibs = compat.base_prefix + "/Lib/site-packages/rdkit.libs"
a.datas.extend(dir_files(rdkitlibs, ''))
# rdkitlibs = compat.base_prefix + "/Lib/site-packages/rdkit.libs"
# a.datas.extend(dir_files(rdkitlibs, ''))

# Assemble and build
pyz = PYZ(a.pure)
Expand Down
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ rem update docs with .\unidec_doc\make.bat html
rem paste docs into UniDecDocumentation and push to git

echo "Building"
C:\Python311\Scripts\pyinstaller.exe GUniDec.spec --noconfirm
C:\Python312\Scripts\pyinstaller.exe GUniDec.spec --noconfirm
rem call "C:\Python\UniDec3\dist\UniDec_Windows\GUI_UniDec.exe"
20 changes: 20 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,26 @@ Of course, using the pre-compiled version means you don't need to know Python at

## Change Log

v.8.0.0

Added **IsoDec** for isotopic deconvolution. This is a new window that allows you to deconvolve isotopic distributions. It is built using a neural net engine but has a similar interface to conventional UniDec.

New IsoGen neural net for generating isotopic distributions. Used by IsoDec but also available in Python code and via DLL.

Complete rewrite and restructuring of Importing code into UniDecImporter library. This should help harmonize and centralize the MS file reading functions. Removed some prior reliance on multiplierz for Agilent data.

To simplify the import functions, the UniDec GUI has changed slightly such that you need to explicity switch it to ion mobility mode (see Advanced menu) before opening ion mobility files.

Various other under the hood changes to accomodate new code, and some bug fixes.

Fixed label for DAR mode in UPP help files.

v. 7.0.3

Added check box in UPP to allow all PNG images rather than SVG images, which can improve file sizes.

Added "Config Data Subbuff" to UPP to allow background subtraction with a curved background in the spreadsheet format. Added "Config Data Binevery", "Config Data Lintype", and "Config Data Smoothing" to provide access to other data processing parameters in the spreadsheet format.

v.7.0.2

Improvements to UPP outputs. Fixed issue with reports getting overwritten if the same file is used in multiple rows with UPP.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
package_data={"": [ "readme.md", "LICENSE"]},
exclude_package_data={"": ["Scripts", "Scripts.*", "*.Scripts", "*.Scripts.*", ".gitignore", "unidec_doc"],
},
download_url='https://github.com/michaelmarty/UniDec/archive/refs/tags/v.5.2.1.tar.gz',

classifiers=[],
)
2 changes: 1 addition & 1 deletion setupdocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
url="https://github.com/michaelmarty/UniDec",
python_requires='>=3.7',

install_requires=["numpy>=1.16", "scipy>=1.2", "matplotlib>=3.1", "lxml", 'pandas',
install_requires=["numpy>=1.16", "scipy>=1.2", "matplotlib>=3.1", "lxml", 'pandas', 'numba',
"pymzml", "natsort", "networkx", "h5py", "pyimzml", "pyteomics", "lxml_html_clean"],

packages=find_packages(exclude=["Scripts", "Scripts.*", "*.Scripts", "*.Scripts.*"]),
Expand Down
5 changes: 4 additions & 1 deletion unidec/DataCollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from pubsub import pub
import platform
import multiprocessing
from unidec.modules import UniFit, Extract2D, unidecstructure, PlotAnimations, PlottingWindow, IM_functions
from unidec.modules import UniFit, Extract2D, unidecstructure, IM_functions
from unidec.modules.plotting import PlottingWindow, PlotAnimations
from unidec.modules import DoubleDec, MassDefects, miscwindows
import unidec.tools as ud
from unidec.modules.AutocorrWindow import AutocorrWindow
Expand Down Expand Up @@ -1490,4 +1491,6 @@ def OnDropFiles(self, x, y, filenames):
frame = DataCollector(None, "Collect Data")
app.MainLoop()

# Test file Z:\mtmarty\Data\Others\cprog\New\Man9 141015\collection2.json


Loading

0 comments on commit 900b22a

Please sign in to comment.