schrodinger.application.bioluminate.nucleic.mutator module¶
- class schrodinger.application.bioluminate.nucleic.mutator.NucleobaseMutator(mutations, concurrent)¶
Bases:
schrodinger.application.bioluminate.mutation.MacromoleculeMutator
Mutates a set of residues in a DNA or RNA structure allowing concurrent mutations as well as the option to limit concurrent mutations to sequential residues only.
- MUTS_FILE_REGEX = re.compile('(?P<chain>[a-zA-Z0-9_]{1})\n :\n (?P<resnum>-?\\d+)\n (?P<inscode>[a-zA-Z]{1})? # optional\n ->\n (?P<new_resname>(A|C|T|G|U))\n ', re.VERBOSE)¶
- RES_FILE_REGEX = re.compile('(?P<chain>[a-zA-Z0-9_]{1})\n :\n (?P<resnum>-?\\d+)\n (?P<inscode>[a-zA-Z]{1})? # optional\n \\s? # optional\n (?P<mutations>(A|C|T|G|U)(,A|,C|,T|,G|,U)*)? # op, re.VERBOSE)¶
- SUPPORTED_BUILD_RESIDUES = ['A', 'C', 'T', 'G', 'U']¶
- static makeMutation(mutation_tuple, polymer_type)¶
Convert a mutation tuple into a Mutation object.
- __init__(mutations, concurrent)¶
- Parameters
mutations – A list of the mutations to carry out on the
ref_struct
. Each element of the list is a tuple of (“res num.”, [“pdbnames”]) where “res num.” is the residue number being altered and “pdbnames” is a list of the standard PDB residue names to mutate it to.concurrent – Maximum concurrent mutations
- Raises
RuntimeError – If concurrent is less than 1.
- calculateMutationsList()¶
Calculate all combintations of mutations.
- classmethod convertMutsFile(muts_file, regex=None)¶
Converts lines in filename into a list of mutations to use. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “one-letter nucleobase for mutation”).
Each line is one mutation (could be multiple residues)
- classmethod convertResFile(filename, regex=None)¶
Converts lines in filename into a list of mutations to use. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Each line could be multiple mutations (one residue to multiple mutation states)
- Parameters
filename (str) – Name of file containing the list of mutations.
regex (regular expression object) – Regular expression for matching residues
- Raises
RuntimeError – If any of chain, resnum or mutation is missing
- Returns
List of mutations with valid syntax for the class
- Return type
list of tuples
- classmethod convertResList(reslist, regex=None, validate=True)¶
Converts list of residues into a list of mutations to use. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Each residue string could be multiple mutations (one residue to multiple mutation states)
- Parameters
reslist (list of str) – List of residues to convert to mutations
regex (regular expression object) – Regular expression for matching residues
validate (bool) – Whether to validate the potential mutations
- Returns
List of mutations with valid syntax for the class or None if any item in the list is not valid
- Return type
list of tuples or None
- classmethod convertResToMuts(res_str, regex=None, validate=True)¶
Converts a residue string into a list of mutations to use. Returns a list of tuples of (“chain”, “resnum”, “inscode”, “one-letter resnames for mutation”). Will return None if any item in the list is not a valid residue string.
A residue string could be multiple mutations (one residue to multiple mutation states)
- Parameters
res_str (str) – Residue string to convert to mutations
regex (regular expression object) – Regular expression for matching residues
validate (bool) – Whether to run validation on the mutation
- Returns
List of mutations with valid syntax for the class or None if the res_str is not valid.
- Return type
list tuples or None
- classmethod convertResidueList(residues, mutations, regex=None)¶
Convert a list of residues and mutations to a standard list of mutations. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “one-letter resnames for mutation”).
- Parameters
residues (list of strings (Syntax: <chain>:<resnum> if no chain use
"_"
)) – Residues that will be mutated.mutations – The one-letter names for the residues that will be used in mutation.
- Raises
RuntimeError – If any of chain, resnum or mutation is missing or if there is an invalid residue name
- Returns
List of mutations with valid syntax for the class
- Return type
list of tuples
- property mutations¶
The list of mutations that will be carried out
- property total_mutations¶
Total number of mutations that will be generated
- static validateMutatedResidues(cls, residues)¶
Method for validating the residues used in mutations passed in to the
MutateProtein
class.- Raises
ValueError – If the 1-letter residue name is not supported by the
build.mutate
method.
- static validateMutations(mutations)¶
Private method for validating the mutations passed in to the
MutateProtein
class.- Raises
ValueError – If the
mutations
passed in is not a list, if each item in the list is not a tuple, if the tuple is not of length 4 (chain, resnum idx, inscode, mutation resnames), if the resnum is not an integer, or any of the 3-letter residue names in “mutation resnames” is not supported by thebuild,mutate
method.
- class schrodinger.application.bioluminate.nucleic.mutator.NucleobaseMutation(chain: str, res_num: int, inscode: str, to_res_3l: str, polymer_type: str, from_res_3l: Optional[str] = None, _resnum_with_inscode: Optional[str] = None)¶
Bases:
schrodinger.application.bioluminate.mutation.Mutation
- property mut_frag_name¶
- __init__(chain: str, res_num: int, inscode: str, to_res_3l: str, polymer_type: str, from_res_3l: Optional[str] = None, _resnum_with_inscode: Optional[str] = None) None ¶
- from_res_3l: str = None¶
- make_reverse_mutation()¶
Return a new Mutation object that mutates the same residue from self.to_res_3l to self.from_res_3l.
- Returns
reversed mutation
- Return type
- res_asl()¶
Return atom selection language (asl) of the mutating residue.
- Returns
asl for selecting the mutating residue of this mutation
- Return type
str
- property res_id¶
- property resnum_with_inscode¶
- chain: str¶
- res_num: int¶
- inscode: str¶
- to_res_3l: str¶
- polymer_type: str¶