From 56c11394fa8e6725befa81c01e6386d572fd61e2 Mon Sep 17 00:00:00 2001 From: rasbt Date: Mon, 23 Nov 2015 04:29:57 -0500 Subject: [PATCH] readme syntax update --- README.md | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 98e6abe..eadda48 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,24 @@ - PyPI: [https://pypi.python.org/pypi/biopandas](https://pypi.python.org/pypi/biopandas) - How to contribute: [http://rasbt.github.io/biopandas/contributing/](http://rasbt.github.io/biopandas/contributing/) -

+
+ +If you are a computational biologist, chances are that you cursed one too many times about protein structure files. Yes, I am talking about ye Goode Olde Protein Data Bank format, aka "PDB files." Nothing against PDB, it's a neatly structured format (if deployed correctly); yet, it is a bit cumbersome to work with PDB files in "modern" programming languages -- I am pretty sure we all agree on this. + +As machine learning and "data science" person, I fell in love with [pandas](http://pandas.pydata.org) DataFrames for handling just about everything that can be loaded into memory. +So, why don't we take pandas to the structural biology world? Working with molecular structures of biological macromolecules in pandas DataFrames is what BioPandas is all about! + +
## Examples ![3eiy](./docs/sources/img/index/3eiy.png) ```python ->>> ppdb = PandasPDB() ->>> ppdb.fetch_pdb('3eiy') +# Initialize a new PandasPDB object +# and fetch the PDB file from rcsb.org +>>> from biopandas.pdb import PandasPDB +>>> ppdb = PandasPDB().fetch_pdb('3eiy') >>> ppdb.df['ATOM'].head() ``` @@ -40,14 +49,16 @@ ![3eiy head](./docs/sources/img/index/ligand_rmsd.png) ```python ->>> pl1 = PandasPDB() ->>> pl1.read_pdb('./docking_pose_1.pdb') ->>> pl2 = PandasPDB() ->>> pl2.read_pdb('./docking_pose_2.pdb') - ->>> r = PandasPDB.rmsd(pl1.df['HETATM'], pl2.df['HETATM'], s='no hydrogen') ->>> print('RMSD: %f' % r) -RMSD: 2.6444 +# Load structures from your drive and compute the +# Root Mean Square Deviation +>>> from biopandas.pdb import PandasPDB +>>> pl1 = PandasPDB().read_pdb('./docking_pose_1.pdb') +>>> pl2 = PandasPDB().read_pdb('./docking_pose_2.pdb') +>>> r = PandasPDB.rmsd(pl1.df['HETATM'], pl2.df['HETATM'], + s='hydrogen', invert=True) +>>> print('RMSD: %.4f Angstrom' % r) + +RMSD: 2.6444 Angstrom ```