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 May 6, 2019, 9:27 a.m.