src.serena.switchyness_score
Main entry for the algorithm to determine the swithchyness of a sequence baed on analysis of the ensemble
1""" 2Main entry for the algorithm to determine the swithchyness 3of a sequence baed on analysis of the ensemble 4""" 5 6from serena.analysis.ensemble_analysis import InvestigateEnsemble, InvestigateEnsembleResults 7from serena.interfaces.nupack4_0_28_wsl2_interface import MaterialParameter, NUPACK4Interface 8from serena.utilities.ensemble_structures import Sara2SecondaryStructure, Sara2StructureList 9from serena.utilities.ensemble_groups import MultipleEnsembleGroups, EnsembleSwitchStateMFEStructs 10 11class RunInvestigateEnsemble(InvestigateEnsemble): 12 """ 13 Class that is the main entry point for ensemble investigation 14 """ 15 16 def investigate_and_score_ensemble_nupack(self,sequence:str, folded_referenec_struct:str, material_param:MaterialParameter, temp_c: int, kcal_span_from_mfe:int, kcal_unit_increments: float = 1, aggressive:bool= False)->InvestigateEnsembleResults: 17 """ 18 Use the nupack folding enginer to generate a MultipleEnsembleGroups from a sequence 19 and refence folded structure (folded mfe maybe?) and analyze it for switchyness score 20 """ 21 nupack4:NUPACK4Interface = NUPACK4Interface() 22 structs:Sara2StructureList = nupack4.get_subopt_energy_gap(material_param=material_param, 23 temp_C=temp_c, 24 sequence_string=sequence, 25 energy_delta_from_MFE=kcal_span_from_mfe, 26 ) 27 switch_states:EnsembleSwitchStateMFEStructs = EnsembleSwitchStateMFEStructs(non_switch_mfe_struct=structs.sara_stuctures[0], 28 switched_mfe_struct=Sara2SecondaryStructure(sequence=sequence, 29 structure=folded_referenec_struct)) 30 ensemble:MultipleEnsembleGroups = nupack4.load_nupack_subopt_as_ensemble(span_structures=structs, 31 kcal_span_from_mfe=kcal_span_from_mfe, 32 Kcal_unit_increments=kcal_unit_increments, 33 switch_state=switch_states 34 ) 35 results:InvestigateEnsembleResults = self.investigate_and_score_ensemble(ensemble=ensemble, 36 is_aggressive=aggressive) 37 return results
class
RunInvestigateEnsemble(serena.analysis.ensemble_analysis.InvestigateEnsemble):
12class RunInvestigateEnsemble(InvestigateEnsemble): 13 """ 14 Class that is the main entry point for ensemble investigation 15 """ 16 17 def investigate_and_score_ensemble_nupack(self,sequence:str, folded_referenec_struct:str, material_param:MaterialParameter, temp_c: int, kcal_span_from_mfe:int, kcal_unit_increments: float = 1, aggressive:bool= False)->InvestigateEnsembleResults: 18 """ 19 Use the nupack folding enginer to generate a MultipleEnsembleGroups from a sequence 20 and refence folded structure (folded mfe maybe?) and analyze it for switchyness score 21 """ 22 nupack4:NUPACK4Interface = NUPACK4Interface() 23 structs:Sara2StructureList = nupack4.get_subopt_energy_gap(material_param=material_param, 24 temp_C=temp_c, 25 sequence_string=sequence, 26 energy_delta_from_MFE=kcal_span_from_mfe, 27 ) 28 switch_states:EnsembleSwitchStateMFEStructs = EnsembleSwitchStateMFEStructs(non_switch_mfe_struct=structs.sara_stuctures[0], 29 switched_mfe_struct=Sara2SecondaryStructure(sequence=sequence, 30 structure=folded_referenec_struct)) 31 ensemble:MultipleEnsembleGroups = nupack4.load_nupack_subopt_as_ensemble(span_structures=structs, 32 kcal_span_from_mfe=kcal_span_from_mfe, 33 Kcal_unit_increments=kcal_unit_increments, 34 switch_state=switch_states 35 ) 36 results:InvestigateEnsembleResults = self.investigate_and_score_ensemble(ensemble=ensemble, 37 is_aggressive=aggressive) 38 return results
Class that is the main entry point for ensemble investigation
def
investigate_and_score_ensemble_nupack( self, sequence: str, folded_referenec_struct: str, material_param: serena.interfaces.nupack4_0_28_wsl2_interface.MaterialParameter, temp_c: int, kcal_span_from_mfe: int, kcal_unit_increments: float = 1, aggressive: bool = False) -> serena.analysis.ensemble_analysis.InvestigateEnsembleResults:
17 def investigate_and_score_ensemble_nupack(self,sequence:str, folded_referenec_struct:str, material_param:MaterialParameter, temp_c: int, kcal_span_from_mfe:int, kcal_unit_increments: float = 1, aggressive:bool= False)->InvestigateEnsembleResults: 18 """ 19 Use the nupack folding enginer to generate a MultipleEnsembleGroups from a sequence 20 and refence folded structure (folded mfe maybe?) and analyze it for switchyness score 21 """ 22 nupack4:NUPACK4Interface = NUPACK4Interface() 23 structs:Sara2StructureList = nupack4.get_subopt_energy_gap(material_param=material_param, 24 temp_C=temp_c, 25 sequence_string=sequence, 26 energy_delta_from_MFE=kcal_span_from_mfe, 27 ) 28 switch_states:EnsembleSwitchStateMFEStructs = EnsembleSwitchStateMFEStructs(non_switch_mfe_struct=structs.sara_stuctures[0], 29 switched_mfe_struct=Sara2SecondaryStructure(sequence=sequence, 30 structure=folded_referenec_struct)) 31 ensemble:MultipleEnsembleGroups = nupack4.load_nupack_subopt_as_ensemble(span_structures=structs, 32 kcal_span_from_mfe=kcal_span_from_mfe, 33 Kcal_unit_increments=kcal_unit_increments, 34 switch_state=switch_states 35 ) 36 results:InvestigateEnsembleResults = self.investigate_and_score_ensemble(ensemble=ensemble, 37 is_aggressive=aggressive) 38 return results
Use the nupack folding enginer to generate a MultipleEnsembleGroups from a sequence and refence folded structure (folded mfe maybe?) and analyze it for switchyness score
Inherited Members
- serena.analysis.ensemble_analysis.InvestigateEnsemble
- investigate_and_score_ensemble