Skip to content

gbk_features_to_df() ​

Make a table of one kind of feature of GenBank files read with read_gbk.

Usage ​

python
from geneviewer import gbk_features_to_df

gbk_features_to_df(gbk_list, feature='CDS', keys=None, process_region=True)

Arguments ​

ArgumentTypeDescription
gbk_listdictFrom read_gbk.
featurestr, default "CDS"The feature key.
keyssequence of str, optionalThe qualifiers to keep, e.g. ["protein_id", "region"]; by default all of them.
process_regionbool, default TrueWhether to add strand ("complement" or "forward"), start and end from region. start and end are the full span of the location, also of spliced genes listed from right to left.

Value ​

pandas.DataFrame: One row per feature, with cluster, the file's name. Qualifier names are made syntactic as in R (function becomes function., db-xref becomes db.xref). Rows and columns that are all missing are left out.