writeGMT | R Documentation |
Writes a GMT (Gene Matrix Transposed) file from a data frame.
writeGMT(df, outfile)
df |
Data frame with columns ordered as Identifiers, optional Description column and Genes. Identifiers must be first and Genes must be last. |
outfile |
Path to output GMT file |
The input data frame must include at least two columns: Identifiers (first column) and Genes (last column). The Identifiers will be duplicated to fill the Description column in the output GMT file if none is provided. If more than three columns are provided, then the first n columns will be concatenated with number of columns.
None
Adapted from the GMT writer in MAGeCKFlute, https://github.com/WubingZhang/MAGeCKFlute/blob/master/R/readGMT.R
readPathwayGMT
#my.df <- data.frame(id=c("WP1000","WP1000","WP1000","WP1001","WP1001"),
# description=c("cancer","cancer","cancer","diabetes","diabetes"),
# gene=c("574413","2167","4690","5781","11184"))
#writeGMT(my.df, "my_gmt_file.gmt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.