I’m trying to analyze my counts data with DESeq2 and based on the tutorial of GSEA, DESeq2 has an output format that can be used directly in the GSEA (here). However, I’m reading their workflow and I don’t find how to make this gct output format.
Any help is appreciated.
In this case you have to prepare the gct file “by hand” for analyze your data with GSEA. Once you have created your DESeq object (dds) you are going to retrieve the normalized counts based on the DESeq method:
norm_counts <- counts(dds, normalized = T)
Then, you must arrange this normalized counts matrix according to the minimum requirements for a GCT file.
I suggest you to codificate the norm_counts as a data.frame and add an extra column called description (this column could contain the id’s of your genes):
Finally, using a plain text editor put all the additional information (following the directions of the link) to have a gct file for GSEA.
For a detailed tutorial about gct and cls files watch this video but please follow the directions of the link
Hope it could help!
I would like to offer an alternative answer. Neither the cls nor the gct file need to be created by hand nor is manual editing in a plain text editor required. Both files can be generated from code in R. For example, the gct file can be written as follows (which assumes the first two columns of norm_counts are the gene name and description):