is_human_chromosome: Is a string a human chromosome name?

View source: R/parse-utils.R

is_human_chromosomeR Documentation

Is a string a human chromosome name?

Description

Find which strings are valid human chromosome names. The valid chromosome names can be specified via the argument chromosomes.

Usage

is_human_chromosome(
  string,
  chromosomes = c(seq_len(22), "X", "Y", "MT"),
  convert_NA_to_FALSE = TRUE
)

Arguments

string

A character vector of strings.

chromosomes

A character vector of valid chromosome names. Default is autosomal chromosomes 1 thru 22 and, X, Y, and MT.

convert_NA_to_FALSE

Whether to treat NA as NA (convert_NA_to_FALSE = FALSE) or whether to return FALSE when an NA is found (convert_NA_to_FALSE = TRUE).

Value

A logical vector.


gwasrapidd documentation built on May 29, 2024, 4:31 a.m.