pyrosetta_help.score_mutants package
Submodules
pyrosetta_help.score_mutants.mutation module
pyrosetta_help.score_mutants.scores module
- pyrosetta_help.score_mutants.scores.extend_scores(scores: DataFrame)[source]
Adds the following fields:
highest/lowest_contributor
highest/lowest_contributor_value
highest/lowest_contributor_wordy
- Parameters:
scores – pd.DataFrame(output_of_variants)
- Returns:
- pyrosetta_help.score_mutants.scores.get_highest_contributor(row: Series) Tuple[str, float] [source]
Not largest in abs contribution, but highest number (i.e. most positive)
pyrosetta_help.score_mutants.variant module
- class pyrosetta_help.score_mutants.variant.MutantScorer(pose: Pose, modelname: str, scorefxn: ScoreFunction | None = None, strict_about_starting_residue: bool = True, verbose: bool = False)[source]
Bases:
object
Copy pasted from PI4KA <- GNB2 <- SnoopCatcher
- __init__(pose: Pose, modelname: str, scorefxn: ScoreFunction | None = None, strict_about_starting_residue: bool = True, verbose: bool = False)[source]
- static convert_name3_to_name1_mutation(mutation: str)[source]
Converts a mutation in name3 / 3-letter format to name1 / 1-letter format (e.g. p.Ala123Ile -> A123I)
- delta_scoredict(minuend: Dict[str, float], subtrahend: Dict[str, float]) Dict[str, float] [source]
minuend - subtrahend = difference given two dict return the difference -without using pandas.
- get_neighbor_vector(pose: Pose, resi: int, chain: str, distance: int, include_focus_in_subset: bool = True, own_chain_only: bool = False) vector1_bool [source]
- make_mutant(pose: Pose, mutation: str | Mutation, chain='A', distance: int = 10, cycles: int = 5, inplace: bool = False) Pose [source]
Make a point mutant (
A23D
).- Parameters:
pose – pose
mutation –
chain –
inplace –
- Returns:
a copy if inplace is false
- movement(original: Pose, resi: int, chain: str, distance: int, trials: int = 50, temperature: int = 1.0, replicate_number: int = 10)[source]
This method adapted from a notebook of mine, but not from an official source, is not well written. It should be a filter and score combo.
Used
BackrubMover
It returns the largest bb_rmsd of the pdb residue resi following backrub.
- relax_around_mover(pose: Pose, mutation: Mutation | None = None, resi: int | None = None, chain: str | None = None, cycles=5, distance=5, own_chain_only=False) None [source]
Relaxes pose
distance
around resi:chain or mutation- Parameters:
resi – PDB residue number.
chain –
pose –
cycles – of relax (3 quick, 15 thorough)
distance –
- Returns:
- score_mutation(mutation_name: str, chains: str, distance: int, cycles: int, interfaces, ref_interface_dG: Dict[str, float], final_func: Callable | None = None, preminimize: bool = False, movement: bool = False) Tuple[Dict[str, float], Pose, Pose] [source]
Scores the mutation
mutation_name
(str or Mutation instance) returning three objects: a dict of scores, the wt (may differ from pose if preminimise=True) and mutant pose- Parameters:
mutation_name –
chains –
distance –
cycles –
interfaces –
ref_interface_dG – premade if no preminimise.
final_func –
preminimize –
- Returns:
- score_mutations(mutations, chains='A', interfaces=(), preminimize=False, distance=10, cycles=5, final_func: Callable | None = None) List[Dict[str, float | str]] [source]