Open wsdewitt opened 2 years ago
@WSDeWitt From what I can tell, changing the jumble parameter doesn't actually change the trees that dnapars finds. For example, using the sample data in example
, doing
mkconfig --jumble 100 deduplicated.phylip dnapars > dnapars.cfg
dnapars < dnapars.cfg > dnapars.log
and doing
mkconfig --jumble 10 deduplicated.phylip dnapars > dnapars.cfg
dnapars < dnapars.cfg > dnapars.log
both result in 263 trees found by dnapars, in about the same amount of time. I suspect that dnapars is just ignoring the jumble parameter and only evaluating a single (?) input sequence order.
However, if I change the random seed passed to the jumble parameter in dnapars.cfg
, I do get different output trees. For example, changing the config file output by the above command to mkconfig
:
/home/wdumm/gctree/gctree/example/deduplicated.phylip
J
1
10
O
1
4
5
.
Y
to this config file:
/home/wdumm/gctree/gctree/example/deduplicated.phylip
J
5
10
O
1
4
5
.
Y
results in 137 (presumably different from the other 263) trees from dnapars. The number following J
is the random seed, for shuffling the input sequence order, which must be of the form $4n + 1 $.
I am seeing larger parsimony forests with more jumbles, using the following commands.
deduplicate example/150228_Clone_3-8.fasta --root GL > deduplicated.phylip
mkconfig --jumble 10 deduplicated.phylip dnapars > dnapars.cfg
dnapars < dnapars.cfg > dnapars.log
head -5 outfile
DNA parsimony algorithm, version 3.697
42 trees in all found
mkconfig --jumble 100 --quick deduplicated.phylip dnapars > dnapars.cfg
rm outfile outtree
dnapars < dnapars.cfg > dnapars.log
head -5 outfile
DNA parsimony algorithm, version 3.697
287 trees in all found
Note these use the "quick" option. I haven't had time to try without the quick option yet.
Ok I retried without --quick
and found 263 trees with 1 jumble and with 2 jumbles (you found the same number using 10 or 100 jumbles). I'm not sure if this expected (we could ask Joe), or maybe it's just a feature of this data set that jumbling doesn't help the non-quick tree search find any more trees.
The funny thing is that changing the random seed for shuffling the sequences does change the trees that dnapars finds. You'd think that would be the same as shuffling multiple times starting with one seed.
Good point. Ok maybe we should ask Joe. Do you agree @matsen?
Y'all are much deeper in this than me, so I don't have much to say, but I'm sure that Joe would be happy to hear from you.
The "Jumble" option in
dnapars
determines the number of random starts to try for tree space search, described as follows in thephylip
docs:This is currently fixed at 10 in the
mkconfig
program: https://github.com/matsengrp/gctree/blob/dff3119798c6691ea8e8e1d7111a75e2a57860dc/gctree/mkconfig.py#L48-L51This should be made a parameter (default 10) in the command line interface.