openwraw 1.0.1__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.
@@ -0,0 +1,75 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.1] - 2026-05-17
9
+
10
+ ### Fixed
11
+
12
+ - `pyproject.toml`: add `[tool.maturin] include` directive so the sdist
13
+ contains `LICENSE`, `README.md`, and `CHANGELOG.md`; PyPI was rejecting
14
+ the 1.0.0 sdist because `PKG-INFO` declared `License-File: LICENSE` but
15
+ the file was absent from the tarball.
16
+
17
+ ### Changed
18
+
19
+ - README: standardize docs link format and section structure.
20
+ - Docs: replace prose `--` with `-` in three pages (`guide/reader.md`,
21
+ `format/03-func-idx.md`, `format/04-func-dat.md`).
22
+
23
+ ## [1.0.0] - 2026-05-17
24
+
25
+ First stable release. The public API of `openwraw` is now considered
26
+ stable and will follow semantic versioning. Format coverage is unchanged
27
+ from 0.1.0 (QTOF Ultima, SYNAPT G2-Si, Xevo G2-XS QTof).
28
+
29
+ ### Added
30
+
31
+ - `ATTRIBUTION.md`: tracks third-party notices for bundled data.
32
+ - `publish.yml` GitHub Actions workflow: publishes the `openwraw` crate
33
+ to crates.io and the Python wheel to PyPI via OIDC Trusted Publishing
34
+ on every `v*` tag push.
35
+ - `Cargo.lock` is now committed to the repository for reproducible builds.
36
+ - `[project.urls]` added to `pyproject.toml` (Homepage, Documentation,
37
+ Repository, Changelog).
38
+
39
+ ### Changed
40
+
41
+ - Removed `openwraw-cli` crate: the CLI added unnecessary complexity for
42
+ a library-focused project; the Python bindings (`openwraw-py`) cover
43
+ interactive exploration needs adequately.
44
+ - CI migrated from WarpBuild runners to standard GitHub-hosted
45
+ (`ubuntu-latest`, `macos-latest`, `windows-latest`).
46
+
47
+ ## [0.1.0] - 2026-05-16
48
+
49
+ ### Added
50
+
51
+ - Rust reader for the Waters MassLynx RAW directory format with
52
+ zero external dependencies in the core crate.
53
+ - Three spectrum encodings decoded and validated against PRIDE corpora:
54
+ - **Encoding A**: 6-byte records (QTOF Ultima class).
55
+ - **Encoding B**: 8-byte IMS cells (SYNAPT G2-Si with drift time).
56
+ - **Encoding C**: 8-byte sub-bin (Xevo G2-XS QTof).
57
+ - Two scan-index variants decoded:
58
+ - **Variant A**: 22-byte records.
59
+ - **Variant B**: 30-byte records (modern instruments).
60
+ - Parsers for ancillary files: `_HEADER.TXT`, `_extern.inf`,
61
+ `_FUNCTNS.INF`, `_FUNCnnn.IDX`, `_FUNCnnn.DAT`, `_CHROMS.INF`,
62
+ `_CHROnnnn.DAT`.
63
+ - `openwraw-py` PyO3 Python bindings (`RawReader`, `read_spectrum`,
64
+ `read_ims_spectrum`, `read_chrom`).
65
+ - 69 unit and integration tests covering the core crate.
66
+ - Format specification under `docs/format/` (11 numbered documents
67
+ covering each on-disk file).
68
+
69
+ ### Out of scope
70
+
71
+ - Function types beyond MS / MS/MS / chromatographic channels.
72
+
73
+ [1.0.1]: https://github.com/Sigilweaver/OpenWRaw/releases/tag/v1.0.1
74
+ [1.0.0]: https://github.com/Sigilweaver/OpenWRaw/releases/tag/v1.0.0
75
+ [0.1.0]: https://github.com/Sigilweaver/OpenWRaw/releases/tag/v0.1.0
@@ -0,0 +1,138 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "heck"
7
+ version = "0.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
10
+
11
+ [[package]]
12
+ name = "libc"
13
+ version = "0.2.186"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
16
+
17
+ [[package]]
18
+ name = "once_cell"
19
+ version = "1.21.4"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
22
+
23
+ [[package]]
24
+ name = "openwraw"
25
+ version = "1.0.1"
26
+
27
+ [[package]]
28
+ name = "openwraw-py"
29
+ version = "1.0.1"
30
+ dependencies = [
31
+ "openwraw",
32
+ "pyo3",
33
+ ]
34
+
35
+ [[package]]
36
+ name = "portable-atomic"
37
+ version = "1.13.1"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
40
+
41
+ [[package]]
42
+ name = "proc-macro2"
43
+ version = "1.0.106"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
46
+ dependencies = [
47
+ "unicode-ident",
48
+ ]
49
+
50
+ [[package]]
51
+ name = "pyo3"
52
+ version = "0.28.3"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+ checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
55
+ dependencies = [
56
+ "libc",
57
+ "once_cell",
58
+ "portable-atomic",
59
+ "pyo3-build-config",
60
+ "pyo3-ffi",
61
+ "pyo3-macros",
62
+ ]
63
+
64
+ [[package]]
65
+ name = "pyo3-build-config"
66
+ version = "0.28.3"
67
+ source = "registry+https://github.com/rust-lang/crates.io-index"
68
+ checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
69
+ dependencies = [
70
+ "target-lexicon",
71
+ ]
72
+
73
+ [[package]]
74
+ name = "pyo3-ffi"
75
+ version = "0.28.3"
76
+ source = "registry+https://github.com/rust-lang/crates.io-index"
77
+ checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
78
+ dependencies = [
79
+ "libc",
80
+ "pyo3-build-config",
81
+ ]
82
+
83
+ [[package]]
84
+ name = "pyo3-macros"
85
+ version = "0.28.3"
86
+ source = "registry+https://github.com/rust-lang/crates.io-index"
87
+ checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
88
+ dependencies = [
89
+ "proc-macro2",
90
+ "pyo3-macros-backend",
91
+ "quote",
92
+ "syn",
93
+ ]
94
+
95
+ [[package]]
96
+ name = "pyo3-macros-backend"
97
+ version = "0.28.3"
98
+ source = "registry+https://github.com/rust-lang/crates.io-index"
99
+ checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
100
+ dependencies = [
101
+ "heck",
102
+ "proc-macro2",
103
+ "pyo3-build-config",
104
+ "quote",
105
+ "syn",
106
+ ]
107
+
108
+ [[package]]
109
+ name = "quote"
110
+ version = "1.0.45"
111
+ source = "registry+https://github.com/rust-lang/crates.io-index"
112
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
113
+ dependencies = [
114
+ "proc-macro2",
115
+ ]
116
+
117
+ [[package]]
118
+ name = "syn"
119
+ version = "2.0.117"
120
+ source = "registry+https://github.com/rust-lang/crates.io-index"
121
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
122
+ dependencies = [
123
+ "proc-macro2",
124
+ "quote",
125
+ "unicode-ident",
126
+ ]
127
+
128
+ [[package]]
129
+ name = "target-lexicon"
130
+ version = "0.13.5"
131
+ source = "registry+https://github.com/rust-lang/crates.io-index"
132
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
133
+
134
+ [[package]]
135
+ name = "unicode-ident"
136
+ version = "1.0.24"
137
+ source = "registry+https://github.com/rust-lang/crates.io-index"
138
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
@@ -0,0 +1,21 @@
1
+ [workspace]
2
+ resolver = "2"
3
+ members = ["crates/openwraw", "crates/openwraw-py"]
4
+
5
+ [workspace.package]
6
+ version = "1.0.1"
7
+ edition = "2021"
8
+ rust-version = "1.75"
9
+ authors = ["Nathan Riley <git@nathanriley.com>"]
10
+ license = "Apache-2.0"
11
+ repository = "https://github.com/Sigilweaver/OpenWRaw"
12
+ homepage = "https://github.com/Sigilweaver/OpenWRaw"
13
+ keywords = ["mass-spectrometry", "waters", "masslynx", "raw", "proteomics"]
14
+ categories = ["parser-implementations", "science"]
15
+
16
+ [workspace.dependencies]
17
+ openwraw = { path = "crates/openwraw" }
18
+ pyo3 = { version = "0.28.3", features = ["extension-module"] }
19
+
20
+ [workspace.lints.rust]
21
+ unsafe_code = "forbid"
openwraw-1.0.1/LICENSE ADDED
@@ -0,0 +1,192 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submitted" means any form of electronic, verbal,
51
+ or written communication sent to the Licensor or its representatives,
52
+ including but not limited to communication on electronic mailing lists,
53
+ source code control systems, and issue tracking systems that are managed
54
+ by, or on behalf of, the Licensor for the purpose of developing the Work,
55
+ but excluding communication that is conspicuously marked or designated
56
+ in writing by the copyright owner as "Not a Contribution."
57
+
58
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
59
+ whom a Contribution has been received by the Licensor and included
60
+ within the Work.
61
+
62
+ 2. Grant of Copyright License. Subject to the terms and conditions of
63
+ this License, each Contributor hereby grants to You a perpetual,
64
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
65
+ copyright license to reproduce, prepare Derivative Works of,
66
+ publicly display, publicly perform, sublicense, and distribute the
67
+ Work and such Derivative Works in Source or Object form.
68
+
69
+ 3. Grant of Patent License. Subject to the terms and conditions of
70
+ this License, each Contributor hereby grants to You a perpetual,
71
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
72
+ (except as stated in this section) patent license to make, have made,
73
+ use, offer to sell, sell, import, and otherwise transfer the Work,
74
+ where such license applies only to those patent claims licensable
75
+ by such Contributor that are necessarily infringed by their
76
+ Contribution(s) alone or by the combination of their Contribution(s)
77
+ with the Work to which such Contribution(s) was submitted. If You
78
+ institute patent litigation against any entity (including a cross-claim
79
+ or counterclaim in a lawsuit) alleging that the Work or any
80
+ Contribution embodied within the Work constitutes direct or contributory
81
+ patent infringement, then any patent licenses granted to You under
82
+ this License for that Work shall terminate as of the date such
83
+ litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the
86
+ Work or Derivative Works thereof in any medium, with or without
87
+ modifications, and in Source or Object form, provided that You
88
+ meet the following conditions:
89
+
90
+ (a) You must give any other recipients of the Work or Derivative
91
+ Works a copy of this License; and
92
+
93
+ (b) You must cause any modified files to carry prominent notices
94
+ stating that You changed the files; and
95
+
96
+ (c) You must retain, in the Source form of any Derivative Works
97
+ that You distribute, all copyright, patent, trademark, and
98
+ attribution notices from the Source form of the Work,
99
+ excluding those notices that do not pertain to any part of
100
+ the Derivative Works; and
101
+
102
+ (d) If the Work includes a "NOTICE" text file as part of its
103
+ distribution, You must include a readable copy of the
104
+ attribution notices contained within such NOTICE file, in
105
+ at least one of the following places: within a NOTICE text
106
+ file distributed as part of the Derivative Works; within
107
+ the Source form or documentation, if provided along with the
108
+ Derivative Works; or, within a display generated by the
109
+ Derivative Works, if and wherever such third-party notices
110
+ normally appear. The contents of the NOTICE file are for
111
+ informational purposes only and do not modify the License.
112
+ You may add Your own attribution notices within Derivative
113
+ Works that You distribute, alongside or as an addendum to
114
+ the NOTICE text from the Work, provided that such additional
115
+ attribution notices cannot be construed as modifying the License.
116
+
117
+ You may add Your own license statement for Your modifications and
118
+ may provide additional grant of rights to use, copy, modify, merge,
119
+ publish, distribute, sublicense, and/or sell copies of the
120
+ Contribution.
121
+
122
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
123
+ any Contribution intentionally submitted for inclusion in the Work
124
+ by You to the Licensor shall be under the terms and conditions of
125
+ this License, without any additional terms or conditions.
126
+ Notwithstanding the above, nothing herein shall supersede or modify
127
+ the terms of any separate license agreement you may have executed
128
+ with Licensor regarding such Contributions.
129
+
130
+ 6. Trademarks. This License does not grant permission to use the trade
131
+ names, trademarks, service marks, or product names of the Licensor,
132
+ except as required for reasonable and customary use in describing the
133
+ origin of the Work and reproducing the content of the NOTICE file.
134
+
135
+ 7. Disclaimer of Warranty. Unless required by applicable law or
136
+ agreed to in writing, Licensor provides the Work (and each
137
+ Contributor provides its Contributions) on an "AS IS" BASIS,
138
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
139
+ implied, including, without limitation, any conditions of TITLE,
140
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
141
+ PURPOSE. You are solely responsible for determining the
142
+ appropriateness of using or reproducing the Work and assume any
143
+ risks associated with Your exercise of permissions under this License.
144
+
145
+ 8. Limitation of Liability. In no event and under no legal theory,
146
+ whether in tort (including negligence), contract, or otherwise,
147
+ unless required by applicable law (such as deliberate and grossly
148
+ negligent acts) or agreed to in writing, shall any Contributor be
149
+ liable to You for damages, including any direct, indirect, special,
150
+ incidental, or exemplary damages of any character arising as a
151
+ result of this License or out of the use or inability to use the
152
+ Work (including but not limited to damages for loss of goodwill,
153
+ work stoppage, computer failure or malfunction, or all other
154
+ commercial damages or losses), even if such Contributor has been
155
+ advised of the possibility of such damages.
156
+
157
+ 9. Accepting Warranty or Additional Liability. While redistributing
158
+ the Work or Derivative Works thereof, You may choose to offer,
159
+ and charge a fee for, acceptance of support, warranty, indemnity,
160
+ or other liability obligations and/or rights consistent with this
161
+ License. However, in accepting such obligations, You may offer only
162
+ conditions that are completely consistent with the terms of this License
163
+ and that require the appropriate indemnification and explanation to
164
+ any recipient of the Work or Derivative Works, so that it would be
165
+ possible for any such recipient to understand what obligations they are
166
+ assuming.
167
+
168
+ END OF TERMS AND CONDITIONS
169
+
170
+ APPENDIX: How to apply the Apache License to your work.
171
+
172
+ To apply the Apache License to your work, attach the following
173
+ boilerplate notice, with the fields enclosed by brackets "[]"
174
+ replaced with your own identifying information. (Don't include
175
+ the brackets!) The text should be enclosed in the appropriate
176
+ comment syntax for the syntax format used in the source file.
177
+ You may also attach a machine-readable copy of the License
178
+ to your work if your desired:
179
+
180
+ Copyright 2026 Sigilweaver Holdings LLC
181
+
182
+ Licensed under the Apache License, Version 2.0 (the "License");
183
+ you may not use this file except in compliance with the License.
184
+ You may obtain a copy of the License at
185
+
186
+ http://www.apache.org/licenses/LICENSE-2.0
187
+
188
+ Unless required by applicable law or agreed to in writing, software
189
+ distributed under the License is distributed on an "AS IS" BASIS,
190
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
191
+ See the License for the specific language governing permissions and
192
+ limitations under the License.
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: openwraw
3
+ Version: 1.0.1
4
+ Classifier: License :: OSI Approved :: Apache Software License
5
+ Classifier: Programming Language :: Rust
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
8
+ License-File: LICENSE
9
+ Summary: Python bindings for the OpenWRaw Waters MassLynx RAW file parser
10
+ Home-Page: https://github.com/Sigilweaver/OpenWRaw
11
+ Author-email: Nathan Riley <git@nathanriley.com>
12
+ License: Apache-2.0
13
+ Requires-Python: >=3.8
14
+ Project-URL: Changelog, https://github.com/Sigilweaver/OpenWRaw/blob/main/CHANGELOG.md
15
+ Project-URL: Documentation, https://sigilweaver.app/openwraw/docs/
16
+ Project-URL: Homepage, https://sigilweaver.app/openwraw/
17
+ Project-URL: Issues, https://github.com/Sigilweaver/OpenWRaw/issues
18
+ Project-URL: Source, https://github.com/Sigilweaver/OpenWRaw
@@ -0,0 +1,71 @@
1
+ # OpenWRaw
2
+
3
+ [![CI](https://github.com/Sigilweaver/OpenWRaw/actions/workflows/ci.yml/badge.svg)](https://github.com/Sigilweaver/OpenWRaw/actions/workflows/ci.yml)
4
+ [![crates.io](https://img.shields.io/crates/v/openwraw.svg)](https://crates.io/crates/openwraw)
5
+ [![PyPI](https://img.shields.io/pypi/v/openwraw.svg)](https://pypi.org/project/openwraw/)
6
+ [![docs.rs](https://docs.rs/openwraw/badge.svg)](https://docs.rs/openwraw)
7
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
8
+
9
+ Rust and Python reader for the Waters MassLynx RAW mass spectrometry
10
+ data format. Cross-platform (Linux, macOS, Windows), with no native or
11
+ system dependencies.
12
+
13
+ Full documentation: [sigilweaver.app/openwraw/docs](https://sigilweaver.app/openwraw/docs)
14
+
15
+ ## Install
16
+
17
+ Rust:
18
+
19
+ ```sh
20
+ cargo add openwraw
21
+ ```
22
+
23
+ Python:
24
+
25
+ ```sh
26
+ pip install openwraw
27
+ ```
28
+
29
+ ## Quickstart
30
+
31
+ Rust:
32
+
33
+ ```rust
34
+ use openwraw::RawReader;
35
+
36
+ let r = RawReader::open("sample.raw")?;
37
+ for f in r.functions() {
38
+ println!("function {}: {} scans", f.index, f.scan_count);
39
+ }
40
+ ```
41
+
42
+ Python:
43
+
44
+ ```python
45
+ import openwraw
46
+
47
+ r = openwraw.RawReader("sample.raw")
48
+ spec = r.read_spectrum(1, 0)
49
+ print(spec.mz[:5], spec.intensity[:5])
50
+ ```
51
+
52
+ See the [docs site](https://sigilweaver.app/openwraw/docs) for the full
53
+ quickstart, guide, and format specification.
54
+
55
+ ## Repository layout
56
+
57
+ ```
58
+ crates/
59
+ openwraw/ Core Rust library (69 tests)
60
+ openwraw-py/ PyO3 / maturin Python bindings
61
+ docs/ Docusaurus site (format spec + guides)
62
+ ```
63
+
64
+ ## License
65
+
66
+ Apache-2.0 - see [LICENSE](LICENSE).
67
+
68
+ Copyright 2026 Sigilweaver Holdings LLC.
69
+
70
+ The format specification was developed by binary analysis of public
71
+ mass-spectrometry datasets (PRIDE accessions).
@@ -0,0 +1 @@
1
+ /target
@@ -0,0 +1,20 @@
1
+ [package]
2
+ name = "openwraw"
3
+ description = "Rust reader for Waters MassLynx RAW mass spectrometry directories."
4
+ version.workspace = true
5
+ edition.workspace = true
6
+ rust-version.workspace = true
7
+ authors.workspace = true
8
+ license.workspace = true
9
+ repository.workspace = true
10
+ homepage.workspace = true
11
+ keywords.workspace = true
12
+ categories.workspace = true
13
+ readme = "README.md"
14
+
15
+ [lints]
16
+ workspace = true
17
+
18
+ [dependencies]
19
+
20
+ [dev-dependencies]
@@ -0,0 +1,71 @@
1
+ # OpenWRaw
2
+
3
+ [![CI](https://github.com/Sigilweaver/OpenWRaw/actions/workflows/ci.yml/badge.svg)](https://github.com/Sigilweaver/OpenWRaw/actions/workflows/ci.yml)
4
+ [![crates.io](https://img.shields.io/crates/v/openwraw.svg)](https://crates.io/crates/openwraw)
5
+ [![PyPI](https://img.shields.io/pypi/v/openwraw.svg)](https://pypi.org/project/openwraw/)
6
+ [![docs.rs](https://docs.rs/openwraw/badge.svg)](https://docs.rs/openwraw)
7
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
8
+
9
+ Rust and Python reader for the Waters MassLynx RAW mass spectrometry
10
+ data format. Cross-platform (Linux, macOS, Windows), with no native or
11
+ system dependencies.
12
+
13
+ Full documentation: [sigilweaver.app/openwraw/docs](https://sigilweaver.app/openwraw/docs)
14
+
15
+ ## Install
16
+
17
+ Rust:
18
+
19
+ ```sh
20
+ cargo add openwraw
21
+ ```
22
+
23
+ Python:
24
+
25
+ ```sh
26
+ pip install openwraw
27
+ ```
28
+
29
+ ## Quickstart
30
+
31
+ Rust:
32
+
33
+ ```rust
34
+ use openwraw::RawReader;
35
+
36
+ let r = RawReader::open("sample.raw")?;
37
+ for f in r.functions() {
38
+ println!("function {}: {} scans", f.index, f.scan_count);
39
+ }
40
+ ```
41
+
42
+ Python:
43
+
44
+ ```python
45
+ import openwraw
46
+
47
+ r = openwraw.RawReader("sample.raw")
48
+ spec = r.read_spectrum(1, 0)
49
+ print(spec.mz[:5], spec.intensity[:5])
50
+ ```
51
+
52
+ See the [docs site](https://sigilweaver.app/openwraw/docs) for the full
53
+ quickstart, guide, and format specification.
54
+
55
+ ## Repository layout
56
+
57
+ ```
58
+ crates/
59
+ openwraw/ Core Rust library (69 tests)
60
+ openwraw-py/ PyO3 / maturin Python bindings
61
+ docs/ Docusaurus site (format spec + guides)
62
+ ```
63
+
64
+ ## License
65
+
66
+ Apache-2.0 - see [LICENSE](LICENSE).
67
+
68
+ Copyright 2026 Sigilweaver Holdings LLC.
69
+
70
+ The format specification was developed by binary analysis of public
71
+ mass-spectrometry datasets (PRIDE accessions).
@@ -0,0 +1,33 @@
1
+ pub mod raw;
2
+
3
+ #[derive(Debug)]
4
+ pub enum Error {
5
+ Io(std::io::Error),
6
+ Parse(String),
7
+ }
8
+
9
+ impl std::fmt::Display for Error {
10
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11
+ match self {
12
+ Error::Io(e) => write!(f, "I/O error: {e}"),
13
+ Error::Parse(msg) => write!(f, "parse error: {msg}"),
14
+ }
15
+ }
16
+ }
17
+
18
+ impl std::error::Error for Error {
19
+ fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
20
+ match self {
21
+ Error::Io(e) => Some(e),
22
+ Error::Parse(_) => None,
23
+ }
24
+ }
25
+ }
26
+
27
+ impl From<std::io::Error> for Error {
28
+ fn from(e: std::io::Error) -> Self {
29
+ Error::Io(e)
30
+ }
31
+ }
32
+
33
+ pub type Result<T> = std::result::Result<T, Error>;