Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
phylo
fastcodeml
Commits
57979c06
Commit
57979c06
authored
Mar 11, 2016
by
omid
Browse files
some changes in command line option comments as well as final printed
trees
parent
c0b2d7bb
Changes
4
Hide whitespace changes
Inline
Side-by-side
CmdLine.cpp
View file @
57979c06
...
...
@@ -182,7 +182,7 @@ void CmdLine::parseCmdLine(int aCnt, char **aVal) {
// configuration parameters
{
OPT_SEED
,
"-s"
,
SO_REQ_SEP
,
"Random number generator seed (0 < seed < 1000000000)"
},
"Random number generator seed (0 < seed < 1000000000
, seed=0 -> random seed
)"
},
{
OPT_SEED
,
"--seed"
,
SO_REQ_SEP
,
""
},
{
OPT_NUM_THREADS
,
"-nt"
,
SO_REQ_SEP
,
"Number of threads (1 for non parallel execution)"
},
...
...
@@ -242,10 +242,10 @@ void CmdLine::parseCmdLine(int aCnt, char **aVal) {
// initialization parameters
{
OPT_TIMES_FROM_FILE
,
"-l"
,
SO_NONE
,
"Initial branch lengths from tree file"
},
"Initial branch lengths from tree file
(otherwise random initial branch lengths)
"
},
{
OPT_TIMES_FROM_FILE
,
"--blengths-from-file"
,
SO_NONE
,
""
},
{
OPT_BRANCH_LENGTH
,
"-bl"
,
SO_NONE
,
"
The length of the branches is
fixed"
},
"
Initial branch lengths from tree file and
fixed"
},
{
OPT_BRANCH_LENGTH
,
"--branch-lengths-fixed"
,
SO_NONE
,
""
},
{
OPT_BRANCH_ALL
,
"-ba"
,
SO_NONE
,
"Do for all branches as foreground branch (including leaves)"
},
...
...
@@ -255,7 +255,7 @@ void CmdLine::parseCmdLine(int aCnt, char **aVal) {
"in the phylo tree"
},
{
OPT_COMP_TIMES
,
"--export-comp-times"
,
SO_REQ_SEP
,
""
},
{
OPT_INIT_PARAM
,
"-p"
,
SO_REQ_SEP
,
"Pass initialization parameter in the "
"form: P=value (P: w0, k, p0, p1, w2) "
"form
(otherwise random)
: P=value (P: w0, k, p0, p1, w2) "
"-> e.g. -p w0=1.1 -p p0=2.1 ..."
},
{
OPT_INIT_PARAM
,
"--init-param"
,
SO_REQ_SEP
,
""
},
{
OPT_INIT_DEFAULT
,
"-ic"
,
SO_NONE
,
...
...
Newick.cpp
View file @
57979c06
...
...
@@ -304,7 +304,7 @@ int Newick::printTreeAnnotated(std::ostream &aOut, TreeNode *aNode, int aBranch,
int
Newick
::
printTreeAnnotatedWithEstLens
(
std
::
ostream
&
aOut
,
TreeNode
*
aNode
,
int
aBranch
,
bool
wLeaves
,
std
::
vector
<
double
>
*
mVar
)
const
{
std
::
vector
<
double
>
*
mVar
,
bool
bNumber
)
const
{
TreeNode
*
m
;
unsigned
int
idx
;
int
branch_idx
=
aBranch
;
...
...
@@ -312,10 +312,10 @@ int Newick::printTreeAnnotatedWithEstLens(std::ostream &aOut, TreeNode *aNode,
// Special case for the root
if
(
!
aNode
)
{
if
(
wLeaves
)
aOut
<<
"Annotated Newick Tree (*N marks the branch N)"
<<
std
::
endl
;
aOut
<<
"Annotated Newick Tree (*N marks the branch N)"
<<
std
::
endl
<<
std
::
endl
;
else
aOut
<<
"Annotated Newick Tree (*N marks the internal branch N)"
<<
std
::
endl
;
<<
std
::
endl
<<
std
::
endl
;
aOut
<<
'('
;
for
(
idx
=
0
;
(
m
=
mTreeRoot
.
getChild
(
idx
))
!=
NULL
;
++
idx
)
{
if
(
idx
>
0
)
...
...
@@ -333,7 +333,7 @@ int Newick::printTreeAnnotatedWithEstLens(std::ostream &aOut, TreeNode *aNode,
branch_idx
=
aBranch
+
1
;
aNode
->
printNodeWoutLen
();
std
::
cout
<<
std
::
setprecision
(
6
)
<<
":"
<<
(
*
mVar
)[
aBranch
];
if
(
wLeaves
)
if
(
wLeaves
and
bNumber
)
aOut
<<
'*'
<<
aBranch
;
}
else
{
branch_idx
=
aBranch
+
1
;
...
...
@@ -347,7 +347,7 @@ int Newick::printTreeAnnotatedWithEstLens(std::ostream &aOut, TreeNode *aNode,
aOut
<<
')'
;
aNode
->
printNodeWoutLen
();
std
::
cout
<<
std
::
setprecision
(
6
)
<<
":"
<<
(
*
mVar
)[
aBranch
];
aOut
<<
'*'
<<
aBranch
;
if
(
bNumber
)
aOut
<<
'*'
<<
aBranch
;
}
return
branch_idx
;
...
...
Newick.h
View file @
57979c06
...
...
@@ -86,7 +86,7 @@ public:
virtual
int
printTreeAnnotatedWithEstLens
(
std
::
ostream
&
aOut
,
TreeNode
*
aNode
=
NULL
,
int
aInternalBranch
=
0
,
bool
wLeaves
=
false
,
std
::
vector
<
double
>
*
mVar
=
NULL
)
const
;
std
::
vector
<
double
>
*
mVar
=
NULL
,
bool
bNumber
=
true
)
const
;
private:
/// Load a phylo tree definition from a Newick formatted string.
...
...
fast.cpp
View file @
57979c06
...
...
@@ -635,6 +635,8 @@ int main(int aRgc, char **aRgv) {
std
::
cout
<<
std
::
endl
<<
"H1 Final "
;
tree
.
printTreeAnnotatedWithEstLens
(
std
::
cout
,
NULL
,
0
,
true
,
&
mVar
);
tree
.
printTreeAnnotatedWithEstLens
(
std
::
cout
,
NULL
,
0
,
true
,
&
mVar
,
false
);
}
// tree.printTreeAnnotatedWithEstLens(std::cout, NULL, 0, true,
// &h1.getVariables());
...
...
@@ -869,6 +871,8 @@ int main(int aRgc, char **aRgv) {
std
::
cout
<<
std
::
endl
<<
"H1 Final "
;
tree
.
printTreeAnnotatedWithEstLens
(
std
::
cout
,
NULL
,
0
,
true
,
&
mVar
);
tree
.
printTreeAnnotatedWithEstLens
(
std
::
cout
,
NULL
,
0
,
true
,
&
mVar
,
false
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment