Commits (7)
......@@ -227,6 +227,8 @@ def pyrsir(
for species in dct:
if 'affin' not in dct[species]: # set affinity if not specified
fn = dct[species]['function']
if fn not in mzml.functions:
raise KeyError(f'The function {fn} is not in the mzML file, please check your configuration')
if mzml.functions[fn]['type'] == 'MS':
dct[species]['affin'] = mzml.functions[fn]['mode']
if mzml.functions[fn]['type'] == 'UV':
......
__version__ = '1.6.0'
__version__ = '1.6.3'
......@@ -124,6 +124,8 @@ def interpret(block: str):
i += 1
if block[i].isdigit() is True: # add digits
num += block[i]
elif block[i] == ' ': # ignore spaces
continue
else:
ele += block[i]
if num == '':
......@@ -920,12 +922,12 @@ def isotope_pattern_isospec(
"""
Generates a raw isotope pattern using the isospecpy package. http://matteolacki.github.io/IsoSpec/
:param comp:
:param decpl:
:param verbose:
:param threshold:
:param kwargs:
:return:
:param comp: composition dictionary
:param decpl: decimal places to track while converting from isospec to Spectrum
:param verbose: chatty mode
:param threshold: threshold level (relative, seems slightly buggy)
:param kwargs: catch for extra kwargs
:return: Spectrum object
"""
global _CITATION_REMINDER
if _CITATION_REMINDER is False: # remind the user on the first use
......@@ -941,7 +943,7 @@ def isotope_pattern_isospec(
# use IsoSpec algorithm to generate configurations
iso_spec = IsoThreshold(
formula="".join(f'{ele}{num}' for ele, num in comp.items()),
threshold=threshold,
threshold=threshold * 0.1,
)
spec = Spectrum(
......
......@@ -931,13 +931,13 @@ def plot_mass_spectrum(
# show or hide axis values/labels as specified
if yvalues is False: # y tick marks and values
ax.tick_params(axis='y', labelleft='off', length=0)
if yvalues is True: # y value labels
else: # y value labels
ax.tick_params(
axis='y',
length=axwidth * 3,
width=axwidth,
direction='out',
right='off'
right=False,
)
for label in ax.get_yticklabels():
label.set_fontproperties(tickfont)
......@@ -949,13 +949,13 @@ def plot_mass_spectrum(
if xvalues is False: # x tick marks and values
ax.tick_params(axis='x', labelbottom='off', length=0)
if xvalues is True: # x value labels
else: # x value labels
ax.tick_params(
axis='x',
length=axwidth * 3,
width=axwidth,
direction='out',
top='off'
top=False,
)
for label in ax.get_xticklabels():
label.set_fontproperties(tickfont)
......
......@@ -39,7 +39,7 @@ setup(
install_requires=[
'numpy>=1.14.2',
'openpyxl>=2.5.2',
'matplotlib>=2.1.2',
'matplotlib>=3.2.1',
'scipy>=1.1.0',
'sympy>=1.1.1',
'obonet==0.2.5', # they changed attribute names without deprecationwarnings, so only this version is verified
......