Phased genotypes (see phased in gen_tibble()) are recognised by the
code256 of their file backed matrix, which is identical to code_phased.
Arguments
- .x
a
gen_tibble, or itsgenotypescolumn.
Examples
example_gt <- load_example_gt("gen_tbl")
is_phased(example_gt)
#> [1] FALSE
vcf_path <- system.file("extdata", "phased_example.vcf",
package = "tidypopgen"
)
x <- gen_tibble(vcf_path,
phased = TRUE,
backingfile = tempfile("phased_"),
quiet = TRUE
)
is_phased(x)
#> [1] TRUE
