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

pdbmine

v1.2.3

Published

A Node.js API for the RCSB Protein Data Bank (PDB)

Downloads

14

Readme

pdbmine

A Node.js API for the RCSB Protein Data Bank (PDB)

Installation

npm install pdbmine

If you plan on using pdbmine in your research/project please cite us at https://arxiv.org/abs/1904.03801

Usage

Just require the package.

var miner = require('pdbmine');

You can query the PDB with a string, and a callback function. The result will be an array of PDB ID strings.

miner.query('ribozyme', function(result){
  console.log(result);
});

You can also just get a list of all the PDB IDs:

miner.get_all_ids(function(result){
  console.log(result);
});

You can download a pdb or cif format file of the structure of interest:

miner.download('5k7c', 'pdb', function(data){
  fs = require('fs');
  fs.writeFileSync('5k7c.pdb', data);
});

You can also get info on certain structures by calling the following function. You pass in either a single PDB-ID or a list, a single parameter or a list of parameters, and a callback function.

miner.describe_pdb(['100D','4OJI'], ['depositionDate', 'macromoleculeType'], function(result){
  console.log(result);
});

Valid parameters can be accessed via miner.fields. They are also listed at the bottom of this README

You can filter the results from describe_pdb() using the standard Array filtering method:

miner.describe_pdb(['100D','4OJI'], ['depositionDate', 'macromoleculeType'], function(result){
  filtered_result = result.filter(obj => obj.macromoleculeType == 'Protein');
  console.log(filtered_result);
});

Don't like callback functions? You can avoid passing in callback functions and instead use Promises as follows:

miner.query('ribozyme')
	 .then(results => miner.describe_pdb(results, ['macromoleculeType']))
	 .then(descriptions => descriptions.filter(obj => obj.macromoleculeType == 'RNA'))
	 .then(rnas => {
	 	console.log(rnas);
	 });

Parameters

| Report Name | Field Name | |--------------------------------------------------------------------------|------------------------------| | Structure Summary Report (StructureSummary) | atomSiteCount | | | authors | | | classification | | | depositionDate | | | experimentalTechnique | | | macromoleculeType | | | ndbId | | | pdbDoi | | | releaseDate | | | residueCount | | | resolution | | | revisionDate | | | structureMolecularWeight | | | structureTitle | | Sequence Report (Sequence) | chainLength | | | db_code | | | db_name | | | entityId | | | entityMacromoleculeType | | | kabschSander | | | molecularWeight | | | sequence | | Ligand Report (Ligands) | InChI | | | InChIKey | | | ligandFormula | | | ligandId | | | ligandImage | | | ligandMolecularWeight | | | ligandName | | | ligandSmiles | | Binding Affinity Report (BindingAffinity) | EC50 | | | IC50 | | | Ka | | | Kd | | | Ki | | | deltaG | | | deltaH | | | deltaS | | | hetId | | Biological Detail Report (BiologicalDetails) | biologicalProcess | | | cellularComponent | | | compound | | | ecNo | | | expressionHost | | | molecularFunction | | | plasmid | | | source | | | taxonomyId | | Cluster Entity Report (ClusterEntity) | authorAssignedEntityName | | | clusterNumber100 | | | clusterNumber30 | | | clusterNumber40 | | | clusterNumber50 | | | clusterNumber70 | | | clusterNumber90 | | | clusterNumber95 | | | entityId | | | geneName | | | idNum | | | rankNumber100 | | | rankNumber30 | | | rankNumber40 | | | rankNumber50 | | | rankNumber70 | | | rankNumber90 | | | rankNumber95 | | | synonym | | | taxonomy | | | taxonomyId | | | uniprotAcc | | | uniprotAlternativeNames | | | uniprotRecommendedName | | Domains Report (Domains) | cathDescription | | | cathId | | | pfamAccession | | | pfamDescription | | | pfamId | | | scopDomain | | | scopFold | | | scopId | | Crystallization Report (Crystallization) | crystallizationMethod | | | crystallizationTempK | | | densityMatthews | | | densityPercentSol | | | pdbxDetails | | | phValue | | Unit Cell Dimension Report (UnitCellDimensions) | Z_PDB | | | lengthOfUnitCellLatticeA | | | lengthOfUnitCellLatticeB | | | lengthOfUnitCellLatticeC | | | spaceGroup | | | unitCellAngleAlpha | | | unitCellAngleBeta | | | unitCellAngleGamma | | Data Collection Detail Report (DataCollectionDetails) | collectionDate | | | collectionTemperature | | | device | | | diffractionSource | | | diffrnId | | Refinement Detail Report (RefinementDetails) | averageBFactor | | | rAll | | | rFree | | | rObserved | | | rWork | | | refinementResolution | | Refinement Parameter Report (refinementParameters) | highResolutionLimit | | | reflectionsForRefinement | | | structureDeterminationMethod | | Software Report (NmrSoftware) | authors | | | name | | | version | | NMR Spectrometer Report (NmrSpectrometer) | fieldStrength | | | manufacturer | | | model | | nmrExperimentalSampleConditions Report (NMRExperimentalSampleConditions) | contents | | | ionicStrength | | | ph | | | pressure | | | pressureUnits | | | solventSystem | | | temperature | | | type | | NMR Representative Report (NmrRepresentative) | conformerId | | | selectionCriteria | | NMR Refine Report (NMRRefinement) | details | | | method | | NMR Ensemble Report (NmrEnsemble) | conformerSelectionCriteria | | | totalConformersCalculated | | | totalConformersSubmitted | | EM Structure Report (EMStructure) | emResolution | | | emDiffractionResolution | | | reconstructionMethod | | | symmetryType | | | pointSymmetry | | | aggregationState | | | embedding | | | staining | | | vitrification | | | emdbMap | | | additionalMap | | Citation Report (Citation) | abstractTextShort | | | authors | | | doi | | | firstPage | | | journalName | | | lastPage | | | meshTerms | | | pmc | | | publicationYear | | | pubmedId | | | title | | | volumeId | | Other Citation Report (OtherCitations) | authors | | | firstPage | | | journalName | | | pmc | | | publicationYear | | | pubmedId | | | title | | | volumeId | | Structural Genomics Centers Report (SGProject) | centerInitial | | | centerName | | | projectName |