R/ReadGMT.R

Defines functions ReadGMT

Documented in ReadGMT

ReadGMT<-
function(path)
        {
        	#=="input": path of the .gmt file of interest
        	#=="output": list of the gene groups of interest
        	gene.sets.lines=readLines(path)
        	gene.sets.list=lapply(gene.sets.lines,function(x) {unlist(strsplit(x, "\t"))})
        	gene.ids.list.names=unlist(lapply(gene.sets.list,function(x){aux=x[1]}))
	        gene.ids.list.grps=lapply(gene.sets.list,function(x){aux=x[-c(1:2)]})              
	        names(gene.ids.list.grps)=gene.ids.list.names
	        return(gene.ids.list.grps)
        }

Try the BAGS package in your browser

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

BAGS documentation built on Nov. 8, 2020, 11:11 p.m.