Hi!
I would like to know if itīs possible to retrieve a tree from an external file, so that I could avoid changing the content of the *.bf file each time I use a different tree.
I am pasting below the code I am using. There I would like to define the variable "tree" by using an external tree in newick format.
Thanks in advance!
Nico.-
Code:fscanf (classtotal, "Number", len);
fscanf (numDecoys, "Number", numDec);
fscanf (PDBactual, "String", pdb);
REPLACE_TREE_STRUCTURE = 1;
DataSet scpemDataSet = ReadDataFile ("./"+pdb+"_hssp.phy");
tree ="((((((Q6LXC3_MET:1.0,(Q2NE53_MET:1.0,Q8TUF5_MET:1.0):1.0):1.0,((((((A1D3Y9_9EU:1.0,Q1E154_COC:1.0):1.0,((Q4RHC2_TET:1.0,RPC11_MOUS:1.0):1.0,Q55P07_CRY:1.0):1.0):1.0,Q61A37_CAE:1.0):1.0,(Q7QXB3_GIA:1.0,Q61W07_CAE:1.0):1.0):1.0,(Q8ZTX9_PYR:1.0,Q9YEZ3_AER:1.0):1.0):1.0,((Q96YA8_SUL:1.0,RPOM_SULAC:1.0):1.0,(A0WU61_9CR:1.0,Q0Y5C9_THE:1.0):1.0):1.0):1.0):1.0,(Q8U264_PYR:1.0,(O58397_PYR:1.0,Q9UYX7_PYR:1.0):1.0):1.0):1.0,Q5JF34_PYR:1.0):1.0,1qyp:1.0):1.0,Q4TTY9_9EU:1.0);";
/*Define and optimize model = JTT*/
lkJTT=0;
for(i=0;i<len;i=i+1){
ExecuteCommands("#include \"Jones1.mdl\";");
ExecuteCommands("Tree treeh0"+i+" = tree;");
ExecuteCommands("DataSetFilter classh0"+i+" = CreateFilter (scpemDataSet,1,\""+i+"\",\"\");");
ExecuteCommands("LikelihoodFunction lkh0"+i+"= (classh0"+i+",treeh0"+i+");");
ExecuteCommands("Optimize (paramsh0"+i+", lkh0"+i+");");
ExecuteCommands("lkJTT = paramsh0"+i+"[1][0] + lkJTT;");
ExecuteCommands("fprintf(site-"+pdb+"-JTT.out,paramsh0"+i+"[1][0],\"\n\");");
}
ExecuteCommands("fprintf(total-"+pdb+"-JTT.out, lkJTT,\"\n\");");