from cogent3 import load_annotations, draw_annotations
db = load_annotations(path="data/C-elegans-chromosome-I.gff")
dbGffAnnotationDb(source=':memory:', total_records=60166)
Genomic annotations can be visualised directly from an annotation database, without needing a sequence object. This is useful for exploring annotations loaded from GFF or GenBank files.
We load annotations for Caenorhabditis elegans chromosome I from a GFF file.
We can draw features for a specific region by providing coordinate bounds.
This produces the same visual output as seq.get_drawable(biotype=...), but without loading the sequence data.
By default, figures include an interactive range slider below the main plot. Drag the handles or select a region on the slider to zoom into a portion of the sequence. The x-axis label indicates the slider.
Hover over filled shapes to see feature details (name, biotype, coordinates, strand).
We can select specific feature types to display.
The range slider is included when saving figures as images. To produce a clean static image, disable the controls with show_controls=False.