Skip to content

Commit

Permalink
Added option --algo none
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericlemoine committed Mar 15, 2018
1 parent 4939293 commit 07cf645
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions acr/parsimony.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
ALGO_DELTRAN = iota
ALGO_ACCTRAN
ALGO_DOWNPASS
ALGO_NONE
)

// Will annotate the tree nodes with ancestral characters
Expand Down Expand Up @@ -66,6 +67,8 @@ func ParsimonyAcr(t *tree.Tree, tipCharacters map[string]string, algo int, rando
parsimonyDELTRAN(t.Root(), nil, states, stateIndices, randomResolve)
case ALGO_ACCTRAN:
parsimonyACCTRAN(t.Root(), nil, states, stateIndices, randomResolve)
case ALGO_NONE:
// No pass after uppass
default:
return nil, fmt.Errorf("Parsimony algorithm %d unkown", algo)
}
Expand Down
1 change: 1 addition & 0 deletions asr/parsimony.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
ALGO_DELTRAN = iota
ALGO_ACCTRAN
ALGO_DOWNPASS
ALGO_NONE
)

// Will annotate the tree nodes with ancestral sequences
Expand Down
3 changes: 3 additions & 0 deletions cmd/acr.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Depending on the chosen algorithm, it will run:
a) DOWN-PASS or
b) DOWN-PASS+DELTRAN or
c) ACCTRAN
d) NONE
Should work on multifurcated trees.
Expand All @@ -52,6 +53,8 @@ randomly before going deeper in the tree.
algo = acr.ALGO_DELTRAN
case "downpass":
algo = acr.ALGO_DOWNPASS
case "none":
algo = acr.ALGO_NONE
default:
io.ExitWithMessage(fmt.Errorf("Unkown parsimony algorithm: %s", parsimonyAlgo))
}
Expand Down
3 changes: 3 additions & 0 deletions cmd/asr.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Depending on the chosen algorithm, it will run:
a) DOWN-PASS or
b) DOWN-PASS+DELTRAN or
c) ACCTRAN
d) NONE
Should work on multifurcated trees
Expand All @@ -56,6 +57,8 @@ randomly before going deeper in the tree.
algo = asr.ALGO_DELTRAN
case "downpass":
algo = asr.ALGO_DOWNPASS
case "none":
algo = asr.ALGO_NONE
default:
io.ExitWithMessage(fmt.Errorf("Unkown parsimony algorithm: %s", parsimonyAlgo))
}
Expand Down

0 comments on commit 07cf645

Please sign in to comment.