haddock.modules.analysis.rnascan.rnascan module
rnascan module.
- class haddock.modules.analysis.rnascan.rnascan.AddDeltaBFactor(model: PDBFile, path: Path, model_results: List[MutationResult])[source]
Bases:
AddDeltaBFactorAdd rnascan delta score in the b-factor column of a PDB.
- class haddock.modules.analysis.rnascan.rnascan.ClusterOutputer(cluster_scan_data: Dict[str, Dict[str, float | int]], clt_id: str, clt_population: int, scan_residue: str | None = None, generate_plot: bool = False, offline: bool = False, splitplot: bool = False)[source]
Bases:
ClusterOutputerManage the generation of rnascan outputs for cluster-based analysis.
- sort_columns = ['chain', 'resid', 'target_resname']
- class haddock.modules.analysis.rnascan.rnascan.InterfaceScanner(model: str | Path | Any, scan_bases: List[str] | None = None, params: Dict[str, Any] | None = None)[source]
Bases:
BaseInterfaceScannerScan interface of a model to get target nucleotides and create corresponding mutation jobs.
- class haddock.modules.analysis.rnascan.rnascan.ModelPointMutation(model_path: Path, model_id: str, chain: str, resid: int, ori_resname: str, target_resname: str, native_scores: Tuple[float, float, float, float, float], output_mutants: bool = False, ligand_param_fname: Path | str = '', ligand_top_fname: Path | str = '')[source]
Bases:
ModelPointMutationExecute a single rnascan (RNA base) point mutation.
Shares its scoring flow with
haddock.libs.libscan.ModelPointMutationand only forwards this module’smutate/calc_score(which stay patchable in the module namespace).
- haddock.modules.analysis.rnascan.rnascan.get_atoms_to_keep(ori_resname: str, target_resname: str) Dict[str, str][source]
Return the atoms to preserve when mutating one RNA base into another.
Thin wrapper around
haddock.libs.libscan.get_atoms_to_keep()bound to this module’s ribose-phosphate backbone and RNA ring-type classification.
- haddock.modules.analysis.rnascan.rnascan.group_scan_by_cluster(models, results_by_model)[source]
Group rnascan data per cluster, keyed by mutation (base included).
- haddock.modules.analysis.rnascan.rnascan.mutate(pdb_f, target_chain, target_resid, mut_resname)[source]
Mutate an RNA base in a PDB file into a different base.
The ribose-phosphate backbone is always kept for the mutated nucleotide. When the original and target bases share a ring type (both purines or both pyrimidines) the common base ring atoms are kept as well to preserve the base orientation (see
get_atoms_to_keep). For cross-type mutations (purine <-> pyrimidine) the three glycosidic-region anchor atoms are kept and renamed to their counterpart in the target ring (pyrimidine N1/C2/C6 <-> purine N9/C4/C8). The remaining base atoms are dropped and rebuilt by CNS during scoring.- Parameters:
pdb_f (str) – Path to the pdb file.
target_chain (str) – Chain of the nucleotide to be mutated.
target_resid (int) – Residue number of the nucleotide to be mutated.
mut_resname (str) – Residue name of the target base (e.g.
A,C,G,U).
- Returns:
mut_pdb_fname (str) – Path to the mutated pdb file.
- haddock.modules.analysis.rnascan.rnascan.validate_scan_bases(scan_bases: List[str]) List[str][source]
Validate and normalise the list of target RNA bases.
Only the canonical RNA residue names (
A,C,G,U) are accepted, in a case-insensitive manner. Two-letter names prefixed withD(DA,DC,DG,DT) denote DNA residues in HADDOCK and are therefore rejected by this RNA-specific module.Thin wrapper around
haddock.libs.libscan.validate_scan_bases().