is_efo_id2: Is a string an EFO trait ID in the broad sense?

View source: R/parse-utils.R

is_efo_id2R Documentation

Is a string an EFO trait ID in the broad sense?

Description

This function is more permissible than is_efo_id. This function matches EFO trait IDs against the following regular expression: ^\\w+$. This is very forgiving on the input, any sequence of word characters are ok. This is useful to match EFO identifiers that do not follow the regex ^EFO_\\d{7}$, such as: 'GO_0097334', 'HP_0001268', 'Orphanet_182098', and 'NCIT_C74532'.

Usage

is_efo_id2(str, convert_NA_to_FALSE = TRUE)

Arguments

str

A character vector of strings.

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.