I am trying to do some exploratory bioinformatics on TCGA data using fgsea.

Our lab looks at a specific gene so I was trying to see whether high levels of this gene in TCGA expression data is correlated with enrichment of any genesets. I have been preranking the data using DeSeq2 (and using the F stat as a ranking) and was wondering how I should set up the design.

Because it is a continuous variable I could plug in the scaled normalised counts for this gene straight into the DeSeq2 design or I could split the expression into low/high groups and then run the DeSeq2 to calculate the difference between low/high.

I was wondering whether which of these (if either) is more acceptable?
I assume using the continuous variable makes the most sense but I have only seen it done by splitting the expression into two groups by other bioinformatics.
Is the Wald test with DeSeq2 the most appropriate tool to do this with?

I have run both methods using the hallmark genesets and see very different ranking and similar but slightly different ES results. What are peoples' thoughts?


![NES from HALLMARK][1]
![enter image description here][2]


  [1]: https://i.imgur.com/ZY9JNs5.png
  [2]: https://i.imgur.com/NO9R1Ii.png
Personally, I think the low/high stratification isn't ideal because you lose information about the expression of your gene of interest (you're collapsing everything into two values: low or high). I prefer the continuous design (edit: however, please see discussion below; important caveats).

An alternate approach would be to calculate the pair-wise correlation between every gene with respect to your gene of interest (using normalized count values); you can use the correlation coefficients are your ranking. Whether this is "better" than using the deseq2 statistic, I don't know. There are many ways to analyze data and the answer of what is "most acceptable" is not always clear or easy.