The function will identify which package should be used by concatenating the character string illumina with the value of the annotation slot of the object, or the annotation argument passed in. If this package is not installed on the users computer, then the function will fail.
Assuming the package has been correctly loaded, the character vector toAdd
is converted to the names of environments within the package. These environments are then queried with the featureNames
of the input object. The result of each query is converted to a data frame and merged with the original feature data of the object.
Alternatively, rather than querying from an annotation pacakge, a pre-prepared data frame can be used.