WriteSignatures: Write signatures in .gmt format

View source: R/WriteSignatures.R

WriteSignaturesR Documentation

Write signatures in .gmt format

Description

This function writes signature lists in the .gmt format.

Usage

WriteSignatures(
  signature.list,
  file,
  comment = "cell type gene signature",
  append = F
)

Arguments

file

character(1). The address/name of the file from which signatures are read.

comment

character(n). What should be written in the comment second column in the gmt file. Recycled circularly if less than the number of signatures. Default: "cell type gene signature".

append

logical(1). Should the signatures be appended to an existing file rather than overwrite. Default: FALSE.

signatures

Named list of character vectors, in which the names of the list elements are the signature names, and the chr vectors are the corresponding gene collections.

Examples

signature.list <- list()
signature.list[["TC"]] <- c("CD3D","CD3E","CD3G","CD4","CD8A","CD8B","GZMA","IFNG","NCAM1","KLRK1","JAK3")
signature.list[["BC"]] <- c("IGHM","CD79A","CD79B","MZB1","DERL3","IGLL5","MS4A1","IGHD","IGHG1","IGHG3")
signature.list[["MP"]] <- c("CD74","HLA-DRA","HLA-DRB1","CD68","ITGAX","CD14","FCGR1A","MRC1","LYZ")
signature.list[["EP"]] <- c("EPCAM","PHGR1","TFF3","CKB","AGR2","PLCG2","CDX2","PIGR","PHGR1","CD24","LGALS4","GPX2","CEACAM6","CLDN3","KRT8","KRT19","KRT18","TSPAN8","OLFM4","FABP1","REG1A")
signature.list[["CAF"]]<- c("LOXL2","TAGLN","COL6A1","ITGA1","MMP1","MMP3","ACTA2","COL1A1","CALD1","COL3A1","COL1A2","COL6A3","COL6A2","THY1","DCN","COL5A2","COL5A1","PDGFRB")
signature.list[["EC"]] <- c("CD34","PECAM1","LYVE1","PLVAP","RAMP2","VWF","ESM1","FLT1","PODXL","GNG11","ENG","SLC9A3R2","HSPG2")
WriteSignatures(signature.list,"MyFile.gmt")
signature.list2 <- ReadSignatures("MyFile.gmt")

nbroguiere/burgertools documentation built on Jan. 30, 2024, 3:48 a.m.