Learn R Programming

tidypopgen (version 0.4.3)

is_loci_table_ordered: Test if the loci table is ordered

Description

This functions checks that all SNPs in a chromosome are adjacent in the loci table, and that positions are sorted within chromosomes.

Usage

is_loci_table_ordered(
  .x,
  error_on_false = FALSE,
  ignore_genetic_dist = TRUE,
  ...
)

# S3 method for tbl_df is_loci_table_ordered( .x, error_on_false = FALSE, ignore_genetic_dist = TRUE, ... )

# S3 method for vctrs_bigSNP is_loci_table_ordered( .x, error_on_false = FALSE, ignore_genetic_dist = TRUE, ... )

Value

a logical vector defining which loci are transversions

Arguments

.x

a vector of class vctrs_bigSNP (usually the genotype column of a gen_tibble object), or a gen_tibble.

error_on_false

logical, if TRUE an error is thrown if the loci are not ordered.

ignore_genetic_dist

logical, if TRUE the physical position is not checked.

...

other arguments passed to specific methods.

Examples

Run this code
example_gt <- load_example_gt("gen_tbl")

example_gt %>% is_loci_table_ordered()

Run the code above in your browser using DataLab