def __init__(self, ident, description=None, is_experimental=False, structure_path=None, file_type=None): StructProp.__init__(self, ident=ident, description=description, chains=None, mapped_chains=None, is_experimental=is_experimental, structure_path=structure_path, file_type=file_type) self.subunits = None """dict: Subunit composition defined as ``{chain_id: number_of_times_used_in_bioassembly}``"""
def __init__(self, ident, description=None, chains=None, mapped_chains=None, structure_path=None, file_type=None): StructProp.__init__(self, ident, description=description, chains=chains, mapped_chains=mapped_chains, is_experimental=True, structure_path=structure_path, file_type=file_type) self.experimental_method = None self.resolution = None self.date = None self.taxonomy_name = None
def __init__(self, ident, description=None, chains=None, mapped_chains=None, structure_path=None, file_type=None): StructProp.__init__(self, ident, description=description, chains=chains, mapped_chains=mapped_chains, is_experimental=True, structure_path=structure_path, file_type=file_type) self.experimental_method = None self.resolution = None self.date = None self.taxonomy_name = None self.biological_assemblies = DictList() """DictList: A list for storing Bioassembly objects related to this PDB ID"""
def __init__(self, ident, original_results_path, coach_results_folder='model1/coach', model_to_use='model1'): if not op.exists(original_results_path): raise OSError('{}: folder does not exist'.format(original_results_path)) StructProp.__init__(self, ident, is_experimental=False) self._attrs_to_copy = [] self.original_results_path = original_results_path self.model_to_use = model_to_use ### MODEL self.model_date = None original_model_path = op.join(original_results_path, '{}.pdb'.format(model_to_use)) if not op.exists(original_model_path): raise IOError('{}: no homology model generated'.format(original_model_path)) else: self.load_structure_path(structure_path=original_model_path, file_type='pdb') ### MODELING RESULTS self.difficulty = None self.top_template_pdb = None self.top_template_chain = None # Parse init.dat self._init_dat_path = op.join(original_results_path, 'init.dat') if op.exists(self._init_dat_path): self.update(parse_init_dat(self._init_dat_path)) # Parse seq.dat self._seq_dat_path = op.join(original_results_path, 'seq.dat') if op.exists(self._seq_dat_path): self._attrs_to_copy.append('_seq_dat_path') # TODO: parse seq.dat and store in modeling_results self.update(parse_seq_dat(self._seq_dat_path)) # Parse exp.dat self._exp_dat_path = op.join(original_results_path, 'exp.dat') if op.exists(self._exp_dat_path): self._attrs_to_copy.append('_exp_dat_path') # TODO: parse exp.dat and store in modeling_results self.update(parse_exp_dat(self._exp_dat_path)) # Parse BFP.dat self._bfp_dat_path = op.join(original_results_path, 'BFP.dat') if op.exists(self._bfp_dat_path): self._attrs_to_copy.append('_bfp_dat_path') # TODO: parse BFP.dat and store in modeling_results self.update(parse_bfp_dat(self._bfp_dat_path)) # Parse cscore self.c_score = None self.tm_score = None self.tm_score_err = None self.rmsd = None self.rmsd_err = None self._cscore_path = op.join(original_results_path, 'cscore') if op.exists(self._cscore_path): self._attrs_to_copy.append('_cscore_path') self.update(parse_cscore(self._cscore_path)) ### COACH RESULTS self.coach_bsites = [] self.coach_ec = [] self.coach_go_mf = [] self.coach_go_bp = [] self.coach_go_cc = [] coach_folder = op.join(original_results_path, coach_results_folder) self._coach_bsites_inf_path = op.join(coach_folder, 'Bsites.inf') self._coach_ec_dat_path = op.join(coach_folder, 'EC.dat') self._coach_go_mf_dat_path = op.join(coach_folder, 'GO_MF.dat') self._coach_go_bp_dat_path = op.join(coach_folder, 'GO_BP.dat') self._coach_go_cc_dat_path = op.join(coach_folder, 'GO_CC.dat') if op.isdir(coach_folder): # Parse Bsites.inf if op.exists(self._coach_bsites_inf_path): parsed_bsites = parse_coach_bsites_inf(self._coach_bsites_inf_path) if parsed_bsites: self._attrs_to_copy.append('_coach_bsites_inf_path') self.coach_bsites = parsed_bsites # Parse EC.dat if op.exists(self._coach_ec_dat_path): parsed_ec = parse_coach_ec(self._coach_ec_dat_path) if parsed_ec: self._attrs_to_copy.append('_coach_ec_dat_path') self.coach_ec = parsed_ec # Parse GO_MF.dat if op.exists(self._coach_go_mf_dat_path): parsed_go_mf = parse_coach_go(self._coach_go_mf_dat_path) if parsed_go_mf: self._attrs_to_copy.append('_coach_go_mf_dat_path') self.coach_go_mf = parsed_go_mf # Parse GO_BP.dat if op.exists(self._coach_go_bp_dat_path): parsed_go_bp = parse_coach_go(self._coach_go_bp_dat_path) if parsed_go_bp: self._attrs_to_copy.append('_coach_go_bp_dat_path') self.coach_go_bp = parsed_go_bp # Parse GO_CC.dat if op.exists(self._coach_go_cc_dat_path): parsed_go_cc = parse_coach_go(self._coach_go_cc_dat_path) if parsed_go_cc: self._attrs_to_copy.append('_coach_go_cc_dat_path') self.coach_go_cc = parsed_go_cc