R/parseGmt.R

Defines functions parseGmt

Documented in parseGmt

parseGmt <-function(file){

	input <- readLines(file)
	input <- strsplit(input, split="\t")
	nms <- sapply(input,function(x){
			return(x[1])
		})
	geneSets <- lapply(input,function(x){
			return(x[3:length(x)])
		})
	names(geneSets) <- nms

	return(geneSets)
}

Try the GiANT package in your browser

Any scripts or data that you put into this service are public.

GiANT documentation built on Oct. 23, 2020, 7:56 p.m.