The function first filters individuals in data then include the strata.

join_strata(data, strata = NULL, pop.id = FALSE, verbose = TRUE)

Arguments

data

A tidy dataset object. Documented in tidy_genomic_data.

strata

(path or object) The strata file or object. Additional documentation is available in read_strata. Use that function to whitelist/blacklist populations/individuals. Option to set pop.levels/pop.labels is also available.

pop.id

(logical) When pop.id = TRUE, the strata returns the stratification colname POP_ID. Default: pop.id = FALSE, returns STRATA.

verbose

(optional, logical) When verbose = TRUE the function is a little more chatty during execution. Default: verbose = TRUE.

Value

The data filtered by the strata by individuals.

Author

Thierry Gosselin thierrygosselin@icloud.com

Examples

if (FALSE) {
data <- radiator::join_strata(
    data = my_tidy_dataset_object,
    strata = my_strata_object)
}