Convert nuID to Nucleotide Sequence

Description

The function nuIDdecode converts a nuID string back to the nucleotide sequence it encodes. nuIDs are identifiers used as primary keys in some Illumina annotation packages, and are based on a hash of the probe sequence itself.

Usage

nuIDdecode(id, error = TRUE)

Arguments

id
nuID character vector
error
a logical indicating whether an error should be thrown in case of invalid input nuID (default) or only a warning, as in the original function lumi::id2seq.

Source

function lumi::id2seq in the lumi package

Details

This function is an adapted version of the lumi::id2seq from the lumi package, so that it can throws errors instead of warnings. It is used in idtype to infer the type of nuID vectors.

References

Du P, Kibbe Wa and Lin SM (2007). "nuID: a universal naming scheme of oligonucleotides for illumina, affymetrix, and other microarrays." _Biology direct_, *2*, pp. 16. ISSN 1745-6150, , .

Examples


nuIDdecode('XERDqYYc2A')
## [1] "ACACACAATGGGCGACGACTATCGA"
try(nuIDdecode('XERDqYYc2F'))
nuIDdecode('XERDqYYc2F', error=FALSE)
## Warning: Coding error or not a nuID!
## [1] "ACACACAATGGGCGACGACTATCGA"

Author

Pan Du Adaptation for CellMix: Renaud Gaujoux