cogent3.core.annotation_db.GenbankAnnotationDb#

class GenbankAnnotationDb(*args, **kwargs)#

Support for annotations from Genbank files.

Notes

Extended attributes are stored as json in the gb, attributes column.

Attributes
db
describe

top level description of the annotation db

table_names

Methods

add_feature(*, seqid, biotype, name, spans)

adds a record to user table

biotype_counts()

return counts of biological types across all tables and seqids

compatible(other_db[, symmetric])

checks whether table_names are compatible

count_distinct(*[, seqid, biotype, name])

return table of counts of distinct values

get_feature_children(name[, biotype, ...])

yields children of name

get_feature_parent(name[, exclude_biotype, ...])

yields parents of name

get_records_matching(*[, biotype, seqid, ...])

return all fields for matching records

num_matches(*[, seqid, biotype, name, ...])

return the number of records matching condition

to_rich_dict()

returns a dict suitable for json serialisation

union(annot_db)

returns a new instance with merged records with other

update(annot_db[, seqids])

update records with those from an instance of the same type

write(path)

writes db as bytes to path

StrOrBool

add_records

from_dict

get_features_matching

to_json