https://github.com/cheminfo/sdf-parser

Parse a SDF file and convert it to an array of objects

https://github.com/cheminfo/sdf-parser

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

hacktoberfest

Keywords from Contributors

nmr nmr-spectroscopy bruker jcamp jcamp-dx jeol nmr-parser data-format unidata
Last synced: 10 months ago · JSON representation

Repository

Parse a SDF file and convert it to an array of objects

Basic Info
Statistics
  • Stars: 11
  • Watchers: 8
  • Forks: 7
  • Open Issues: 1
  • Releases: 23
Topics
hacktoberfest
Created over 11 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

sdf-parser

NPM version build status Test coverage npm download

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

MIT

Owner

  • Name: Cheminfo
  • Login: cheminfo
  • Kind: organization

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

All Time
  • Total Commits: 101
  • Total Committers: 10
  • Avg Commits per committer: 10.1
  • Development Distribution Score (DDS): 0.564
Past Year
  • Commits: 14
  • Committers: 3
  • Avg Commits per committer: 4.667
  • Development Distribution Score (DDS): 0.286
Top Committers
Name Email 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
autorelease: tagged (9) autorelease: pending (5)

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

  • Versions: 19
  • Dependent Packages: 8
  • Dependent Repositories: 25
  • Downloads: 7,730 Last month
Rankings
Downloads: 1.8%
Dependent packages count: 2.5%
Dependent repos count: 2.5%
Average: 4.7%
Forks count: 7.4%
Stargazers count: 9.5%
Last synced: 11 months ago
bower.io: sdf-parser
  • License: mit
  • Latest release: v7.0.4
    published over 1 year ago
  • Versions: 27
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.1%
Forks count: 16.4%
Average: 20.1%
Stargazers count: 21.3%
Dependent repos count: 37.5%
Last synced: 11 months ago

Dependencies

package.json npm
  • @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
.github/workflows/documentationjs.yml actions
  • JamesIves/github-pages-deploy-action releases/v4 composite
  • actions/checkout v2 composite
  • zakodium/documentationjs-action v1 composite
.github/workflows/lactame.yml actions
  • actions/checkout v2 composite
  • actions/setup-node v2 composite
  • zakodium/lactame-action v1 composite
.github/workflows/nodejs.yml actions
.github/workflows/release.yml actions