Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
- added requirements file
- minor reformat
  • Loading branch information
lukasz-migas committed Mar 13, 2019
1 parent 13ecfd2 commit 0d58ba3
Show file tree
Hide file tree
Showing 10 changed files with 784 additions and 47 deletions.
27 changes: 19 additions & 8 deletions ORIGAMI_ANALYSE/origami/ORIGAMI.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,31 @@
# -------------------------------------------------------------------------
# __author__ lukasz.g.migas

import warnings
from copy import deepcopy

# Import libraries
import wx, os, sys, time, re, gc, path, threading, random, webbrowser
import gc
import numpy as np
import os
import pandas as pd
# import path
import random
import re
import sys
import threading
import time
import webbrowser
import wx
import wx.lib.agw.multidirdialog as MDD
from _codecs import encode
from numpy.ma import masked_array # @UnresolvedImport
from math import sqrt, log
from numpy.ma import masked_array # @UnresolvedImport
from scipy.stats import linregress # @UnresolvedImport
from wx.lib.pubsub import setuparg1
import wx.lib.agw.multidirdialog as MDD
from copy import deepcopy
import pandas as pd

from ids import *
from math import sqrt, log
from scipy.stats import linregress # @UnresolvedImport

import warnings
# needed to avoid annoying warnings to be printed on console
warnings.filterwarnings("ignore",category=DeprecationWarning)
warnings.filterwarnings("ignore",category=RuntimeWarning)
Expand Down
2 changes: 1 addition & 1 deletion ORIGAMI_ANALYSE/origami/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self):
self.loggingFile_path = None

