Commit 25860ed2 authored by Yan's avatar Yan
Browse files

Setup now includes extra_require

* rawautoparams 0.0.2 now supported
* fixed headers order
* version increased to 0.0.14
parent dec50bbd
...@@ -213,7 +213,7 @@ def about(parent): ...@@ -213,7 +213,7 @@ def about(parent):
QtWidgets.QMessageBox.information( QtWidgets.QMessageBox.information(
parent, "About Prasopes", parent, "About Prasopes",
"Prasopes Finnigan raw file viewer\n\n" "Prasopes Finnigan raw file viewer\n\n"
"Version: 0.0.13 (alpha)") "Version: 0.0.14 (alpha)")
def main(): def main():
......
...@@ -434,17 +434,22 @@ def legendize(rawlegend, chrom_data): ...@@ -434,17 +434,22 @@ def legendize(rawlegend, chrom_data):
else: else:
text = "{}ms^{} {:.2f}@{:.1f}V; m/z = {:.1f}-{:.1f}".format( text = "{}ms^{} {:.2f}@{:.1f}V; m/z = {:.1f}-{:.1f}".format(
marks[int(wut[0])], *wut[1:]) marks[int(wut[0])], *wut[1:])
elif chrom_data['machtype'] == 57: elif chrom_data['machtype'] in (57, 63):
if int(wut[0]) == 1: if int(wut[1]) == 1:
text = "ms; m/z = {:.1f}-{:.1f}".format(*wut[1:]) text = "{}ms; m/z = {:.1f}-{:.1f}".format(
marks[int(wut[0])], *wut[2:])
else: else:
text = ("ms^{:.0f};"+"".join([" {:.2f}/{:.1f}@{:.1f}V" for _ in text = ("{}ms^{:.0f};" + "".join([" {:.2f}/{:.1f}@{:.1f}V" for
range(int(wut[0])-1)])+"; m/z = {:.1f}-{:.1f}").format( _ in range(int(wut[1])-1)]) +
*wut) "; m/z = {:.1f}-{:.1f}").format(
marks[int(wut[0])], *wut[1:])
else: else:
text = "unknown header type" text = "unknown header type"
return text return text
strdata = [translate(i) for i in np.unique(np.array(rawlegend), axis=0)] uniqindexs = np.unique(np.array(rawlegend), return_index=True)\
if np.array(rawlegend).dtype == np.dtype('O') else\
np.unique(np.array(rawlegend), axis=0, return_index=True)
strdata = [translate(i) for i in rawlegend[np.sort(uniqindexs[1])]]
strtext = " and\n".join(strdata) + "; t = {:.2f}-{:.2f} min".format( strtext = " and\n".join(strdata) + "; t = {:.2f}-{:.2f} min".format(
chrom_data['t_start'], chrom_data['t_end']) chrom_data['t_start'], chrom_data['t_end'])
return strtext return strtext
......
...@@ -5,7 +5,7 @@ with open("README.md", "r") as fh: ...@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setup( setup(
name="prasopes", name="prasopes",
version="0.0.13", version="0.0.14",
author="Jan Zelenka", author="Jan Zelenka",
author_email="3yanyanyan@gmail.com", author_email="3yanyanyan@gmail.com",
description="Thermo/Finnigan .raw file viewer based on rawprasslib", description="Thermo/Finnigan .raw file viewer based on rawprasslib",
...@@ -27,6 +27,8 @@ setup( ...@@ -27,6 +27,8 @@ setup(
'PyQt5-sip;platform_system=="Darwin"', 'PyQt5-sip;platform_system=="Darwin"',
'matplotlib>=3.0.0', 'matplotlib>=3.0.0',
'rawprasslib>=0.0.4'], 'rawprasslib>=0.0.4'],
extras_require={
'raw parameters readout': ['rawautoparams>=0.0.2']},
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'prasopes = prasopes.__main__:main' 'prasopes = prasopes.__main__:main'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment