pathwayCollection
Object to a .gmt
Filewrite_gmt.Rd
Write a pathwayCollection
object as a pathways list file
in Gene Matrix Transposed (.gmt
) format.
write_gmt(pathwayCollection, file, setType = c("pathways", "genes", "regions"))
pathwayCollection | A
|
---|---|
file | Either a character string naming a file or a connection open for
writing. File names should end in |
setType | What is the type of the set: pathway set of gene, gene sites
in RNA or DNA, or regions of CpGs. Defaults to |
NULL. Output written to the file path specified.
See the Broad Institute's "Data Formats" page for a description of the Gene Matrix Transposed file format: https://software.broadinstitute.org/cancer/software/gsea/wiki/index.php/Data_formats#GMT:_Gene_Matrix_Transposed_file_format_.28.2A.gmt.29
# Toy pathway set toy_pathwayCollection <- list( pathways = list( c("C1orf27", "NR5A1", "BLOC1S4", "C4orf50"), c("TARS2", "DUSP5", "GPR88"), c("TRX-CAT3-1", "LINC01333", "LINC01499", "LINC01046", "LINC01149") ), TERMS = c("C-or-f_paths", "randomPath2", "randomLINCs"), description = c("these are", "totally made up", "pathways") ) class(toy_pathwayCollection) <- c("pathwayCollection", "list") toy_pathwayCollection#> Object with Class(es) 'pathwayCollection', 'list' [package 'pathwayPCA'] with 3 elements: #> $ pathways :List of 3 #> $ TERMS : chr [1:3] "C-or-f_paths" ... #> $ description: chr [1:3] "these are" ...# write_gmt(toy_pathwayCollection, file = "example_pathway.gmt")