{"id":22009489,"url":"https://github.com/cheminfo/nmr-parser","last_synced_at":"2025-06-19T09:37:12.077Z","repository":{"id":37460660,"uuid":"261835388","full_name":"cheminfo/nmr-parser","owner":"cheminfo","description":"read and convert any NMR file ","archived":false,"fork":false,"pushed_at":"2022-10-21T15:32:01.000Z","size":1610,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-09-25T05:09:55.683Z","etag":null,"topics":["bruker","jcamp","jcamp-dx","jeol","nmr","nmr-parser","nmr-spectroscopy","parser"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cheminfo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-06T17:43:15.000Z","updated_at":"2023-12-27T00:59:34.000Z","dependencies_parsed_at":"2023-01-19T12:30:24.761Z","dependency_job_id":null,"html_url":"https://github.com/cheminfo/nmr-parser","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheminfo%2Fnmr-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheminfo%2Fnmr-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheminfo%2Fnmr-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheminfo%2Fnmr-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheminfo","download_url":"https://codeload.github.com/cheminfo/nmr-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227254105,"owners_count":17754198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bruker","jcamp","jcamp-dx","jeol","nmr","nmr-parser","nmr-spectroscopy","parser"],"created_at":"2024-11-30T02:09:34.394Z","updated_at":"2024-11-30T02:09:34.944Z","avatar_url":"https://github.com/cheminfo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nmr-parser\n\n[![NPM version][npm-image]][npm-url]\n[![build status][ci-image]][ci-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n\nThis package has born from the necessity to find a common data structure for NMR spectra (1D and 2D) originally stored in different formats as an entry point for processing pipelines. Reading and parsing data in original format represents an important work load for open source projects that usually seek to propose improved data analysis pipelines. This package aims at reading any NMR format and create a JSON object that is human readable, with a scientifically meaningful structure and variable names, strongly inspired by the [work](https://doi.org/10.1371/journal.pone.0225953) by Grandinetti and coworkers, but with a few liberties. For instance, _camelCase_ variable naming has been preferred over the one proposed in the original work.\n\n### supported input formats\n\n- JCAMP-DX (may include several spectra)\n- Bruker data folder (as a zip file)\n- JEOL data format (.jdf)\n\n### data formats under development\n\n- [nmredata](http://nmredata.org/)\n\n### What this package isn't?\n\n- This package is not promoting a new format\n- This package is not a JavaScript implementation of [CSDM](https://doi.org/10.1371/journal.pone.0225953)\n- This data structure in not intended for storage\n- This package is not intended to be a converter between formats\n\n## Installation\n\n`$ npm i nmr-parser`\n\n## Usage\n\n### JCAMP\n\n```js\n// import JCAMP parser\nimport { fromJCAMP } from 'nmr-parser';\n\n// import test data\nimport { getData: getJcampData } from 'jcamp-data-test';\n\nlet data = fromJCAMP(await getJcampData('aspirin-1h.fid.dx'));\n```\n\n### Bruker\n\n```js\n// import Bruker parser\nimport { fromBruker } from 'nmr-parser';\nimport { fileCollectionFromPath, fileCollectionFromZip } from 'filelist-utils';\n\n// import bruker data\nimport { getData: getBrukerData } from 'bruker-data-test';\nconst PATH_TO_BRUKER_FOLDER = './'\nconst fileCollection = fileCollectionFromPath(PATH_TO_BRUKER_FOLDER);\nlet data = await fromBruker(fileCollection);\n\n//or\n\nconst zipBuffer = await getBrukerData('aspirin-1h.zip');\nconst fileCollection2 = await fileCollectionFromZip(zipBuffer);\nlet data2 = await fromBruker(fileCollection2);\n```\n\n### JEOL\n\n```js\n// import JEOL parser\nimport { fromJEOL } from 'nmr-parser';\n\n// import test data\nimport { experiments } from 'jeol-data-test';\n\nlet data = fromJEOL(\n  experiments['Rutin_3080ug200uL_DMSOd6_qHNMR_400MHz_Jeol.jdf'],\n);\n// result is a JSON object\n// {\n//         timeStamp: 1593098292162,\n//         version: '1.0.0'\n//         description: {\n//           title: 'title: Rutin_RUTI01_3080u200u / comment: qHNMR Spinning GARP Gated 13C Decoupled 20p 9pCntr 32K 90deg aq+d1=60s NS=128 / author:gfp / site: UIC ECZ400',\n//           nucleus: [ '1H' ],\n//           sampleName: 'Rutin_RUTI01_308',\n//           date: '{\"year\":2016,\"month\":12,\"day\":21}',\n// ...\n//           spectralWidth: 25.05370594702938,\n//           metadata: {...\n```\n\n## [API Documentation](https://cheminfo.github.io/nmr-parser/)\n\n## License\n\n[MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/nmr-parser.svg\n[npm-url]: https://www.npmjs.com/package/nmr-parser\n[ci-image]: https://github.com/cheminfo/nmr-parser/workflows/Node.js%20CI/badge.svg?branch=main\n[ci-url]: https://github.com/cheminfo/nmr-parser/actions?query=workflow%3A%22Node.js+CI%22\n[codecov-image]: https://img.shields.io/codecov/c/github/cheminfo/nmr-parser.svg\n[codecov-url]: https://codecov.io/gh/cheminfo/nmr-parser\n[download-image]: https://img.shields.io/npm/dm/nmr-parser.svg\n[download-url]: https://www.npmjs.com/package/nmr-parser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheminfo%2Fnmr-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheminfo%2Fnmr-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheminfo%2Fnmr-parser/lists"}