def read_attrs(db_path, table=Annotation.__tablename__, index_col='TranscriptId'):
"""
Read the attributes database file into a pandas DataFrame
:param db_path: path to the attributes database
:param table: table name. should generally be annotation
:param index_col: column to index on. should generally be tx_id.
:return: pandas DataFrame
"""
engine = create_engine('sqlite:///{}'.format(db_path))
return pd.read_sql_table(table, engine, index_col=index_col)
sqlInterface.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录