upperSquish: Convert values to uppercase and remove punctuation

View source: R/makeQueryTable.R

upperSquishR Documentation

Convert values to uppercase and remove punctuation

Description

Convert a character vector to uppercase and remove dashes, spaces and dots. Values are NA if the new value is identical to the original value and are only converted if there the original value has 2 segments separated by, punctuation, e.g. "IFN-g" would become "IFNG" but "IFN-g R alpha-chain" would have new value NA. Punctuation is not removed if it separates groups of numbers, e.g. "CD3.1"

Usage

upperSquish(ab)

Arguments

ab

(character(n)) A vector of strings to transform

Value

The character vector ab, converted to uppercase and with some patterns of punctuation removed. NAs are returned in positions where entries of ab are unchanged by formatting.

A character vector of the same length as the input vector, where entries have been converted to upper case and punctuation that matches common gene name alias patterns has been removed.

Author(s)

Helen Lindsay

Examples

upperSquish(c("CD3-A", "IL-2Rb", "CD4"))
upperSquish(c("CD3-A", "IL-2Rb"))

HelenLindsay/AbNames documentation built on June 6, 2023, 1:18 p.m.