R/createGOMatrix.R

Defines functions createGOMatrix

Documented in createGOMatrix

createGOMatrix <- function(cMembers){
  proteins = unique(unlist(cMembers))
  goId = names(cMembers)
  goMat <- matrix(0, nrow=length(proteins), ncol=length(cMembers))
  dimnames(goMat) <- list(proteins, goId)
  
  for(i in 1:length(cMembers)){      
    goMat[cMembers[[i]], goId[i]] = 1
  }
  goMat
}

Try the ScISI package in your browser

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

ScISI documentation built on Nov. 8, 2020, 5:48 p.m.