Python library for parsing data from NMR-STAR format files
nmrstarlib package is a Python library that facilitates reading and writing
NMR-STAR formatted files used by the Biological Magnetic Resonance Data Bank (BMRB)
for archival of Nuclear Magnetic Resonance (NMR) data and CIF formatted files used
by Protein Data Bank (PDB).
nmrstarlib package provides facilities to convert NMR-STAR and CIF formatted
files into their equivalent JSONized representation and vice versa. JSON stands
text to transmit data objects consisting of attribute-value pairs.
nmrstarlib package also provides facilities to create simulated peak lists for
different types of standard solution and solid-state NMR experiments from chemical
shifts and assignment information deposited in NMR-STAR files.
In addition, the
nmrstarlib package provides methods to visualize chemical shift data.
nmrstarlib package can be used in several ways:
- As a library for accessing and manipulating data stored in NMR-STAR and CIF formatted files.
- As a command-line tool to convert between NMR-STAR/CIF format and its equivalent JSONized NMR-STAR/CIF format, to create a large number of simulated peak lists, and also to visualize chemical shift data.
nmrstarlib in published work, please cite the following paper:
- Smelter, Andrey, Morgan Astra, and Hunter NB Moseley. “A fast and efficient python library for interfacing with the Biological Magnetic Resonance Data Bank.” BMC Bioinformatics 18.1 (2017): 175. doi: 10.1186/s12859-017-1580-5.
Install on Linux, Mac OS X
python3 -m pip install nmrstarlib
Install on Windows
py -3 -m pip install nmrstarlib
nmrstarlib library and create generator function that will yield
>>> import nmrstarlib >>> >>> # "path": path_to_file / path_to_dir / path_to_archive / bmrb_id / pdb_id / file_url >>> for starfile in nmrstarlib.read_files("path"): ... print(starfile.id) # print BMRB id of StarFile ... print(starfile.source) # print source of StarFile ... print(starfile.keys()) # print StarFile saveframe categories >>>
This package is distributed under the MIT