diff --git a/data/qmean/scorer/disco_tree_0141.dat b/data/qmean/scorer/disco_tree_0141.dat index d9dde869baa3ad2abc128042c0106fe6ebfc2a79..85e55672d9f617ec65f15d7cf1c0cc2eb04625bc 100644 Binary files a/data/qmean/scorer/disco_tree_0141.dat and b/data/qmean/scorer/disco_tree_0141.dat differ diff --git a/doc/source/example_scripts/qmeandisco_example.py b/doc/source/example_scripts/qmeandisco_example.py index 7c1c28b842f1a4ac6f27e0d1cbbb53e5d039924e..6d37b4b7ed85284b6131561a208dba6ff20ebcf4 100644 --- a/doc/source/example_scripts/qmeandisco_example.py +++ b/doc/source/example_scripts/qmeandisco_example.py @@ -16,7 +16,7 @@ model05_sele = model05.Select('peptide = true and ligand = false') # First the DCData object is loaded dc_data_4j32_A = LoadDCData("example_data/4j32_A.dat") -# For computation of QMEANDisCo scores the residue sequence of the model needs +# For computation of DisCo scores the residue sequence of the model needs # to be aligned with the SEQRES and the model has to be attachted to the # alignment model01_aln = AlignToSEQRES(model01_sele, dc_data_4j32_A.seq) @@ -25,13 +25,13 @@ model01_aln.AttachView(1,model01_sele) model05_aln = seq.alg.AlignToSEQRES(model05_sele, dc_data_4j32_A.seq) model05_aln.AttachView(1,model05_sele) -# Now we can compute the QMEANDisCo scores for our two models ... +# Now we can compute the DisCo scores for our two models ... model01_score = DCScore(model01_aln, dc_data_4j32_A) model05_score = DCScore(model05_aln, dc_data_4j32_A) -print "QMEANDisCo score of model 01:" +print "DisCo score of model 01:" print model01_score -print "\nQMEANDisCo score of model 05:" +print "\nDisCo score of model 05:" print model05_score # ... or we can directly compute QMEANDisCo scores @@ -41,4 +41,4 @@ AssessModelQuality(model01_sele, output_dir = out_path, plots = False, out_path = os.path.join("example_out","qmeandisco_output","model05") AssessModelQuality(model05_sele, output_dir = out_path, plots = False, - global_scores = False, dc = dc_data_4j32_A) \ No newline at end of file + global_scores = False, dc = dc_data_4j32_A) diff --git a/pymod/dc_data.py b/pymod/dc_data.py index 8c2aa89ce2ee7268b1e58f9a9fd9c313ca8a4c7d..ce6b7be4fd198b5f5d68ad63931eb93dea354ffe 100644 --- a/pymod/dc_data.py +++ b/pymod/dc_data.py @@ -34,9 +34,12 @@ class TemplateInformation: os.system(cmd) prj = Project(sm_prj_path+'.sm') tpls = prj.GetTemplates() + alns = ost.seq.AlignmentList() + tpl_list = list() + # align template sequences with seqres and find SMTL filename of templates - aln_dict = dict() + if len(tpls) > 65500: print "Too many templates. Only first 65500 templates will be considered." @@ -51,17 +54,13 @@ class TemplateInformation: bio_unit = prj.smtl.Get(pdb_id,ass_id) new_aln = HomologyModel.PruneAtomSeqAlignment(bio_unit.GetChainByName(chain_name).ToAtomSeqAlignment(tpl.alignment),2) fn = prj.GetModelRepos().FilenameForModel(pdb_id,ass_id,chain_name) - aln_dict[fn] = new_aln + alns.append(new_aln) + tpl_list.append(fn) # remove Swissmodel project shutil.rmtree(sm_prj_path+'.sm') # multiple sequence alignment - alns = ost.seq.AlignmentList() - tpl_list = list() - for k,aln in sorted(aln_dict.items()): - alns.append(aln) - tpl_list.append(k) ref_seq = seq.CreateSequence("ref", self.seqres) msaln = ost.seq.alg.MergePairwiseAlignments(alns,ref_seq)