Similar to: How to convert data in gmt format to dataframe?
I have downloaded a GMT file from the GSEA database (https://www.gsea-msigdb.org/gsea/msigdb/download_file.jsp?filePath=/msigdb/release/2022.1.Hs/c2.all.v2022.1.Hs.symbols.gmt)
I have imported this into R using the GSA.read.gmt tool from GSA as I want to do pathway analysis using GAUSS (https://github.com/diptavo/GAUSS/blob/master/example_gmt.txt).
GAUSS needs the table to have the genes in a comma separated manner as well as there being headers in the table.
I have tried using the gsub function on the third column but it doesn't work, I feel this is because a GMT file is not the same as a dataframe.
Would anyone be able to help me turn this column into a comma separated one please?
Many thanks