rainbow-api 1.0.7__tar.gz → 1.0.9__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.
- {rainbow_api-1.0.7/rainbow_api.egg-info → rainbow_api-1.0.9}/PKG-INFO +2 -1
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/pyproject.toml +3 -2
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow/agilent/chemstation.py +1 -1
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow/waters/masslynx.py +25 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9/rainbow_api.egg-info}/PKG-INFO +2 -1
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow_api.egg-info/requires.txt +1 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/COPYING +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/README.md +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow/__init__.py +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow/agilent/__init__.py +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow/agilent/masshunter.py +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow/datadirectory.py +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow/datafile.py +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow/waters/__init__.py +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow_api.egg-info/SOURCES.txt +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow_api.egg-info/dependency_links.txt +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/rainbow_api.egg-info/top_level.txt +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/setup.cfg +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/tests/test_agilent.py +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/tests/test_datadirectory.py +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/tests/test_datafile.py +0 -0
- {rainbow_api-1.0.7 → rainbow_api-1.0.9}/tests/test_waters.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rainbow-api
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.9
|
|
4
4
|
Summary: Read chromatography and mass spectrometry binary files
|
|
5
5
|
Author: Evan Shi and Eugene Kwan
|
|
6
6
|
Author-email: evanyshi@cmu.edu
|
|
@@ -13,6 +13,7 @@ License-File: COPYING
|
|
|
13
13
|
Requires-Dist: numpy
|
|
14
14
|
Requires-Dist: matplotlib
|
|
15
15
|
Requires-Dist: lxml
|
|
16
|
+
Requires-Dist: pandas
|
|
16
17
|
|
|
17
18
|
# rainbow
|
|
18
19
|
[](https://pypi.org/project/rainbow-api)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "rainbow-api"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.9"
|
|
8
8
|
description = "Read chromatography and mass spectrometry binary files"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "COPYING"}
|
|
@@ -18,7 +18,8 @@ classifiers = [
|
|
|
18
18
|
dependencies = [
|
|
19
19
|
"numpy",
|
|
20
20
|
"matplotlib",
|
|
21
|
-
"lxml"
|
|
21
|
+
"lxml",
|
|
22
|
+
"pandas"
|
|
22
23
|
]
|
|
23
24
|
|
|
24
25
|
[project.urls]
|
|
@@ -605,7 +605,7 @@ def parse_ms(path, prec=0):
|
|
|
605
605
|
num_times = int_unpack(f.read(4))[0]
|
|
606
606
|
else:
|
|
607
607
|
f.seek(data_offsets['gc_num_times'])
|
|
608
|
-
num_times = struct.unpack('<
|
|
608
|
+
num_times = struct.unpack('<H', f.read(2))[0]
|
|
609
609
|
|
|
610
610
|
# Go to the data start offset.
|
|
611
611
|
f.seek(data_offsets['data_start'])
|
|
@@ -6,6 +6,7 @@ import os
|
|
|
6
6
|
import re
|
|
7
7
|
import numpy as np
|
|
8
8
|
from rainbow.datafile import DataFile
|
|
9
|
+
import pandas as pd
|
|
9
10
|
|
|
10
11
|
"""
|
|
11
12
|
SPECTRUM PARSING METHODS
|
|
@@ -664,3 +665,27 @@ def parse_metadata(path):
|
|
|
664
665
|
if not value.isspace():
|
|
665
666
|
metadata['vialpos'] = value
|
|
666
667
|
return metadata
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
def parse_compound_names(path):
|
|
672
|
+
with open(os.path.join(path, "_FUNC001.CMP"), "rb") as f:
|
|
673
|
+
data = f.read().decode("ascii", "ignore")
|
|
674
|
+
data = data[7:]
|
|
675
|
+
data = data.split("\x00")
|
|
676
|
+
data = list(filter(lambda x: x != "", data))
|
|
677
|
+
# loop through the da{}ta and remove the byte sequences x18
|
|
678
|
+
data = [re.sub(r'\x18', '', x) for x in data]
|
|
679
|
+
data
|
|
680
|
+
|
|
681
|
+
compounds = []
|
|
682
|
+
transition = []
|
|
683
|
+
for i in range(0, len(data), 3):
|
|
684
|
+
compounds.append(data[i])
|
|
685
|
+
transition.append(data[i+1])
|
|
686
|
+
df = pd.DataFrame({"compounds": compounds, "transition": transition})
|
|
687
|
+
|
|
688
|
+
df["index"] = [i for i in range(1, len(transition)+1)]
|
|
689
|
+
df["measurments"] = df["compounds"] + df["index"].astype(str)
|
|
690
|
+
|
|
691
|
+
return df
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rainbow-api
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.9
|
|
4
4
|
Summary: Read chromatography and mass spectrometry binary files
|
|
5
5
|
Author: Evan Shi and Eugene Kwan
|
|
6
6
|
Author-email: evanyshi@cmu.edu
|
|
@@ -13,6 +13,7 @@ License-File: COPYING
|
|
|
13
13
|
Requires-Dist: numpy
|
|
14
14
|
Requires-Dist: matplotlib
|
|
15
15
|
Requires-Dist: lxml
|
|
16
|
+
Requires-Dist: pandas
|
|
16
17
|
|
|
17
18
|
# rainbow
|
|
18
19
|
[](https://pypi.org/project/rainbow-api)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|