gffutils.interface.FeatureDB.update
- FeatureDB.update(data, make_backup=True, **kwargs)[source]
Update the on-disk database with features in
data
.WARNING: If you used any non-default kwargs for gffutils.create_db when creating the database in the first place (especially
disable_infer_transcripts
ordisable_infer_genes
) then you should use those same arguments here. The exception is theforce
argument though – in some cases including that can truncate the database.WARNING: If you are creating features from the database and writing immediately back to the database, you could experience deadlocks. See the help for
create_introns
for some different options for avoiding this.The returned object is the same FeatureDB, but since it is pointing to the same database and that has been just updated, the new features can now be accessed.
- Parameters:
data (str, iterable, FeatureDB instance) – If FeatureDB, all data will be used. If string, assume it’s a filename of a GFF or GTF file. Otherwise, assume it’s an iterable of Feature objects. The classes in gffutils.iterators may be helpful in this case.
make_backup (bool) – If True, and the database you’re about to update is a file on disk, makes a copy of the existing database and saves it with a .bak extension.
kwargs – Additional kwargs are passed to gffutils.create_db; see the help for that function for details.
- Return type:
Returns self but with the underlying database updated.