Skip to main content

KinshipPostHocs.jl

PopGen.jl/src/Kinship/KinshipPostHocs.jl

📦 not exported🔵 exported by PopGen.jl

📦 sig_within

sig_within(data::PopData, results::DataFrame, population::String, iterations::Int = 20000)

🔵 kinshipposthoc

kinshipposthoc(::PopData, results::Union{DataFrame, NamedTuple}; iterations::Int)

Performs a posthoc analysis using the resulting DataFrame or NamedTuple from kinship(). This analysis uses permutations to test if a population has significantly higher within-population kinship than between-population kinship. The results object must have been generated from the provided PopData. Use iterations = to specify the number of iterations for the permutation tests (default = 20000). Recommended that you use MultipleTesting.jl to correct resulting P-values.

Example

julia> cats = @nancycats ;
julia> rel_out = kinship(cats, method = [Ritland, Moran], iterations = 100);
julia> kinshipposthoc(cats, rel_out)
17x3 DataFrame
Row │ population Ritland_P Moran_P
│ String Float64 Float64
─────┼────────────────────────────────
11 5.0e-5 5.0e-5
22 5.0e-5 5.0e-5
33 5.0e-5 5.0e-5
44 5.0e-5 5.0e-5
55 5.0e-5 5.0e-5
66 5.0e-5 5.0e-5
77 5.0e-5 5.0e-5
88 5.0e-5 5.0e-5
99 5.0e-5 5.0e-5
1010 5.0e-5 5.0e-5
1111 5.0e-5 5.0e-5
1212 5.0e-5 5.0e-5
1313 5.0e-5 5.0e-5
1414 5.0e-5 5.0e-5
1515 5.0e-5 5.0e-5
1616 5.0e-5 5.0e-5
1717 5.0e-5 5.0e-5