Create a function to convert gene or protein IDs
Creates a function based on an
AnnotationDb package. This
package accepts a vector of input IDs and returns a vector of output IDs.
If an input ID cannot be mapped to an output ID, to output vector will be
one element shorter. This behaviour can be changed by setting the additional
na.rm argument to
FALSE. Likewise, if an input ID maps to
multiple output IDs, the output vector will contain all of the latter. If
you really need the output vector to have the same length as the input
vector, you can set the
drop.ambiguous argument to
createIDConverter(annotationPackageName, from, to)
The name of the
The ID type to convert from. This should be one of the available
keytypes in the
The ID type to convert to. This should be one of the available
columns in the
A function which takes a vector of input IDs as single argument and returns another vector with the converted IDs.
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.