npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

emdb

v3.2.0

Published

Database manager for exact mass query

Downloads

2,484

Readme

emdb

NPM version npm download

Database manager for molecular formula with various query feature.

Installation

npm install --save emdb

Using the project

There are 2 parts:

  • adding databases in the database manager
  • checking the databases
  • searching the databases

Adding database in the database manager

const emdb = require('emdb');

emdb.loadTest(); // add a database named test containing all the molecular formula from C1 to C100

loadTest

A method that allows to create a database named 'test' and that contains all the molecular formula from C1 to C100

loadKnapSack

loadCommercials

loadContaminants

fromMonoisotopicMass(em, options)

fromArray

A method that creates a database (by default named generated) that contains all the posible combination based on an array of strings.

  emdb.fromArray( ['C1-10','N1-10']);

This method use the project 'mf-generator'

The following fields in the json are expected to be returned

  • id
  • url: optional external link
  • mf
  • em
  • mw
  • msem: calculated from em and charge
  • charge
  • ocl: either a string or an object with value / coordinates
  • comment: if in the molecular formula there is a '$' this will end-up in this field
  • parts: array of mf if the mf is the result of a combination of mf
  • info: object of free information
  • filter: optional information about the kind of mass spectra that yields to this mass
    • ESI
    • MALDI
    • positive
    • negative

loadGoogleSheet

Static methods

EMDB.Util.MF

Example:

var mf = new EMDB.Util.MF('Et3N');

EMDB.Util.IsotopicDistribution

EMDB.Util.Peptide

EMDB.Util.Peptide.sequenceToMF

Generates a molecular formula from a peptidic sequence.

Example:

const Peptide = require('emdb').Util.Peptide;
let mf = Peptide.mfFromSequence('AAA');
// mf = HAlaAlaAlaOH

EMDB.Util.Nucleotide

EMDB.Util.Nucleotide.sequenceToMF

Generates a molecular formula from a nucleotide sequence. Will correctly deal with dna, rna and ds-dna.

By default if the sequence contains a 'U' it is rna otherwise it is ds-dna. You can force the type by using the option kind. A nucleotide sequence may also be either circular or non circular (default value).

Example:

const Nucleotide = require('emdb').Util.Nucleotide;
let mf = Nucleotide.mfFromSequence('AAA', {circular: false, kind: 'dna'});
// mf = HODampDampDampH

License

MIT