View source: R/close_matching_samples.R
close_matching_samples | R Documentation |
Super simple function that looks at all pairs of fish from the data frame and returns a tibble that includes those which shared a fraction >= than min_frac_non_miss of the genotypes not missing in either fish, and which were matching at a fraction >= min_frac_matching of those non-missing pairs of genotypes.
close_matching_samples(
D,
gen_start_col,
min_frac_non_miss = 0.7,
min_frac_matching = 0.9
)
D |
a two-column format genetic dataset, with "repunit", "collection", and "indiv" columns, as well as a "sample_type" column that has entried either of "reference" or "mixture" or both. |
gen_start_col |
the first column of genetic data in |
min_frac_non_miss |
the fraction of loci that the pair must share non missing in order to be reported |
min_frac_matching |
the fraction of shared non-missing loci that must be shared between the indivdiuals to be reported as a matching pair. |
a tibble ...
# one pair found in the interal alewife data set:
close_matching_samples(alewife, 17)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.