nf-core / nf-core/modules

[FEATURE] gProfiler separate enrichment for up and down-regulated genes

Open
#8,700 1 comment 0 reactions 1 assignee View on GitHub

@akaviaLab is already working on this.

Since Aug 6, 2025.

Dominant language
Nextflow
Stars
429
Forks
1.1k
Avg merge
1d 6h
Merged PRs (30d)
153

Description

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 this
    query <- 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
  1. Running the module and filtering the genes to begin with. This would be troublesome to do manually.
  2. 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.