Skip to content
Permalink
Browse files

changed to reduce the number of output parameters in files

  • Loading branch information
Tracy Heath
Tracy Heath committed Jun 11, 2014
1 parent 3f18ed7 commit b0f3198a601b3115c7af911f541e1f5a86b09898
Showing with 26 additions and 27 deletions.
  1. +7 −6 src/Mcmc.cpp
  2. +18 −18 src/Parameter_tree.cpp
  3. +1 −3 src/dppdiv.cpp
@@ -216,7 +216,8 @@ void Mcmc::sampleChain(int gen, ofstream &paraOut, ofstream &figTOut,

if(gen == 1){
paraOut << "Gen\tlnLikelihood\tf(A)\tf(C)\tf(G)\tf(T)";
paraOut << "\tr(AC)\tr(AG)\tr(AT)\tr(CG)\tr(CT)\tr(GT)\tshape\tave rate\tnum rate groups\tconc param\n";
// paraOut << "\tr(AC)\tr(AG)\tr(AT)\tr(CG)\tr(CT)\tr(GT)\tshape\tave rate\tnum rate groups\tconc param\n";
paraOut << "\tr(AC)\tr(AG)\tr(AT)\tr(CG)\tr(CT)\tr(GT)\tshape\n";
figTOut << "#NEXUS\nbegin trees;\n";
nodeOut << "Gen\tlnL";
nodeOut << "\tNetDiv(b-d)\tRelativeDeath(d/b)";
@@ -242,7 +243,7 @@ void Mcmc::sampleChain(int gen, ofstream &paraOut, ofstream &figTOut,
nodeOut << t->getCalBDSSNodeInfoParamNames();
}
if(treePr == 7){
nodeOut << t->getCalBDSSNodeInfoIndicatorNames();
// nodeOut << t->getCalBDSSNodeInfoIndicatorNames();
nodeOut << "\tnum.tips";
}

@@ -255,9 +256,9 @@ void Mcmc::sampleChain(int gen, ofstream &paraOut, ofstream &figTOut,
for(int i=0; i<6; i++)
paraOut << "\t" << e->getRate(i);
paraOut << "\t" << sh->getAlphaSh();
paraOut << "\t" << nr->getAverageRate();
paraOut << "\t" << nr->getNumRateGroups();
paraOut << "\t" << nr->getConcenParam();
// paraOut << "\t" << nr->getAverageRate();
// paraOut << "\t" << nr->getNumRateGroups();
// paraOut << "\t" << nr->getConcenParam();
paraOut << "\n";

figTOut << " tree t" << gen << " = ";
@@ -300,7 +301,7 @@ void Mcmc::sampleChain(int gen, ofstream &paraOut, ofstream &figTOut,
nodeOut << t->getCalBDSSNodeInfoParamList();
}
if(treePr == 7){
nodeOut << t->getCalBDSSNodeInfoIndicatorList();
// nodeOut << t->getCalBDSSNodeInfoIndicatorList();
nodeOut << "\t" << t->getSumIndicatorV();
}
nodeOut << "\n";
@@ -1823,15 +1823,15 @@ string Tree::getCalBDSSNodeInfoParamNames(void){

stringstream ss;
Fossil *f = NULL;
for(vector<Node *>::iterator v = calibNodes.begin(); v != calibNodes.end(); v++){
int idx = (*v)->getIdx();
ss << "\tcalib.time(N" << idx << ")";
}
for(int i=0; i<fossSpecimens.size(); i++){
f = fossSpecimens[i];
int nID = f->getFossilMRCANodeID();
ss << "\tcal.dist(C" << i << ".nd" << nID << ")";
}
// for(vector<Node *>::iterator v = calibNodes.begin(); v != calibNodes.end(); v++){
// int idx = (*v)->getIdx();
// ss << "\tcalib.time(N" << idx << ")";
// }
// for(int i=0; i<fossSpecimens.size(); i++){
// f = fossSpecimens[i];
// int nID = f->getFossilMRCANodeID();
// ss << "\tcal.dist(C" << i << ".nd" << nID << ")";
// }
for(int i=0; i<fossSpecimens.size(); i++){
f = fossSpecimens[i];
int nID = f->getFossilMRCANodeID();
@@ -1851,15 +1851,15 @@ string Tree::getCalBDSSNodeInfoParamList(void){

stringstream ss;
Fossil *f = NULL;
for(vector<Node *>::iterator v = calibNodes.begin(); v != calibNodes.end(); v++){
setNodeOldestAttchBranchTime((*v));
double t = (*v)->getFossAttchTime() * treeScale;
ss << "\t" << t;
}
for(int i=0; i<fossSpecimens.size(); i++){
f = fossSpecimens[i];
ss << "\t" << f->getCalibrationDistance();
}
// for(vector<Node *>::iterator v = calibNodes.begin(); v != calibNodes.end(); v++){
// setNodeOldestAttchBranchTime((*v));
// double t = (*v)->getFossAttchTime() * treeScale;
// ss << "\t" << t;
// }
// for(int i=0; i<fossSpecimens.size(); i++){
// f = fossSpecimens[i];
// ss << "\t" << f->getCalibrationDistance();
// }
for(int i=0; i<fossSpecimens.size(); i++){
f = fossSpecimens[i];
if(1)
@@ -215,10 +215,8 @@ int main (int argc, char * const argv[]) {
treeNodePrior = atoi(argv[i+1]);
else if(!strcmp(curArg, "-tgs")) // set treeNodePrior to do calibrated birth-death
treeNodePrior = 6;
else if(!strcmp(curArg, "-tga")){ // set treeNodePrior to do calibrated birth-death with ancestor fossils
else if(!strcmp(curArg, "-tga")) // set treeNodePrior to do calibrated birth-death with ancestor fossils
treeNodePrior = 7;
doAbsRts = true;
}
else if(!strcmp(curArg, "-bdr")) // (lambda - mu)
netDiv = atof(argv[i+1]);
else if(!strcmp(curArg, "-bda")) // (mu / lambda)

0 comments on commit b0f3198

Please sign in to comment.
You can’t perform that action at this time.