helper_transcriptNames_make {act} | R Documentation |
Helper: Makes valid names for all transcripts in a corpus
Description
Makes valid names for all transcript objects in a corpus object based on the names passed in 'transcriptNames' parameter. In particular, the functions also corrects names, which have to be non-empty and unique. The following options are performed in the mentioned order.
Usage
helper_transcriptNames_make(
transcriptNames,
searchPatterns = character(),
searchReplacements = character(),
toUpperCase = FALSE,
toLowerCase = FALSE,
trim = FALSE,
defaultForEmptyNames = "no_name"
)
Arguments
transcriptNames |
Vector of character strings; Names of the transcripts to validate. |
searchPatterns |
Vector of character strings; Search pattern as regular expression. Leave empty for no search-replace in the names. |
searchReplacements |
Vector of character strings; Replacements for search. Leave empty for no search-replace in the names. |
toUpperCase |
Logical; Convert transcript names all to upper case. |
toLowerCase |
Logical; Convert transcript names all to lower case. |
trim |
Logical; Remove leading and trailing spaces in names. |
defaultForEmptyNames |
Character string; Default value for empty transcript names (e.g., resulting from search-replace operations) |
Value
List
Examples
library(act)
# make some names with an empty value "" and a duplivate "d"
transcriptNames <- c("a", "b", "", "d", "d")
act::helper_transcriptNames_make(transcriptNames)