https://github.com/cheminfo/sdf-parser
Parse a SDF file and convert it to an array of objects
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Parse a SDF file and convert it to an array of objects
Basic Info
- Host: GitHub
- Owner: cheminfo
- License: mit
- Language: JavaScript
- Default Branch: main
- Homepage: http://cheminfo.github.io/sdf-parser/
- Size: 1.51 MB
Statistics
- Stars: 11
- Watchers: 8
- Forks: 7
- Open Issues: 1
- Releases: 23
Topics
Metadata Files
README.md
sdf-parser
Allow to parse a SDF file and convert it to an array of objects.
Use of the package
bash
npm install sdf-parser
In node script:
```js // allows to parse a file test.sdf that would be present in the same directory
var { parse } = require('sdf-parser');
var fs = require('fs'); var sdf = fs.readFileSync('./test.sdf', 'utf-8');
var result = parse(sdf); console.log(result); ```
require('sdf-parser') (sdf, options)
options:
- exclude : array of string containing the fields to discard
- include : array of string containing the fields to keep
- modifiers : object of functions that need to be converted during the parsing
- filter : function that allows to filter the result
- mixedEOL : if set to true will try to deal with mixed End Of Line separator
- dynamicTyping : convert fields containing only number to numbers (default: true)
Advanced example with filtering and modifiers
js
var result = parse(sdf, {
exclude: ['Number of H-Donors'],
include: ['Number of H-Donors', 'CLogP', 'Code'],
modifiers: {
CLogP: function (field) {
return {
low: field * 1 - 0.2,
high: field * 1 + 0.2,
};
},
},
filter: (entry) => {
return entry.CLogP && entry.CLogP.low > 4;
},
});
Iterator
```js const { iterator } = require('sdf-parser'); const file = await openAsBlob(join(__dirname, 'test.sdf.gz'));
const decompressionStream = new DecompressionStream('gzip'); const textDecoder = new TextDecoderStream();
const stream = file .stream() .pipeThrough(decompressionStream) .pipeThrough(textDecoder); const results = [];
for await (const entry of iterator(stream)) { results.push(entry); } ```
License
Owner
- Name: Cheminfo
- Login: cheminfo
- Kind: organization
- Website: https://www.cheminfo.org/
- Repositories: 242
- Profile: https://github.com/cheminfo
GitHub Events
Total
- Create event: 13
- Release event: 4
- Issues event: 3
- Delete event: 7
- Issue comment event: 10
- Push event: 30
- Pull request event: 15
Last Year
- Create event: 13
- Release event: 4
- Issues event: 3
- Delete event: 7
- Issue comment event: 10
- Push event: 30
- Pull request event: 15
Committers
Last synced: about 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Luc Patiny | l****c@p****m | 44 |
| Michaël Zasso | t****s@p****m | 21 |
| cheminfo bot | a****n@c****g | 13 |
| Luc Patiny | l****y@u****m | 8 |
| Michaël Zasso | m****e@g****m | 7 |
| cheminfo-bot | 1****t@u****m | 4 |
| Vasiliy | 9****o@u****m | 1 |
| Daniel Kostro | k****d@g****m | 1 |
| ivan-zatravkin-quantori | 7****i@u****m | 1 |
| lpatiny | g****3 | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 6
- Total pull requests: 24
- Average time to close issues: 23 days
- Average time to close pull requests: 10 days
- Total issue authors: 5
- Total pull request authors: 4
- Average comments per issue: 1.33
- Average comments per pull request: 0.67
- Merged pull requests: 22
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 14
- Average time to close issues: about 2 months
- Average time to close pull requests: 17 days
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 0.67
- Average comments per pull request: 0.79
- Merged pull requests: 14
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- alakifan (1)
- oleg-orlov-quantori (1)
- targos (1)
- MichelML (1)
- lpatiny (1)
Pull Request Authors
- cheminfo-bot (15)
- lpatiny (7)
- vasiliy-butenko (1)
- ivan-zatravkin-quantori (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- npm 7,730 last-month
-
Total dependent packages: 8
(may contain duplicates) -
Total dependent repositories: 25
(may contain duplicates) - Total versions: 46
- Total maintainers: 4
npmjs.org: sdf-parser
SDF parser
- Homepage: https://github.com/cheminfo/sdf-parser
- License: MIT
-
Latest release: 7.0.4
published over 1 year ago
Rankings
Maintainers (4)
bower.io: sdf-parser
- License: mit
-
Latest release: v7.0.4
published over 1 year ago
Rankings
Dependencies
- @babel/plugin-transform-modules-commonjs ^7.16.8 development
- babel-eslint ^10.1.0 development
- callback-stream ^1.1.0 development
- cheminfo-build ^1.1.11 development
- eslint ^8.10.0 development
- eslint-config-cheminfo ^7.3.0 development
- jest ^27.5.1 development
- openchemlib ^7.4.3 development
- prettier ^2.5.1 development
- ensure-string ^1.1.0
- pumpify ^2.0.1
- split2 ^4.1.0
- through2 ^4.0.2
- through2-filter ^3.0.0
- JamesIves/github-pages-deploy-action releases/v4 composite
- actions/checkout v2 composite
- zakodium/documentationjs-action v1 composite
- actions/checkout v2 composite
- actions/setup-node v2 composite
- zakodium/lactame-action v1 composite