Convert DAVID gene-sets to GMT format

Instructions

R Script

file.name <- "..."

gs.df <- read.table (
                        file = file.name,
                        sep  = "\t", header = F, 
                        stringsAsFactors = F,
                        col.names = c ("Eg.ID", "Gs.ID")
                        )

gs.ls <- unstack (gs.df, form = Eg.ID ~ Gs.ID)

cat (
        paste (
                names (gs.ls), names (gs.ls), 
                sapply (gs.ls, paste, collapse = "\t"),
                sep = "\t"
                ), 
        sep = "\n",     
        file = "DAVID.GMT"
        )       

Software/EnrichmentMap/DAVIDgs_R (last edited 2010-10-08 21:02:48 by DanieleMerico)

MoinMoin Appliance - Powered by TurnKey Linux