ClusterDatabase#
- class biotite.application_v2.mmseqs.ClusterDatabase(app: T, sequence_db: SequenceDatabase[T], path: PathLike[str] | str | None = None, suffix: str = '')[source]#
Bases:
Database[T]A database of sequence clusters.
Each entry is keyed by the representative sequence of a cluster and lists its members.
- Parameters:
- appLocalApp
The application the database is compatible with.
- sequence_dbSequenceDatabase
The sequence database that was clustered.
- pathpath-like, optional
The database directory. By default, a temporary directory is created.
- suffixstr, optional
A suffix appended to the database prefix.
- copy(destination: PathLike[str] | str, force: bool = False) Self#
Copy the database into a persistent directory.
- Parameters:
- destinationpath-like
The destination directory.
- forcebool, optional
If true, replace a non-empty destination.
- Returns:
- databaseDatabase
A persistent copy with the same concrete type and metadata.
- is_compatible_with(app: MMseqsLikeApp) TypeGuard[T]#
Check whether the database can be used by the given application.
- Parameters:
- appMMseqsApp or FoldseekApp
The application to check.
- Returns:
- compatiblebool
True if the database and application have the same concrete type.
- move(destination: PathLike[str] | str, force: bool = False) None#
Move the database into a persistent directory.
- Parameters:
- destinationpath-like
The destination directory.
- forcebool, optional
If true, replace a non-empty destination.
- set_parent(parent: Database[T]) None#
Keep the owner of this database’s directory alive.
Some databases are views of files in another database’s directory. If that directory is temporary, retaining its owner prevents premature deletion while the view is still in use.
- Parameters:
- parentDatabase
The database that owns the shared directory.