| write_gmt | R Documentation |
Write gene-sets in a GMT-list form into GMT files.
write_gmt(gmt, file, description = NULL)
gmt |
A list of gene sets. It can be either (1) a list with each item is a list of three components, named ‘name’, ‘description’ and ‘genes’, or (2) a list of gene identifiers. |
file |
The GMT file to create |
description |
Description, used in case |
This function can be used, for instance, to combine multiple GMT files into a new one.
Invisible NULL when the file is successfully created. Otherwise an error message will be printed.
Jitao David Zhang <jitao_david.zhang@roche.com>
idir <- system.file("extdata", package="ribiosIO")
sample.gmt.file <- file.path(idir, "test.gmt")
test.gmt <- read_gmt_list(sample.gmt.file)
outgmt.file <- paste(tempfile(), ".gmt", sep="")
write_gmt(test.gmt[1:2], file=outgmt.file)
## a list of identifiers
testList <- list(A=LETTERS[3:5], B=LETTERS[4:7], C=12:9)
write_gmt(testList, file=outgmt.file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.