create_database_from_msa#

biotite.application_v2.mmseqs.create_database_from_msa(app: MMseqsApp, msa: Mapping[str, list[Alignment]]) → MSADatabase[MMseqsApp][source]#

Create an MSA database from one or multiple MSAs.

Parameters:
appMMseqsApp

The application to use.

msadict (str -> list of Alignment)

MSA identifiers mapped to the respective MSA. Each MSA is given as pairwise alignments of its query to each of its homologs. Hence, the first sequence must be the same query sequence in each alignment of an MSA.

Returns:
databaseMSADatabase

The created database, containing one MSA per given identifier.

Raises:
ValueError

If an identifier in msa contains whitespace.

See also

get_msa_from_database

The inverse operation.

Notes

The identifiers appear as query in the alignment table of a search, which allows mapping the hits back to the respective MSA.

Each alignment is projected onto the ungapped query sequence, i.e. insertions with respect to the query are removed. Hence, a profile created from the returned database via MMseqsApp.msa_to_profile() is in the same coordinate frame as the query.