From 0939f848694f96c0a5b00c1af2b82fec0d5abb28 Mon Sep 17 00:00:00 2001 From: Arthur Date: Mon, 25 Apr 2022 23:57:41 +0100 Subject: [PATCH 1/4] at basic permdisp --- Manifest.toml | 376 +++++++++++++++++++++++++++++++ Project.toml | 2 + src/Diversity.jl | 11 + src/Testing.jl | 6 + src/Testing/ANOVA.jl | 73 ++++++ src/Testing/dispersion.jl | 98 ++++++++ src/Testing/permutation_tests.jl | 86 +++++++ 7 files changed, 652 insertions(+) create mode 100644 Manifest.toml create mode 100644 src/Testing.jl create mode 100644 src/Testing/ANOVA.jl create mode 100644 src/Testing/dispersion.jl create mode 100644 src/Testing/permutation_tests.jl diff --git a/Manifest.toml b/Manifest.toml new file mode 100644 index 0000000..aea1570 --- /dev/null +++ b/Manifest.toml @@ -0,0 +1,376 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.7.2" +manifest_format = "2.0" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" + +[[deps.ArrayInterface]] +deps = ["Compat", "IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"] +git-tree-sha1 = "c933ce606f6535a7c7b98e1d86d5d1014f730596" +uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +version = "5.0.7" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisArrays]] +deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] +git-tree-sha1 = "cf6875678085aed97f52bfc493baaebeb6d40bcb" +uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" +version = "0.4.5" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "9950387274246d08af38f6eef8cb5480862a435f" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.14.0" + +[[deps.ChangesOfVariables]] +deps = ["ChainRulesCore", "LinearAlgebra", "Test"] +git-tree-sha1 = "bf98fa45a0a4cee295de98d4c1462be26345b9a1" +uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" +version = "0.1.2" + +[[deps.Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "b153278a25dd42c65abbf4e62344f9d22e59191b" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "3.43.0" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.10.0" + +[[deps.DataFrames]] +deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "6c19003824cbebd804a51211fd3bbd81bf1ecad5" +uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +version = "1.3.3" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "3daef5523dd2e769dad2365274f760ff5f282c7d" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.11" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[deps.DirectionalStatistics]] +deps = ["IntervalSets", "LinearAlgebra", "Statistics", "StatsBase"] +git-tree-sha1 = "3624a586028a7ed87907baab3b55fb43bb032ced" +uuid = "e814f24e-44b0-11e9-2fd5-aba2b6113d95" +version = "0.1.7" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.7" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.8.6" + +[[deps.Downloads]] +deps = ["ArgTools", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" + +[[deps.EcoBase]] +deps = ["RecipesBase"] +git-tree-sha1 = "a4d5b263972e820e780effc2084f92399ba44ee3" +uuid = "a58aae7d-b440-5a11-b283-399458f99aac" +version = "0.1.6" + +[[deps.EllipsisNotation]] +deps = ["ArrayInterface"] +git-tree-sha1 = "d064b0340db45d48893e7604ec95e7a2dc9da904" +uuid = "da5c29d0-fa7d-589e-88eb-ea29b0a81949" +version = "1.5.0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.IfElse]] +git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" +uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +version = "0.1.1" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.IntervalSets]] +deps = ["Dates", "EllipsisNotation", "Statistics"] +git-tree-sha1 = "bcf640979ee55b652f3b01650444eb7bbe3ea837" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.5.4" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "91b5dcf362c5add98049e6c29ee756910b03051d" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.3" + +[[deps.InvertedIndices]] +git-tree-sha1 = "bee5f1ef5bf65df56bdd2e40447590b272a5471f" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.1.0" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.1.1" + +[[deps.IterTools]] +git-tree-sha1 = "fa6287a4469f5e048d763df38279ee729fbd44e5" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.4.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "a970d55c2ad8084ca317a4658ba6ce99b7523571" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.12" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.0.2" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" + +[[deps.OrderedCollections]] +git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.4.1" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" + +[[deps.PooledArrays]] +deps = ["DataAPI", "Future"] +git-tree-sha1 = "28ef6c7ce353f0b35d0df0d5930e0d072c1f5b9b" +uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" +version = "1.4.1" + +[[deps.PrettyTables]] +deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"] +git-tree-sha1 = "dfb54c4e414caa595a1f2ed759b160f5a3ddcba5" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "1.3.1" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RangeArrays]] +git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" +uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" +version = "0.3.2" + +[[deps.RecipesBase]] +git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.2.1" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.0.1" + +[[deps.SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.Static]] +deps = ["IfElse"] +git-tree-sha1 = "2114b1d8517764a8c4625a2e97f40640c7a301a7" +uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +version = "0.6.1" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "c82aaa13b44ea00134f8c9c89819477bd3986ecd" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.3.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "8977b17906b0a1cc74ab2e3a05faa16cf08a8291" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.16" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.7.0" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/Project.toml b/Project.toml index 01da655..0dbbc0b 100644 --- a/Project.toml +++ b/Project.toml @@ -6,6 +6,7 @@ version = "0.5.6" [deps] AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +DirectionalStatistics = "e814f24e-44b0-11e9-2fd5-aba2b6113d95" EcoBase = "a58aae7d-b440-5a11-b283-399458f99aac" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -24,6 +25,7 @@ RCall = "0.13" RecipesBase = "0.6, 0.7, 0.8, 1" Requires = "^1" StatsBase = "0.32, 0.33" +DirectionalStatistics = "0.1.0 - 1.0" julia = "^1" [extras] diff --git a/src/Diversity.jl b/src/Diversity.jl index 90202a7..fd24954 100644 --- a/src/Diversity.jl +++ b/src/Diversity.jl @@ -190,6 +190,17 @@ export hillnumber end # sub-module Hill +""" + Diversity.Testing + +Hypothesis tests for distance matrices. +""" +module Testing + +include("Testing.jl") +export dispersion, permutest, mantel +end + # Path into package path(path...; dir::String = "test") = joinpath(@__DIR__, "..", dir, path...) diff --git a/src/Testing.jl b/src/Testing.jl new file mode 100644 index 0000000..b5e287c --- /dev/null +++ b/src/Testing.jl @@ -0,0 +1,6 @@ + +using LinearAlgebra, Random, DirectionalStatistics,AxisArrays +import Statistics: mean +include("Testing/ANOVA.jl") +include("Testing/dispersion.jl") +include("Testing/permutation_tests.jl") diff --git a/src/Testing/ANOVA.jl b/src/Testing/ANOVA.jl new file mode 100644 index 0000000..e43c501 --- /dev/null +++ b/src/Testing/ANOVA.jl @@ -0,0 +1,73 @@ + +# Compute F-statistic, given vector of vectors +#ANOVA +function f(R) + X = vcat(R...) + N = length(X) + nj = length.(R) + X̅ = mean(X) + X̅j = mean.(R) + k = length(R) + top = sum(nj .*(X̅j .- X̅) .^2) /(k-1) + bottom = sum([sum((R[i] .- X̅j[i]) .^2) for i in 1:k])/(N-k) + return top/bottom +end +function f_slow(R,N,nj,X̅,k) + X̅j = mean.(R) + top = sum(nj .*(X̅j .- X̅) .^2) /(k-1) + bottom = sum([sum((R[i] .- X̅j[i]) .^2) for i in 1:k])/(N-k) + return top/bottom +end + +function f(R,N,nj,X̅,k) + X̅j = mean.(R) + top = 0.0 + bottom = 0.0 + @inbounds for i in 1:k + top += nj[i] * (X̅j[i] - X̅)^2 + for j in 1:nj[i] + bottom += (R[i][j] - X̅j[i])^2 + end + end + top/= (k-1) + bottom /= (N-k) + return top/bottom +end + +#Pairwise ANOVA +function f_pairs(R) + n = length(R) + F = zeros(n,n) + for j in 1:n-1 + for i in j+1:n + F[i,j] = f([R[i],R[j]]) + end + end + return F +end +function f_pairs(R ::Vector,N ::Array{Int},nj ::Matrix{Tuple},X̅ ::Matrix{Float64}) + n = length(R) + F = zeros(n,n) + for j in 1:n-1 + for i in j+1:n + F[i,j] = f([R[i],R[j]],N[i,j],nj[i,j],X̅[i,j],2) + end + end + return F +end +# get parameter values corresponding to each pairwise combination of groups +function get_pars(R) + n = length(R) + N_p = Array{Int}(undef,n,n) + nj_p= Array{Tuple}(undef,n,n) + X̅_p = Array{Float64}(undef,n,n) + + for j in 1:n-1 + for i in j+1:n + N_p[i,j] = length(R[i]) + length(R[j]) + nj_p[i,j] = (length(R[i]) , length(R[j])) + X̅_p[i,j] = mean(vcat(R[i]...,R[j]...)) + end + end + return N_p,nj_p,X̅_p +end diff --git a/src/Testing/dispersion.jl b/src/Testing/dispersion.jl new file mode 100644 index 0000000..83cc72c --- /dev/null +++ b/src/Testing/dispersion.jl @@ -0,0 +1,98 @@ +# structs + +struct Disp + F ::Float64 + pairwise_F ::Array{Float64} + medians ::Union{Tuple,Vector} + residuals ::Vector{Matrix{Float64}} + means ::Vector{Float64} + group ::Vector + levels ::Vector + group_residuals ::Vector +end +#Helper functions + +# calculate distances from medians +function get_residuals(x,c) + d = x .-c + sum(d .^2,dims =2) +end + +# doube center matrix +function double_center(D) + A = D .- mean(D,dims = 1) + return A .- mean(A,dims = 2) +end + +# calculate medians +# Get spatial median as a row vector +geo_median(X) = transpose(DirectionalStatistics.geometric_median([row for row in eachrow(X)])) +#apply `geo_median` function to get positive_inds and negative_inds median for each group +function geo_median(pco_space, group, positive_inds) + + spMedPos = [geo_median(pco_space[group .== g,positive_inds]) for g in unique(group)] + spMedNeg = [geo_median(pco_space[group .== g, .!positive_inds]) for g in unique(group)] + + return (spMedPos,spMedNeg ) +end +function geo_median(pco_space, group) + + return [geo_median(pco_space[group .== g,:]) for g in unique(group)] +end + +function dispersion(D,group;metric = false) + """ + Quantify the dispersion around the group spatial median for each group in D, according to the given distance metric. + Once X is converted to a distance matrix, it is then transformed by principal coordinate analysis before medians and + distances are calculated. The algorithm is based on Anderson (2006). + + The function accepts: + D: A dissimiarity or distance matrix + group: A vector containing group labels + metric: (key word) boolean value specifying whether or not the distance used used metric + + This function returns a named tuple containing: + F = Global F-Statistic + pairwise_F = pairwise F-statistics + medians = spatial (aka geometric) median of each group in the transformed coordinates + residuals = vector containing each observations distance from its group median + means = vector containing the means distance to median for each group + group = the original grouping vector + levels = unique items from 'group' + + Anderson, M.J. (2006) Distance-based tests for homogeneity of multivariate dispersions. Biometrics 62(1), 245--253. + """ + levels = sort(unique(group)) + + if metric == false + # Double center the matrix. + A = double_center(D .^2 ) + vals, vecs = eigen(Hermitian(-A/2)) + pco_space = vecs * diagm(sqrt.(abs.(vals))) + # record indices corresponding to postitive eigenvalues + positive_inds = real.(vals) .> 0.0 + med = geo_median(pco_space,ones(size(pco_space)[1]),positive_inds) + medians = geo_median(pco_space, group, positive_inds) + # calculate distances (to median) for "positive_inds" and "negative_inds" vectors separately. in orer to + # subtract "negative_inds" from "positive_inds". See Anderson (2006) for details. + dis_pos = [get_residuals(pco_space[group .== levels[i],positive_inds], medians[1][i]) for i in 1:length(levels)] + dis_neg = [get_residuals(pco_space[group .== levels[i], .!positive_inds], medians[2][i]) for i in 1:length(levels)] + # Where dis_neg > dis_pos, set residual = 0 by taking only the real part + # of the square root of a negative. + residuals = [(real.(sqrt.(Complex.(dis_pos[i] .- dis_neg[i]))) ) for i in 1:length(dis_pos)] + group_dis_pos = get_residuals(vcat(medians[1]...), med[1][1]) + group_dis_neg = get_residuals(vcat(medians[2]...), med[2][1]) + group_residuals = [(real.(sqrt.(Complex.(group_dis_pos[i] .- group_dis_neg[i]))) ) for i in 1:length(group_dis_pos)] + + else + medians = geo_median(D, group) + med = geo_median(D,ones(size(D)[1])) + residuals = [get_residuals(D[group .== levels[i],:], medians[i]) for i in 1:length(levels)] + group_residuals = vec(get_residuals(vcat(medians...), med[1])) + end + F = f(residuals) + F_pairs = f_pairs(residuals) + means = AxisArray(mean.(residuals),string.(levels)) + return Disp(F, F_pairs, medians, residuals, means,group, levels,group_residuals) +end + diff --git a/src/Testing/permutation_tests.jl b/src/Testing/permutation_tests.jl new file mode 100644 index 0000000..1d147c0 --- /dev/null +++ b/src/Testing/permutation_tests.jl @@ -0,0 +1,86 @@ + +function permutest(disp ::Disp,n_perm = 10000) + """ + This function permutes the residuals returned by 'dispersion' to provide global and pairwise + P-values. Currently, no corrections are made for multiple testing. MultipleTesting.jl provides + this functionality, if desired + + The function accepts: + disp: The named tuple returned by 'dispersion' + n_perm: the number of permutations + + This function returns a named tuple containing: + P = Global P-value + pairwise_P = pairwise P-value + F = Global F-Statistic + pairwise_F = pairwise F-statistics + + https://github.com/juliangehring/MultipleTesting.jl + """ + # read in values from `disp` + F = disp.F + R = disp.residuals + F_pairs = disp.pairwise_F + group = disp.group + levels = disp.levels + level_names = string.(levels) + inds = [group .== level for level in levels] + n = length(levels) + + # pre-calculate values for ANOVA function + r = vcat(R...) + X = vcat(R...) + N = length(X) + nj = Tuple(length.(R)) + X̅ = mean(X) + k = length(R) + # generate empty containers for F values + perm = Vector{Float64}(undef,n_perm) + #rs = copy(R)#Vector{Vector}(undef,n) + # run permutation + @inbounds for p in 1:n_perm + shuffle!(r) + rs = [view(r,inds[i]) for i in 1:n] + + perm[p] =f(rs,N,nj,X̅,k) + end + ppairs =zeros(k,k) + + @inbounds for i in 1:k-1 + for j in i+1:k + r_1 = r[group .== levels[i]] + r_2 = r[group .== levels[j]] + pstat =permutest(r_1,r_2, F_pairs[j,i],n_perm) + ppairs[j,i] = pstat + end + end + # calculate P-values and return P and F values + P = sum(perm .> F)/n_perm + P_pairs = AxisArray(ppairs,level_names,level_names) + F_pairs = AxisArray(LowerTriangular(F_pairs), level_names,level_names) + + return (P =P,pairwise_P = P_pairs,F = F, pairwise_F =F_pairs) +end + +function permutest(r_1,r_2 ,F,n_perm = 1000) + r = vcat(r_1,r_2) + nj = (length(r_1),length(r_2)) + n = 2 + N = sum(nj) + # pre-calculate values for ANOVA function + X̅ = mean(r) + k = 2 + inds = (1:nj[1],1:nj[2]) + # generate empty containers for F values + perm = Vector{Float64}(undef,n_perm) + # run permutation + @inbounds for p in 1:n_perm + shuffle!(r) + rs = (view(r,inds[1]) ,view(r,inds[2]) ) + perm[p] =f(rs,N,nj,X̅,k) + end + P = sum(perm .> F)/n_perm + return P +end + + From d23d703d9f3a9fb6ccbe2f52f1061738d19af2cb Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 26 Apr 2022 00:29:39 +0100 Subject: [PATCH 2/4] initial mantel test implementation --- src/Testing/permutation_tests.jl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Testing/permutation_tests.jl b/src/Testing/permutation_tests.jl index 1d147c0..71624af 100644 --- a/src/Testing/permutation_tests.jl +++ b/src/Testing/permutation_tests.jl @@ -84,3 +84,24 @@ function permutest(r_1,r_2 ,F,n_perm = 1000) end +get_tri(x) = [x[i,j] for i in 2:size(x)[1] for j in 1:i] +function mantel(x_1,x_2, n_perm = 1000) + """ + A permutation based test of the correlation between two matrices. Given two dissimilarity/distance matrices of equal size, calculates the P-value as + the probability of obtaining the same or greater correlation coefficient after permuting one of the matrices. + """ + x = get_tri(x_1) + y = get_tri(x_2) + perm_c = Vector{Float64}(undef,n_perm) + + c = cor(x,y) + @inbounds for i in 1:n_perm + shuffle!(y) + perm_c[i] = cor(x,y) + end + + sum(perm_c .> c)/n_perm +end + + + From 082042ae11fef546150e3eb04215bd1fb809f878 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 26 Apr 2022 00:33:35 +0100 Subject: [PATCH 3/4] remove older slower anova --- src/Testing/ANOVA.jl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Testing/ANOVA.jl b/src/Testing/ANOVA.jl index e43c501..f66eb2b 100644 --- a/src/Testing/ANOVA.jl +++ b/src/Testing/ANOVA.jl @@ -12,12 +12,6 @@ function f(R) bottom = sum([sum((R[i] .- X̅j[i]) .^2) for i in 1:k])/(N-k) return top/bottom end -function f_slow(R,N,nj,X̅,k) - X̅j = mean.(R) - top = sum(nj .*(X̅j .- X̅) .^2) /(k-1) - bottom = sum([sum((R[i] .- X̅j[i]) .^2) for i in 1:k])/(N-k) - return top/bottom -end function f(R,N,nj,X̅,k) X̅j = mean.(R) From b8837b8095346c67de8eb3471edb2944d2fa86b8 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 26 Apr 2022 00:41:17 +0100 Subject: [PATCH 4/4] remove manifest --- Manifest.toml | 376 -------------------------------------------------- 1 file changed, 376 deletions(-) delete mode 100644 Manifest.toml diff --git a/Manifest.toml b/Manifest.toml deleted file mode 100644 index aea1570..0000000 --- a/Manifest.toml +++ /dev/null @@ -1,376 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.7.2" -manifest_format = "2.0" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" - -[[deps.ArrayInterface]] -deps = ["Compat", "IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"] -git-tree-sha1 = "c933ce606f6535a7c7b98e1d86d5d1014f730596" -uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "5.0.7" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[deps.AxisArrays]] -deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] -git-tree-sha1 = "cf6875678085aed97f52bfc493baaebeb6d40bcb" -uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" -version = "0.4.5" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "9950387274246d08af38f6eef8cb5480862a435f" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.14.0" - -[[deps.ChangesOfVariables]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] -git-tree-sha1 = "bf98fa45a0a4cee295de98d4c1462be26345b9a1" -uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" -version = "0.1.2" - -[[deps.Compat]] -deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] -git-tree-sha1 = "b153278a25dd42c65abbf4e62344f9d22e59191b" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "3.43.0" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" - -[[deps.Crayons]] -git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" -uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" -version = "4.1.1" - -[[deps.DataAPI]] -git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.10.0" - -[[deps.DataFrames]] -deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] -git-tree-sha1 = "6c19003824cbebd804a51211fd3bbd81bf1ecad5" -uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "1.3.3" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "3daef5523dd2e769dad2365274f760ff5f282c7d" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.11" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[deps.DelimitedFiles]] -deps = ["Mmap"] -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" - -[[deps.DirectionalStatistics]] -deps = ["IntervalSets", "LinearAlgebra", "Statistics", "StatsBase"] -git-tree-sha1 = "3624a586028a7ed87907baab3b55fb43bb032ced" -uuid = "e814f24e-44b0-11e9-2fd5-aba2b6113d95" -version = "0.1.7" - -[[deps.Distances]] -deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" -uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.7" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.8.6" - -[[deps.Downloads]] -deps = ["ArgTools", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" - -[[deps.EcoBase]] -deps = ["RecipesBase"] -git-tree-sha1 = "a4d5b263972e820e780effc2084f92399ba44ee3" -uuid = "a58aae7d-b440-5a11-b283-399458f99aac" -version = "0.1.6" - -[[deps.EllipsisNotation]] -deps = ["ArrayInterface"] -git-tree-sha1 = "d064b0340db45d48893e7604ec95e7a2dc9da904" -uuid = "da5c29d0-fa7d-589e-88eb-ea29b0a81949" -version = "1.5.0" - -[[deps.Formatting]] -deps = ["Printf"] -git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" -uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" -version = "0.4.2" - -[[deps.Future]] -deps = ["Random"] -uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" - -[[deps.IfElse]] -git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" -uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" -version = "0.1.1" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[deps.IntervalSets]] -deps = ["Dates", "EllipsisNotation", "Statistics"] -git-tree-sha1 = "bcf640979ee55b652f3b01650444eb7bbe3ea837" -uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.5.4" - -[[deps.InverseFunctions]] -deps = ["Test"] -git-tree-sha1 = "91b5dcf362c5add98049e6c29ee756910b03051d" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.3" - -[[deps.InvertedIndices]] -git-tree-sha1 = "bee5f1ef5bf65df56bdd2e40447590b272a5471f" -uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" -version = "1.1.0" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.1.1" - -[[deps.IterTools]] -git-tree-sha1 = "fa6287a4469f5e048d763df38279ee729fbd44e5" -uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" -version = "1.4.0" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" - -[[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "a970d55c2ad8084ca317a4658ba6ce99b7523571" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.12" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" - -[[deps.Missings]] -deps = ["DataAPI"] -git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.0.2" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" - -[[deps.OrderedCollections]] -git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.4.1" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" - -[[deps.PooledArrays]] -deps = ["DataAPI", "Future"] -git-tree-sha1 = "28ef6c7ce353f0b35d0df0d5930e0d072c1f5b9b" -uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" -version = "1.4.1" - -[[deps.PrettyTables]] -deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"] -git-tree-sha1 = "dfb54c4e414caa595a1f2ed759b160f5a3ddcba5" -uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" -version = "1.3.1" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[deps.Random]] -deps = ["SHA", "Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[deps.RangeArrays]] -git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" -uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" -version = "0.3.2" - -[[deps.RecipesBase]] -git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.2.1" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[deps.SortingAlgorithms]] -deps = ["DataStructures"] -git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" -uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.0.1" - -[[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[deps.Static]] -deps = ["IfElse"] -git-tree-sha1 = "2114b1d8517764a8c4625a2e97f40640c7a301a7" -uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "0.6.1" - -[[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.StatsAPI]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "c82aaa13b44ea00134f8c9c89819477bd3986ecd" -uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.3.0" - -[[deps.StatsBase]] -deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "8977b17906b0a1cc74ab2e3a05faa16cf08a8291" -uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.33.16" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] -git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.7.0" - -[[deps.Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" - -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"