R/probeAnnotation.R

Defines functions probeAnnotation

##' @export
probeAnnotation <- function(probes, platformSYMBOL){
	x <- platformSYMBOL
	# Convert to a list
	xx <- AnnotationDbi::as.list(x)
	
	matchProbeIndex = match(probes,names(xx))
	naive <- function(x){
		if(is.null(x)){
			return(NA)
		}
		return(x)
	}
	geneNames = sapply(xx[matchProbeIndex],naive)
	geneNames
}

## examples
## allProbes <- rownames(data_GSE4922)
## wholeGenes = probeAnnotation(allProbes)
Caleb-Huo/genomicLibrary documentation built on June 4, 2020, 3:54 a.m.