View source: R/mhc_allele_name_to_regex.R
| mhc_allele_name_to_regex | R Documentation |
mhc_allele_name to a regular expression to detect itConvert an mhc_allele_name to a regular expression to detect it
mhc_allele_name_to_regex(mhc_allele_name)
mhc_allele_name |
name of an MHC allele |
the regular expression to detect that mhc_allele_name
Richèl J.C. Bilderbeek
mhc_allele_name <- "HLA-DRB*01:01" mhc_allele_name_regex <- mhc_allele_name_to_regex(mhc_allele_name) # Can detect the regex stringr::str_detect( string = "HLA-DRB*01:01", pattern = mhc_allele_name_regex ) # Will not detect a match to the regex stringr::str_detect( string = "HLA-DRB.01:01", # replaced asterisk by dot pattern = mhc_allele_name_regex )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.