v1.0.0: transfer of functionalities for trait evolution from PhyloNetworks v0.16, with breaking changes and improvements #10
CI.yml
on: pull_request
Documentation
5m 3s
Matrix: test
Annotations
8 errors, 2 warnings, and 1 notice
Documentation:
src/fit_phylolm_continuous.jl#L1161
doctest failure in ~/work/PhyloTraits.jl/PhyloTraits.jl/src/fit_phylolm_continuous.jl:1161-1242
```jldoctest descendence
julia> net = readnewick("(A:2.5,((B:1,#H1:0.5::0.4):1,(C:1,(D:0.5)#H1:0.5::0.6):1):0.5);");
julia> preorder!(net)
julia> using PhyloPlots
julia> plot(net, shownodenumber=true); # to locate nodes
julia> nodes_shifts = indexin([1,-5], [n.number for n in net.node]) # Put a shift on edges ending at nodes 1 and -5
2-element Vector{Union{Nothing, Int64}}:
1
7
julia> params = ParamsBM(10, 0.1, ShiftNet(net.node[nodes_shifts], [3.0, -3.0], net))
ParamsBM:
Parameters of a BM with fixed root:
mu: 10.0
Sigma2: 0.1
There are 2 shifts on the network:
──────────────────────────
Edge Number Shift Value
──────────────────────────
8.0 -3.0
1.0 3.0
──────────────────────────
julia> using Random; Random.seed!(2468); # sets the seed for reproducibility
julia> sim = rand(net, params); # simulate a dataset with shifts
julia> using DataFrames # to handle data frames
julia> dat = DataFrame(trait = sim[:tips], tipnames = sim.M.tipnames);
julia> dat = DataFrame(trait = [13.391976856737717, 9.55741491696386, 7.17703734817448, 7.889062527849697],
tipnames = ["A","B","C","D"]) # hard-coded, to be independent of random number generator
4×2 DataFrame
Row │ trait tipnames
│ Float64 String
─────┼────────────────────
1 │ 13.392 A
2 │ 9.55741 B
3 │ 7.17704 C
4 │ 7.88906 D
julia> dfr_shift = descendencedataframe(net, net.node[nodes_shifts]) # the regressors matching the shifts.
4×3 DataFrame
Row │ shift_1 shift_8 tipnames
│ Float64 Float64 String
─────┼────────────────────────────
1 │ 1.0 0.0 A
2 │ 0.0 0.0 B
3 │ 0.0 1.0 C
4 │ 0.0 0.6 D
julia> dfr = innerjoin(dat, dfr_shift, on=:tipnames); # join data and regressors in a single dataframe
julia> using StatsModels # for statistical model formulas
julia> fitBM = phylolm(@formula(trait ~ shift_1 + shift_8), dfr, net; reml=false) # actual fit
PhyloNetworkLinearModel
Formula: trait ~ 1 + shift_1 + shift_8
Model: Brownian motion
Parameter Estimates, using ML:
phylogenetic variance rate: 0.0112618
Coefficients:
────────────────────────────────────────────────────────────────────────
Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95%
────────────────────────────────────────────────────────────────────────
(Intercept) 9.48238 0.327089 28.99 0.0220 5.32632 13.6384
shift_1 3.9096 0.46862 8.34 0.0759 -2.04479 9.86399
shift_8 -2.4179 0.422825 -5.72 0.1102 -7.7904 2.95461
────────────────────────────────────────────────────────────────────────
Log Likelihood: 1.8937302027
AIC: 4.2125395947
```
Subexpression:
using PhyloPlots
Evaluated output:
Precompiling PhyloPlots...
Info Given PhyloPlots was explicitly requested, output will be shown live �[0K
�[0K[ Info: No R installation found by RCall.jl. Precompilation of RCall and all dependent packages postponed. Importing RCall will fail until an R installation is configured beforehand.
3474.3 ms ? PhyloPlots
[ Info: No R installation found by RCall.jl. Precompilation of RCall and all dependent packages postponed. Importing RCall will fail until an R installation is configured beforehand.
[ Info: No R installation found by RCall.jl. Precompilation of RCall and all dependent packages postponed. Importing RCall will fail until an R installation is configured beforehand.
[ Info: No R installation found by RCall.jl. Precompilation of RCall and all dependent packages postponed. Importing RCall will fail until an R installation is configured beforehand.
ERROR: LoadError: InitError: No R installation was detected at RCall installation time. Please provided the location of R by setting the Rhome and libR preferences or else set R_HOME='*' and rerun Pkg.build("RCall") to use Conda.jl.
Stacktrace:
[1] e
|
Documentation:
src/fit_phylolm_continuous.jl#L1161
doctest failure in ~/work/PhyloTraits.jl/PhyloTraits.jl/src/fit_phylolm_continuous.jl:1161-1242
```jldoctest descendence
julia> net = readnewick("(A:2.5,((B:1,#H1:0.5::0.4):1,(C:1,(D:0.5)#H1:0.5::0.6):1):0.5);");
julia> preorder!(net)
julia> using PhyloPlots
julia> plot(net, shownodenumber=true); # to locate nodes
julia> nodes_shifts = indexin([1,-5], [n.number for n in net.node]) # Put a shift on edges ending at nodes 1 and -5
2-element Vector{Union{Nothing, Int64}}:
1
7
julia> params = ParamsBM(10, 0.1, ShiftNet(net.node[nodes_shifts], [3.0, -3.0], net))
ParamsBM:
Parameters of a BM with fixed root:
mu: 10.0
Sigma2: 0.1
There are 2 shifts on the network:
──────────────────────────
Edge Number Shift Value
──────────────────────────
8.0 -3.0
1.0 3.0
──────────────────────────
julia> using Random; Random.seed!(2468); # sets the seed for reproducibility
julia> sim = rand(net, params); # simulate a dataset with shifts
julia> using DataFrames # to handle data frames
julia> dat = DataFrame(trait = sim[:tips], tipnames = sim.M.tipnames);
julia> dat = DataFrame(trait = [13.391976856737717, 9.55741491696386, 7.17703734817448, 7.889062527849697],
tipnames = ["A","B","C","D"]) # hard-coded, to be independent of random number generator
4×2 DataFrame
Row │ trait tipnames
│ Float64 String
─────┼────────────────────
1 │ 13.392 A
2 │ 9.55741 B
3 │ 7.17704 C
4 │ 7.88906 D
julia> dfr_shift = descendencedataframe(net, net.node[nodes_shifts]) # the regressors matching the shifts.
4×3 DataFrame
Row │ shift_1 shift_8 tipnames
│ Float64 Float64 String
─────┼────────────────────────────
1 │ 1.0 0.0 A
2 │ 0.0 0.0 B
3 │ 0.0 1.0 C
4 │ 0.0 0.6 D
julia> dfr = innerjoin(dat, dfr_shift, on=:tipnames); # join data and regressors in a single dataframe
julia> using StatsModels # for statistical model formulas
julia> fitBM = phylolm(@formula(trait ~ shift_1 + shift_8), dfr, net; reml=false) # actual fit
PhyloNetworkLinearModel
Formula: trait ~ 1 + shift_1 + shift_8
Model: Brownian motion
Parameter Estimates, using ML:
phylogenetic variance rate: 0.0112618
Coefficients:
────────────────────────────────────────────────────────────────────────
Coef. Std. Error t Pr(>|t|) Lower 95% Upper 95%
────────────────────────────────────────────────────────────────────────
(Intercept) 9.48238 0.327089 28.99 0.0220 5.32632 13.6384
shift_1 3.9096 0.46862 8.34 0.0759 -2.04479 9.86399
shift_8 -2.4179 0.422825 -5.72 0.1102 -7.7904 2.95461
────────────────────────────────────────────────────────────────────────
Log Likelihood: 1.8937302027
AIC: 4.2125395947
```
Subexpression:
plot(net, shownodenumber=true); # to locate nodes
Evaluated output:
ERROR: UndefVarError: `plot` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] top-level scope
@ none:1
Expected output:
diff =
Warning: Diff output requires color.
ERROR: UndefVarError: `plot` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] top-level scope
@ none:1
|
Documentation:
src/ancestral_continuous.jl#L344
doctest failure in ~/work/PhyloTraits.jl/PhyloTraits.jl/src/ancestral_continuous.jl:344-490
```jldoctest; filter = [r" PhyloTraits .*:\d+", ]
julia> using DataFrames, CSV # to read data file
julia> phy = readnewick(joinpath(dirname(pathof(PhyloTraits)), "..", "examples", "carnivores_tree.txt"));
julia> dat = CSV.read(joinpath(dirname(pathof(PhyloTraits)), "..", "examples", "carnivores_trait.txt"), DataFrame);
julia> using StatsModels # for statistical model formulas
julia> fitBM = phylolm(@formula(trait ~ 1), dat, phy);
julia> ancStates = ancestralreconstruction(fitBM) # Should produce a warning, as variance is unknown.
┌ Warning: These prediction intervals show uncertainty in ancestral values,
│ assuming that the estimated variance rate of evolution is correct.
│ Additional uncertainty in the estimation of this variance rate is
│ ignored, so prediction intervals should be larger.
└ @ PhyloTraits ~/build/JuliaPhylo/PhyloTraits.jl/src/traits_continuous.jl:2601
ReconstructedStates:
───────────────────────────────────────────────
Node index Pred. Min. Max. (95%)
───────────────────────────────────────────────
-5.0 1.32139 -0.33824 2.98102
-8.0 1.03258 -0.589695 2.65485
-7.0 1.41575 -0.140705 2.97221
-6.0 1.39417 -0.107433 2.89577
-4.0 1.39961 -0.102501 2.90171
-3.0 1.51341 -0.220523 3.24733
-13.0 5.3192 3.92279 6.71561
-12.0 4.51176 2.89222 6.13131
-16.0 1.50947 -0.0186118 3.03755
-15.0 1.67425 0.196069 3.15242
-14.0 1.80309 0.309992 3.29618
-11.0 2.7351 1.17608 4.29412
-10.0 2.73217 1.12361 4.34073
-9.0 2.41132 0.603932 4.21871
-2.0 2.04138 -0.0340955 4.11686
14.0 1.64289 1.64289 1.64289
8.0 1.67724 1.67724 1.67724
5.0 0.331568 0.331568 0.331568
2.0 2.27395 2.27395 2.27395
4.0 0.275237 0.275237 0.275237
6.0 3.39094 3.39094 3.39094
13.0 0.355799 0.355799 0.355799
15.0 0.542565 0.542565 0.542565
7.0 0.773436 0.773436 0.773436
10.0 6.94985 6.94985 6.94985
11.0 4.78323 4.78323 4.78323
12.0 5.33016 5.33016 5.33016
1.0 -0.122604 -0.122604 -0.122604
16.0 0.73989 0.73989 0.73989
9.0 4.84236 4.84236 4.84236
3.0 1.0695 1.0695 1.0695
───────────────────────────────────────────────
julia> using StatsBase # for predict function
julia> predict(ancStates)
31×2 DataFrame
Row │ nodenumber prediction
│ Int64 Float64
─────┼────────────────────────
1 │ -5 1.32139
2 │ -8 1.03258
3 │ -7 1.41575
4 │ -6 1.39417
5 │ -4 1.39961
6 │ -3 1.51341
7 │ -13 5.3192
8 │ -12 4.51176
⋮ │ ⋮ ⋮
25 │ 10 6.94985
26 │ 11 4.78323
27 │ 12 5.33016
28 │ 1 -0.122604
29 │ 16 0.73989
30 │ 9 4.84236
31 │ 3 1.0695
16 rows omitted
julia> predict(ancStates, interval = :prediction)
31×4 DataFrame
Row │ nodenumber prediction lower upper
│ Int64 Float64 Float64 Float64
─────┼───────────────────────────────────────────────
1 │ -5 1.32139 -0.33824 2.98102
2 │ -8 1.03258 -0.589695 2.65485
3 │ -7 1.41575 -0.140705 2.97221
4 │ -6 1.39417 -0.107433 2.89577
5 │ -4 1.39961 -0.102501 2.90171
6 │ -3 1.51341 -0.220523 3.24733
7 │ -13 5.3192 3.92279 6.71561
8 │ -12 4.51176 2.89222 6.13131
⋮ │ ⋮ ⋮ ⋮ ⋮
25 │ 10 6.94985 6.94985 6.94985
26 │ 11 4.7
|
Documentation:
src/ancestral_continuous.jl#L344
doctest failure in ~/work/PhyloTraits.jl/PhyloTraits.jl/src/ancestral_continuous.jl:344-490
```jldoctest; filter = [r" PhyloTraits .*:\d+", ]
julia> using DataFrames, CSV # to read data file
julia> phy = readnewick(joinpath(dirname(pathof(PhyloTraits)), "..", "examples", "carnivores_tree.txt"));
julia> dat = CSV.read(joinpath(dirname(pathof(PhyloTraits)), "..", "examples", "carnivores_trait.txt"), DataFrame);
julia> using StatsModels # for statistical model formulas
julia> fitBM = phylolm(@formula(trait ~ 1), dat, phy);
julia> ancStates = ancestralreconstruction(fitBM) # Should produce a warning, as variance is unknown.
┌ Warning: These prediction intervals show uncertainty in ancestral values,
│ assuming that the estimated variance rate of evolution is correct.
│ Additional uncertainty in the estimation of this variance rate is
│ ignored, so prediction intervals should be larger.
└ @ PhyloTraits ~/build/JuliaPhylo/PhyloTraits.jl/src/traits_continuous.jl:2601
ReconstructedStates:
───────────────────────────────────────────────
Node index Pred. Min. Max. (95%)
───────────────────────────────────────────────
-5.0 1.32139 -0.33824 2.98102
-8.0 1.03258 -0.589695 2.65485
-7.0 1.41575 -0.140705 2.97221
-6.0 1.39417 -0.107433 2.89577
-4.0 1.39961 -0.102501 2.90171
-3.0 1.51341 -0.220523 3.24733
-13.0 5.3192 3.92279 6.71561
-12.0 4.51176 2.89222 6.13131
-16.0 1.50947 -0.0186118 3.03755
-15.0 1.67425 0.196069 3.15242
-14.0 1.80309 0.309992 3.29618
-11.0 2.7351 1.17608 4.29412
-10.0 2.73217 1.12361 4.34073
-9.0 2.41132 0.603932 4.21871
-2.0 2.04138 -0.0340955 4.11686
14.0 1.64289 1.64289 1.64289
8.0 1.67724 1.67724 1.67724
5.0 0.331568 0.331568 0.331568
2.0 2.27395 2.27395 2.27395
4.0 0.275237 0.275237 0.275237
6.0 3.39094 3.39094 3.39094
13.0 0.355799 0.355799 0.355799
15.0 0.542565 0.542565 0.542565
7.0 0.773436 0.773436 0.773436
10.0 6.94985 6.94985 6.94985
11.0 4.78323 4.78323 4.78323
12.0 5.33016 5.33016 5.33016
1.0 -0.122604 -0.122604 -0.122604
16.0 0.73989 0.73989 0.73989
9.0 4.84236 4.84236 4.84236
3.0 1.0695 1.0695 1.0695
───────────────────────────────────────────────
julia> using StatsBase # for predict function
julia> predict(ancStates)
31×2 DataFrame
Row │ nodenumber prediction
│ Int64 Float64
─────┼────────────────────────
1 │ -5 1.32139
2 │ -8 1.03258
3 │ -7 1.41575
4 │ -6 1.39417
5 │ -4 1.39961
6 │ -3 1.51341
7 │ -13 5.3192
8 │ -12 4.51176
⋮ │ ⋮ ⋮
25 │ 10 6.94985
26 │ 11 4.78323
27 │ 12 5.33016
28 │ 1 -0.122604
29 │ 16 0.73989
30 │ 9 4.84236
31 │ 3 1.0695
16 rows omitted
julia> predict(ancStates, interval = :prediction)
31×4 DataFrame
Row │ nodenumber prediction lower upper
│ Int64 Float64 Float64 Float64
─────┼───────────────────────────────────────────────
1 │ -5 1.32139 -0.33824 2.98102
2 │ -8 1.03258 -0.589695 2.65485
3 │ -7 1.41575 -0.140705 2.97221
4 │ -6 1.39417 -0.107433 2.89577
5 │ -4 1.39961 -0.102501 2.90171
6 │ -3 1.51341 -0.220523 3.24733
7 │ -13 5.3192 3.92279 6.71561
8 │ -12 4.51176 2.89222 6.13131
⋮ │ ⋮ ⋮ ⋮ ⋮
25 │ 10 6.94985 6.94985 6.94985
26 │ 11 4.7
|
Documentation:
src/ancestral_continuous.jl#L344
doctest failure in ~/work/PhyloTraits.jl/PhyloTraits.jl/src/ancestral_continuous.jl:344-490
```jldoctest; filter = [r" PhyloTraits .*:\d+", ]
julia> using DataFrames, CSV # to read data file
julia> phy = readnewick(joinpath(dirname(pathof(PhyloTraits)), "..", "examples", "carnivores_tree.txt"));
julia> dat = CSV.read(joinpath(dirname(pathof(PhyloTraits)), "..", "examples", "carnivores_trait.txt"), DataFrame);
julia> using StatsModels # for statistical model formulas
julia> fitBM = phylolm(@formula(trait ~ 1), dat, phy);
julia> ancStates = ancestralreconstruction(fitBM) # Should produce a warning, as variance is unknown.
┌ Warning: These prediction intervals show uncertainty in ancestral values,
│ assuming that the estimated variance rate of evolution is correct.
│ Additional uncertainty in the estimation of this variance rate is
│ ignored, so prediction intervals should be larger.
└ @ PhyloTraits ~/build/JuliaPhylo/PhyloTraits.jl/src/traits_continuous.jl:2601
ReconstructedStates:
───────────────────────────────────────────────
Node index Pred. Min. Max. (95%)
───────────────────────────────────────────────
-5.0 1.32139 -0.33824 2.98102
-8.0 1.03258 -0.589695 2.65485
-7.0 1.41575 -0.140705 2.97221
-6.0 1.39417 -0.107433 2.89577
-4.0 1.39961 -0.102501 2.90171
-3.0 1.51341 -0.220523 3.24733
-13.0 5.3192 3.92279 6.71561
-12.0 4.51176 2.89222 6.13131
-16.0 1.50947 -0.0186118 3.03755
-15.0 1.67425 0.196069 3.15242
-14.0 1.80309 0.309992 3.29618
-11.0 2.7351 1.17608 4.29412
-10.0 2.73217 1.12361 4.34073
-9.0 2.41132 0.603932 4.21871
-2.0 2.04138 -0.0340955 4.11686
14.0 1.64289 1.64289 1.64289
8.0 1.67724 1.67724 1.67724
5.0 0.331568 0.331568 0.331568
2.0 2.27395 2.27395 2.27395
4.0 0.275237 0.275237 0.275237
6.0 3.39094 3.39094 3.39094
13.0 0.355799 0.355799 0.355799
15.0 0.542565 0.542565 0.542565
7.0 0.773436 0.773436 0.773436
10.0 6.94985 6.94985 6.94985
11.0 4.78323 4.78323 4.78323
12.0 5.33016 5.33016 5.33016
1.0 -0.122604 -0.122604 -0.122604
16.0 0.73989 0.73989 0.73989
9.0 4.84236 4.84236 4.84236
3.0 1.0695 1.0695 1.0695
───────────────────────────────────────────────
julia> using StatsBase # for predict function
julia> predict(ancStates)
31×2 DataFrame
Row │ nodenumber prediction
│ Int64 Float64
─────┼────────────────────────
1 │ -5 1.32139
2 │ -8 1.03258
3 │ -7 1.41575
4 │ -6 1.39417
5 │ -4 1.39961
6 │ -3 1.51341
7 │ -13 5.3192
8 │ -12 4.51176
⋮ │ ⋮ ⋮
25 │ 10 6.94985
26 │ 11 4.78323
27 │ 12 5.33016
28 │ 1 -0.122604
29 │ 16 0.73989
30 │ 9 4.84236
31 │ 3 1.0695
16 rows omitted
julia> predict(ancStates, interval = :prediction)
31×4 DataFrame
Row │ nodenumber prediction lower upper
│ Int64 Float64 Float64 Float64
─────┼───────────────────────────────────────────────
1 │ -5 1.32139 -0.33824 2.98102
2 │ -8 1.03258 -0.589695 2.65485
3 │ -7 1.41575 -0.140705 2.97221
4 │ -6 1.39417 -0.107433 2.89577
5 │ -4 1.39961 -0.102501 2.90171
6 │ -3 1.51341 -0.220523 3.24733
7 │ -13 5.3192 3.92279 6.71561
8 │ -12 4.51176 2.89222 6.13131
⋮ │ ⋮ ⋮ ⋮ ⋮
25 │ 10 6.94985 6.94985 6.94985
26 │ 11 4.7
|
Documentation:
src/ancestral_continuous.jl#L344
doctest failure in ~/work/PhyloTraits.jl/PhyloTraits.jl/src/ancestral_continuous.jl:344-490
```jldoctest; filter = [r" PhyloTraits .*:\d+", ]
julia> using DataFrames, CSV # to read data file
julia> phy = readnewick(joinpath(dirname(pathof(PhyloTraits)), "..", "examples", "carnivores_tree.txt"));
julia> dat = CSV.read(joinpath(dirname(pathof(PhyloTraits)), "..", "examples", "carnivores_trait.txt"), DataFrame);
julia> using StatsModels # for statistical model formulas
julia> fitBM = phylolm(@formula(trait ~ 1), dat, phy);
julia> ancStates = ancestralreconstruction(fitBM) # Should produce a warning, as variance is unknown.
┌ Warning: These prediction intervals show uncertainty in ancestral values,
│ assuming that the estimated variance rate of evolution is correct.
│ Additional uncertainty in the estimation of this variance rate is
│ ignored, so prediction intervals should be larger.
└ @ PhyloTraits ~/build/JuliaPhylo/PhyloTraits.jl/src/traits_continuous.jl:2601
ReconstructedStates:
───────────────────────────────────────────────
Node index Pred. Min. Max. (95%)
───────────────────────────────────────────────
-5.0 1.32139 -0.33824 2.98102
-8.0 1.03258 -0.589695 2.65485
-7.0 1.41575 -0.140705 2.97221
-6.0 1.39417 -0.107433 2.89577
-4.0 1.39961 -0.102501 2.90171
-3.0 1.51341 -0.220523 3.24733
-13.0 5.3192 3.92279 6.71561
-12.0 4.51176 2.89222 6.13131
-16.0 1.50947 -0.0186118 3.03755
-15.0 1.67425 0.196069 3.15242
-14.0 1.80309 0.309992 3.29618
-11.0 2.7351 1.17608 4.29412
-10.0 2.73217 1.12361 4.34073
-9.0 2.41132 0.603932 4.21871
-2.0 2.04138 -0.0340955 4.11686
14.0 1.64289 1.64289 1.64289
8.0 1.67724 1.67724 1.67724
5.0 0.331568 0.331568 0.331568
2.0 2.27395 2.27395 2.27395
4.0 0.275237 0.275237 0.275237
6.0 3.39094 3.39094 3.39094
13.0 0.355799 0.355799 0.355799
15.0 0.542565 0.542565 0.542565
7.0 0.773436 0.773436 0.773436
10.0 6.94985 6.94985 6.94985
11.0 4.78323 4.78323 4.78323
12.0 5.33016 5.33016 5.33016
1.0 -0.122604 -0.122604 -0.122604
16.0 0.73989 0.73989 0.73989
9.0 4.84236 4.84236 4.84236
3.0 1.0695 1.0695 1.0695
───────────────────────────────────────────────
julia> using StatsBase # for predict function
julia> predict(ancStates)
31×2 DataFrame
Row │ nodenumber prediction
│ Int64 Float64
─────┼────────────────────────
1 │ -5 1.32139
2 │ -8 1.03258
3 │ -7 1.41575
4 │ -6 1.39417
5 │ -4 1.39961
6 │ -3 1.51341
7 │ -13 5.3192
8 │ -12 4.51176
⋮ │ ⋮ ⋮
25 │ 10 6.94985
26 │ 11 4.78323
27 │ 12 5.33016
28 │ 1 -0.122604
29 │ 16 0.73989
30 │ 9 4.84236
31 │ 3 1.0695
16 rows omitted
julia> predict(ancStates, interval = :prediction)
31×4 DataFrame
Row │ nodenumber prediction lower upper
│ Int64 Float64 Float64 Float64
─────┼───────────────────────────────────────────────
1 │ -5 1.32139 -0.33824 2.98102
2 │ -8 1.03258 -0.589695 2.65485
3 │ -7 1.41575 -0.140705 2.97221
4 │ -6 1.39417 -0.107433 2.89577
5 │ -4 1.39961 -0.102501 2.90171
6 │ -3 1.51341 -0.220523 3.24733
7 │ -13 5.3192 3.92279 6.71561
8 │ -12 4.51176 2.89222 6.13131
⋮ │ ⋮ ⋮ ⋮ ⋮
25 │ 10 6.94985 6.94985 6.94985
26 │ 11 4.7
|
Documentation:
src/ancestral_posterior_discrete.jl#L139
doctest failure in ~/work/PhyloTraits.jl/PhyloTraits.jl/src/ancestral_posterior_discrete.jl:139-168
```jldoctest
julia> net = readnewick("(((A:2.0,(B:1.0)#H1:0.1::0.9):1.5,(C:0.6,#H1:1.0::0.1):1.0):0.5,D:2.0);");
julia> m1 = BinaryTraitSubstitutionModel([0.1, 0.1], ["lo", "hi"]);
julia> using DataFrames
julia> dat = DataFrame(species=["C","A","B","D"], trait=["hi","lo","lo","hi"]);
julia> fit1 = fitdiscrete(net, m1, dat);
julia> asr = ancestralreconstruction(fit1)
9×4 DataFrame
Row │ nodenumber nodelabel lo hi
│ Int64 String Float64 Float64
─────┼───────────────────────────────────────────
1 │ 1 A 1.0 0.0
2 │ 2 B 1.0 0.0
3 │ 3 C 0.0 1.0
4 │ 4 D 0.0 1.0
5 │ 5 5 0.286021 0.713979
6 │ 6 6 0.319456 0.680544
7 │ 7 7 0.16855 0.83145
8 │ 8 8 0.767359 0.232641
9 │ 9 H1 0.782776 0.217224
julia> using PhyloPlots
julia> plot(fit1.net, nodelabel = asr[!,[:nodenumber, :lo]], tipoffset=0.2); # pp for "lo" state
```
Subexpression:
plot(fit1.net, nodelabel = asr[!,[:nodenumber, :lo]], tipoffset=0.2); # pp for "lo" state
Evaluated output:
ERROR: UndefVarError: `plot` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] top-level scope
@ none:1
Expected output:
diff =
Warning: Diff output requires color.
ERROR: UndefVarError: `plot` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] top-level scope
@ none:1
|
Documentation
Process completed with exit code 1.
|
Julia 1 - ubuntu-latest - x64 - pull_request
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Julia 1 - macOS-latest - x64 - pull_request
[setup-julia] x64 arch has been requested on a macOS runner that has an arm64 (Apple Silicon) architecture. You may have meant to use the "aarch64" arch instead (or left it unspecified for the correct default).
|
[julia-buildpkg] Caching of the julia depot was not detected
Consider using `julia-actions/cache` to speed up runs https://github.com/julia-actions/cache To ignore, set input `ignore-no-cache: true`
|