mdciao.nomenclature.guess_nomenclature_fragments¶
-
mdciao.nomenclature.
guess_nomenclature_fragments
(refseq, top, fragments=None, min_hit_rate=0.6, verbose=False, return_residue_idxs=False, empty=<class 'list'>)¶ Guess what fragments in the topology best match the consensus labels in a
LabelerConsensus
objectThe guess uses a cutoff, min_hit_rate, for the quality of each segment’s alignment to the sequence in CLin.
It only counts the matches for the protein residues of top, i.e. waters, ions, non-peptidic polymers are note taken into account.
You can use the method to identify the receptor in topology where other molecules (e.g. the Gprot) are present (or the other way around)
- Parameters
refseq (str or
LabelerConsensus
) – If not str, the sequence will be gotten from LabelerConsensus.seq methodtop –
Topology
object or string containing the sequence.fragments (iterable of iterables of idxs) – How top is split into fragments If None, will be generated using get_fragments defaults
min_hit_rate (float, default is .6) – Only fragments with hit rates higher than this will be returned as a guess
verbose (boolean) – be verbose
return_residue_idxs (bool, default is False) – Return the list residue indices directly, instead of returning a list of fragment idxs.
empty (class, list or None, default is list) – What to return in case of an emtpy guess, an empty list or a None
- Returns
guess – indices of the fragments (or residues) with higher hit-rate than min_hit_rate
- Return type
list