self.document_version = "19-10-2018"
self.version = "1.2.0.4"
self.version = "1.2.1.5"
self.unidec_engine = None
self.links = {
'home' : 'https://www.click2go.umip.com/i/s_w/ORIGAMI.html',
Expand Down
4 changes: 2 additions & 2 deletions ORIGAMI_ANALYSE/origami/configOut.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
<param title="Import/Export parameters" gripper="False" caption="True" close_button="True" floating="True" show="False" type="mixed" />
<param title="Linear Drift Cell" gripper="False" caption="True" close_button="True" floating="False" show="False" type="mixed" />
<param title="Log" gripper="False" caption="True" close_button="True" floating="False" show="False" type="mixed" />
<param title="Multiple files" gripper="False" caption="True" close_button="True" floating="False" show="False" type="mixed" />
<param title="Multiple files" gripper="False" caption="True" close_button="True" floating="False" show="True" type="mixed" />
<param title="Peak list" gripper="False" caption="True" close_button="True" floating="False" show="False" type="mixed" />
<param title="Plot parameters" gripper="False" caption="True" close_button="True" floating="True" show="False" type="mixed" />
<param title="Plots" gripper="False" caption="False" close_button="False" floating="False" show="True" type="mixed" />
<param title="Processing parameters" gripper="False" caption="True" close_button="True" floating="True" show="False" type="mixed" />
<param title="Text files" gripper="False" caption="True" close_button="True" floating="False" show="True" type="mixed" />
<param title="Text files" gripper="False" caption="True" close_button="True" floating="False" show="False" type="mixed" />
<param title="Toolbar" gripper="True" orientation="top" close_button="False" left_position="False" top_position="True" left_dockable="True" right_dockable="True" top_dockable="True" bottom_dockable="True" show="True" type="mixed" />
</presets_gui_aui_settings>

Expand Down
25 changes: 13 additions & 12 deletions ORIGAMI_ANALYSE/origami/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,24 @@
# -------------------------------------------------------------------------
# __author__ lukasz.g.migas

# Load libraries
import wx, itertools, os, webbrowser, wx.html
from operator import itemgetter
from numpy import arange, transpose, argmax, round, max, median, min, argmin
from numpy import sum as npsum
from wx.lib.pubsub import pub

# Load libraries
import itertools
import os
import webbrowser
import wx
import wx.html
import wx.lib.mixins.listctrl as listmix
from numpy import arange, transpose, argmax, min
from numpy import sum as npsum

from help import OrigamiHelp as help
from icons import IconContainer as icons
import plots as plots
from help import OrigamiHelp as help
from ids import (ID_addNewOverlayDoc, ID_helpNewVersion, ID_saveAllDocuments)
from styles import makeCheckbox, validator, makeSuperTip, makeStaticBox, makeToggleBtn
from toolbox import (str2num, str2int, convertRGB1to255, convertRGB255to1, num2str,
isnumber, getNarrow1Ddata, dir_extra, findPeakMax, find_nearest,
MidpointNormalize)
from unidec_modules.unidectools import make_peak_shape, isolated_peak_fit
from styles import makeCheckbox, validator, makeSuperTip
from toolbox import (str2num, str2int, getNarrow1Ddata)
from unidec_modules.unidectools import isolated_peak_fit


def dlgBox(exceptionTitle="", exceptionMsg="", type="Error", exceptionPrint=True):
Expand Down
55 changes: 55 additions & 0 deletions ORIGAMI_ANALYSE/origami/origami_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
attrs==19.1.0
backports-abc==0.5
backports.functools-lru-cache==1.5
bokeh==0.13.0
certifi==2019.3.9
chardet==3.0.4
comtypes==1.1.7
cycler==0.10.0
decorator==4.3.2
enum34==1.1.6
et-xmlfile==1.0.1
functools32==3.2.3.post2
futures==3.2.0
idna==2.8
ipython-genutils==0.2.0
jdcal==1.4
Jinja2==2.10
jsonschema==3.0.1
jupyter-core==4.4.0
kiwisolver==1.0.1
lxml==4.3.2
MarkupSafe==1.1.1
matplotlib==2.2.4
multiplierz==2.0.14
natsort==6.0.0
nbformat==4.4.0
numpy==1.16.2+mkl
openpyxl==2.6.1
packaging==19.0
pandas==0.24.1
Pillow==5.4.1
plotly==3.7.0
psutil==5.6.1
pymzml==0.7.10
pyparsing==2.3.1
pypiwin32==223
pyrsistent==0.14.11
pyteomics==4.0.1
python-dateutil==2.8.0
pytz==2018.9
pywin32==224
PyYAML==3.13
requests==2.21.0
retrying==1.3.3
scikit-learn==0.20.3
scipy==1.2.1
seaborn==0.9.0
singledispatch==3.4.0.3
six==1.12.0
tornado==5.1.1
traitlets==4.3.2
urllib3==1.24.1
wincertstore==0.2
xlrd==1.2.0
xlwt==1.3.0
8 changes: 5 additions & 3 deletions ORIGAMI_ANALYSE/origami/panelExtraParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
# -------------------------------------------------------------------------
# __author__ lukasz.g.migas

import wx, os, time
import os
import time
import wx
from wx.combo import BitmapComboBox

from toolbox import *
from help import OrigamiHelp as help
from ids import *
from styles import layout, makeCheckbox, makeToggleBtn, makeSuperTip, makeStaticBox
from help import OrigamiHelp as help
from toolbox import *


class panelParametersEdit(wx.Panel):
Expand Down
30 changes: 15 additions & 15 deletions ORIGAMI_ANALYSE/origami/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,37 @@
# __author__ lukasz.g.migas

from __future__ import division, unicode_literals

import itertools
import numpy as np
# needed to avoid annoying warnings to be printed on console
import warnings
from copy import deepcopy

import matplotlib
import matplotlib.cm as cm
# import matplotlib.colors as mpl_colors
import matplotlib.patches as patches
import numpy as np
from utilities.adjustText import adjust_text
# import matplotlib as mpl
# import matplotlib.pyplot as plt
# from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
from matplotlib import gridspec
import matplotlib.cm as cm
# import matplotlib.colors as mpl_colors
import matplotlib.patches as patches
from matplotlib.ticker import MaxNLocator
from matplotlib.collections import LineCollection
from matplotlib.ticker import MaxNLocator
from mpl_toolkits.axes_grid1 import make_axes_locatable
# from mpl_toolkits.mplot3d import Axes3D

from seaborn import color_palette
from adjustText import adjust_text
from copy import deepcopy

import dialogs as dialogs
from plottingWindow import plottingWindow
from toolbox import (find_limits, dir_extra, determineFontColor, convertRGB1to255,
from processing.heatmap import normalize_2D
from processing.spectra import normalize_1D
from toolbox import (determineFontColor, convertRGB1to255,
find_limits_list, MidpointNormalize, merge_two_dicts,
str2num, str2int, randomColorGenerator, _replace_labels,
remove_nan_from_list, find_limits_all)
import dialogs as dialogs
from processing.spectra import normalize_1D
from processing.heatmap import normalize_2D

# needed to avoid annoying warnings to be printed on console
import warnings
# from mpl_toolkits.mplot3d import Axes3D
warnings.filterwarnings("ignore", category=DeprecationWarning)
warnings.filterwarnings("ignore", category=RuntimeWarning)

Expand Down
12 changes: 6 additions & 6 deletions ORIGAMI_ANALYSE/origami/unidec_modules/unidectools.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from scipy import signal
from scipy import fftpack
import matplotlib.cm as cm
import mzMLimporter
# import mzMLimporter
from fitting import *
import unidecstructure
import tempfile
Expand Down Expand Up @@ -602,11 +602,11 @@ def load_mz_file(path, config=None):

if extension == ".txt":
data = np.loadtxt(path, skiprows=header_test(path))
elif extension == ".mzml":
data = mzMLimporter.mzMLimporter(path).get_data()
txtname = path[:-5] + ".txt"
np.savetxt(txtname, data)
print "Saved to:", txtname
# elif extension == ".mzml":
# data = mzMLimporter.mzMLimporter(path).get_data()
# txtname = path[:-5] + ".txt"
# np.savetxt(txtname, data)
# print "Saved to:", txtname
elif extension.lower() == ".raw":
data = data_reader.DataImporter(path).get_data()
txtname = path[:-4] + ".txt"
Expand Down
1 change: 1 addition & 0 deletions ORIGAMI_ANALYSE/origami/utilities/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__author__ = 'Lukasz.Migas'
Loading

0 comments on commit 0d58ba3

Please sign in to comment.