From 8667eb540813b0449fb604dc7062300a16ddb715 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 29 Apr 2021 21:45:56 -0500 Subject: [PATCH] for v0.3.1: support for julia v1.6, DataFrames v1.0, etc. (#13) thanks CompatHelper and github-actions! --- .travis.yml | 4 ++-- Project.toml | 8 ++++---- docs/Project.toml | 3 +-- docs/src/man/gof.md | 6 +++--- test/Project.toml | 4 ---- test/test_qnetGoF.jl | 7 ++++--- test/test_ticr.jl | 4 ++-- 7 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82ed509..96da3ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ os: - linux - osx julia: - - 1.5 + - 1.6 notifications: email: false @@ -25,7 +25,7 @@ coveralls: true jobs: include: - stage: "Documentation" - julia: 1.5 + julia: 1.6 os: linux script: - julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); diff --git a/Project.toml b/Project.toml index 3804269..5de3474 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "QuartetNetworkGoodnessFit" uuid = "1382f7fc-2744-4d9d-8ec6-1e3efdec0746" authors = ["Cecile Ane <cecileane@users.noreply.github.com>"] -version = "0.3.0" +version = "0.3.1" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" @@ -18,9 +18,9 @@ StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c" [compat] CSV = "0.4, 0.5, 0.6, 0.7, 0.8" -DataFrames = "0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22" +DataFrames = "0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 1.0" NLopt = "0.5.1, 0.6" -PhyloNetworks = "0.11, 0.12, 0.13" +PhyloNetworks = "0.11, 0.12, 0.13, 0.14" SpecialFunctions = "0.8, 0.9, 0.10, 1.0" StatsFuns = "0.7, 0.8, 0.9" -julia = "1.2, 1.3, 1.4, 1.5" +julia = "1.2, 1.3, 1.4, 1.5, 1.6" diff --git a/docs/Project.toml b/docs/Project.toml index 612219a..0b66cc8 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -6,6 +6,5 @@ DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433" PhyloNetworks = "33ad39ac-ed31-50eb-9b15-43d0656eaa72" [compat] -CSV = "0.7" -DataFrames = "0.21" +CSV = "0.8" Documenter = "~0.26" diff --git a/docs/src/man/gof.md b/docs/src/man/gof.md index dbffeb8..1de10a8 100644 --- a/docs/src/man/gof.md +++ b/docs/src/man/gof.md @@ -13,7 +13,7 @@ proportion of genes estimated to have each 4-taxon unrooted topology. ```@repl gof using QuartetNetworkGoodnessFit, DataFrames, CSV -qCF = DataFrame!(CSV.File(joinpath(dirname(pathof(QuartetNetworkGoodnessFit)), "..","test","example_qCF_5taxa.csv"))); +qCF = DataFrame(CSV.File(joinpath(dirname(pathof(QuartetNetworkGoodnessFit)), "..","test","example_qCF_5taxa.csv")), copycols=false); qCF ``` @@ -45,7 +45,7 @@ lengths in the network, in coalescent units, before quantifying the goodness-of-fit. ```@repl gof -res0 = quarnetGoFtest!(net0, qCF, true; seed=234, nsim=2); +res0 = quarnetGoFtest!(net0, qCF, true; seed=201, nsim=3); nothing # hide ``` @@ -58,7 +58,7 @@ net0 = res0[5] Now we re-run the test using the option `false` to not re-optimize branch lengths. We use `nsim=200` simulations below to make this example faster. For a real data analysis, delete the `nsim` option -to use the default instead (1000) or specify higher value. +to use the default instead (1000) or specify a higher value. ```@repl gof res0 = quarnetGoFtest!(net0, qCF, false; seed=234, nsim=200); diff --git a/test/Project.toml b/test/Project.toml index d59d9dc..5e31b59 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -4,7 +4,3 @@ DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" PhyloNetworks = "33ad39ac-ed31-50eb-9b15-43d0656eaa72" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[compat] -CSV = "0.7" -DataFrames = "0.21" diff --git a/test/test_qnetGoF.jl b/test/test_qnetGoF.jl index 3247da7..68c2921 100644 --- a/test/test_qnetGoF.jl +++ b/test/test_qnetGoF.jl @@ -1,6 +1,6 @@ @testset "testing GoF, multinomial distribution" begin -df = DataFrame!(CSV.File(joinpath(dirname(Base.find_package("PhyloNetworks")),"..","examples","buckyCF.csv"))) +df = DataFrame(CSV.File(joinpath(dirname(Base.find_package("PhyloNetworks")),"..","examples","buckyCF.csv")), copycols=false) d0 = readTableCF(df) d = deepcopy(d0) net3 = readTopology("((((D:0.4,C:0.4):4.8,((A:0.8,B:0.8):2.2)#H1:2.2::0.7):4.0,(#H1:0::0.3,E:3.0):6.2):2.0,O:11.2);"); @@ -63,12 +63,13 @@ Distributed.addprocs(2) # start with: julia -p 2 --project # or: using Distributed; @everywhere begin; using Pkg; Pkg.activate("."); using PhyloNetworks; end @everywhere using QuartetNetworkGoodnessFit -netresult1 = quarnetGoFtest!(net3,d,false; seed=1456, nsim=5); +netresult1 = quarnetGoFtest!(net3,d,false; seed=2298, nsim=5); @test netresult1[4] ≈ [0.0024449826689709165,0.01496306673600063,0.01496306673600063,0.0024449826689709165,0.04086460431063039,0.9998541057240138,0.1901450501005025,0.8909735618259936,0.9058717147295428,0.8909735618259936,0.1901450501005025,0.9058717147295428,0.9913859984840471,0.3656465603640152,0.04086460431063039] @test netresult1[2] ≈ 6.21966321647047 # z stat, uncorrected @test netresult1[3] ≈ 3.405362128771355 # sigma @test netresult1[6] ≈ vcat(7.4043609719886545, repeat([-0.8885233166386386],4)) -netresult1 = quarnetGoFtest!(net3,d,true; seed=182, nsim=2, quartetstat=:Qlog); +netresult1 = (@test_logs (:warn, r"far from 0") quarnetGoFtest!(net3,d,true; seed=182, nsim=2, quartetstat=:Qlog)); +# just because 2 simulated z's only, and same values bc tiny network. may break with different RNG # note: with verbose=true, we see hybrid-lambda's warnings: # WARNING! NOT ULTRAMETRIC!!! # WARNING: Gene tree is not ultrametric diff --git a/test/test_ticr.jl b/test/test_ticr.jl index 5fe522d..9d71b0d 100644 --- a/test/test_ticr.jl +++ b/test/test_ticr.jl @@ -1,7 +1,7 @@ @testset "testing TICR, Dirichlet distribution" begin # previously in PhyloNetworks -df = DataFrame!(CSV.File(joinpath(dirname(Base.find_package("PhyloNetworks")),"..","examples","buckyCF.csv"))); +df = DataFrame(CSV.File(joinpath(dirname(Base.find_package("PhyloNetworks")),"..","examples","buckyCF.csv")), copycols=false); d = readTableCF(df); @testset "ticr! on data frame, tree" begin @@ -23,7 +23,7 @@ result3 = ticr!(net2_1,d,false); @test result3[1] ≈ 0.06932031690660927 # p-value, from R @test result3[3] == Dict("[0.0, 0.01)"=>2, "[0.01, 0.05)"=>0, "[0.05, 0.1)"=>2, "[0.1, 1.0]"=>11) @test result3[4][2] ≈ 54.241562916699216 # pseudo log-lik obtained from R -@test result3[4][1] ≈ 20.128258663235194 # alpha obtained from R +@test result3[4][1] ≈ 20.128258663235194 atol=1e-5 # alpha obtained from R result3_1 = ticr!(net2_1,d,false; test=:goodness); @test result3_1[2] ≈ 25.962962962962965463 # chi-squared statistic obtained from R @test result3_1[1] ≈ 9.7092282251534852702e-06 # p-value obtained from R