[FEATURE] gProfiler separate enrichment for up and down-regulated genes
Is your feature request related to a problem? Please describe
Currently, gProfiler checks if all differentially expressed genes are enriched for something. This is useful to find the general trend of changes, like TF - the genes both up- and down- regulated are controlled by STAT3.
However, there is useful information in seeing the genes that are up-regulated or down-regulated.
Describe the solution you'd like
Expand the gProfiler module in the following manner
- Have a flag for split to up/down (True/False)
- Add an opt flag to designate the abundance change opt$de_degree (default log2FoldChange)
- Copy the code that identifies the query genes
query <- de.genes[[opt\$de_id_column]]and modify it to look something like thisquery <- de.genes[[opt\$de_id_column]] query_up <- de.genes[[opt\$de_id_column]][de.genes[[opt\$de_degree]] > 0] query_down <- de.genes[[opt\$de_id_column]][de.genes[[opt\$de_degree]] < 0]
Then generate equivalent output files for query_up and query_down
And repeat everything else. The threshold is written as 0, but should probably consider if the values are logged or not - if the values are not logged, set the threshold as 1
Describe alternatives you've considered
- Running the module and filtering the genes to begin with. This would be troublesome to do manually.
- If the flag is set, have a filtering step, which will output differentially.expressed.filtered.up.tsv and differentially.expressed.filtered.down.tsv. Call grpofiler an extra two times, once for up file and once for down file.
I believe gProfiler allows lists, so it might be easier to run all, up, down together.
Additional context
I'd be happy to try and implement this after discussion of the alternatives.