-
Install Anaconda Python
-
Add a features reporter moveer to your RosettaScript. Or, if you have already generated output scripts and wish to scroe them and report features, use a simple script like the following
<ROSETTASCRIPTS>
<SCOREFXNS>
<t weights=talaris2014_cst.wts />
</SCOREFXNS>
<MOVERS>
<ReportToDB name=report database_name=features.db3>
<feature name=ResidueFeatures />
<feature name=InterfaceFeatures scorefxn=t pack_together=false />
</ReportToDB>
</MOVERS>
<PROTOCOLS>
<Add mover=report />
</PROTOCOLS>
</ROSETTASCRIPTS>
- To take the features.db3 database and import into Pandas for use, all you need is to
import sqlite3
my_feature_tables = {}
db = sqlite3.connect( 'features.db3' )
cursor = db.cursor()
cursor.execute("SELECT name FROM sqlite_master WHERE type='table';")
tables = cursor.fetchall()
for table_name in tables:
table_name = table_name[0]
table = pandas.read_sql_query("SELECT * from %s" % table_name, db)
my_feature_tables.update( { table_name: table } )
which will give you a dictionary filled with Pandas DataFrames with the SQL tables