API
gffutils
Create a database
Create a database from a GFF or GTF file. |
Interact with a database
First, connect to an existing database:
Then, use the methods of FeatureDB
to interact:
Return children of feature |
|
Return parents of feature |
|
Returns the database schema as a string. |
|
Returns an iterator of |
|
Simple count of features. |
|
Iterate through the entire database. |
|
Execute arbitrary queries on the db. |
|
Iterate over feature types found in the database. |
|
Return features within specified genomic coordinates. |
|
For each parent of type |
Modify a FeatureDB
:
Update the on-disk database with features in |
|
Delete features from database. |
|
Manually add relations to the database. |
|
Set pragmas for the current database connection. |
Operate on features:
Construct new features representing the space between features. |
|
Total bp of all children of a featuretype. |
|
Merge features matching criteria together |
|
Create introns from existing annotations. |
|
Converts |
Feature objects
Most FeatureDB
methods return Feature
objects:
You can extract the sequence for a feature:
Retrieves the sequence of this feature as a string. |
Creating a Feature
object:
Given a line from a GFF file, return a Feature object |
Integration with other tools
Converts a gffutils.Feature object to a Bio.SeqFeature object. |
|
Converts a Bio.SeqFeature object to a gffutils.Feature object. |
|
Create 1-bp transcription start sites for all transcripts in the database and return as a sorted pybedtools.BedTool object pointing to a temporary file. |
|
Convert any iterator into a pybedtools.BedTool object. |
Utilities
Converts a gffutils.Feature to a pybedtools.Interval |
|
Merges two attribute dictionaries into a single dictionary. |
|
Sanitize given GFF db. |
|
Annotate a GFF file by cross-referencing it with another GFF file, e.g. one containing gene models. |
|
Infer the dialect based on the attributes. |
|
Return the full path of a data file that ships with gffutils. |
|
Inspect a GFF or GTF data source. |