Skip to content

Add the option to generate complementary subgenic regions#396

Merged
FerriolCalvet merged 2 commits intodevfrom
add-domain-negative
Nov 28, 2025
Merged

Add the option to generate complementary subgenic regions#396
FerriolCalvet merged 2 commits intodevfrom
add-domain-negative

Conversation

@FerriolCalvet
Copy link
Copy Markdown
Member

@FerriolCalvet FerriolCalvet commented Nov 27, 2025

Update the add_hotspots.py script so that for each new subgenic region it also generates a new subgenic regions with the complementary part of the gene for the region, meaning a new region that contains all the positions of the gene except that specific domain/exon/subgenic region

  • tested with domains, but not with exons

AI summary

This pull request adds support for generating complements of subgenic regions in the pipeline. The main changes introduce a new parameter, update configuration files, and modify the process to handle this new option.

Support for subgenic regions complement:

  • Added a new boolean parameter omega_subgenic_regions_complement to nextflow.config to control whether complements for subgenic regions should be generated.
  • Updated nextflow_schema.json to include documentation and UI metadata for the new omega_subgenic_regions_complement parameter.

Pipeline process updates:

  • Modified the EXPAND_REGIONS process in modules/local/expand_regions/main.nf to pass the --subgenic-regions-complement flag to add_hotspots.py when the new parameter is enabled.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for generating "negative" (complementary) regions for subgenic regions in the omega workflow. When enabled, for each subgenic region (domain/exon), the system will also create a region containing all positions of the gene except those in that specific subgenic region.

Key changes:

  • Added new boolean parameter omega_negative_regions to control negative region generation
  • Updated workflow to pass the --negative-regions flag when the parameter is enabled
  • Implemented logic in add_hotspots.py to compute and output negative regions

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
nextflow_schema.json Documents the new omega_negative_regions parameter with description and help text
nextflow.config Adds the omega_negative_regions parameter with default value of false
modules/local/expand_regions/main.nf Passes the --negative-regions flag to the Python script based on the parameter value
bin/add_hotspots.py Implements the core logic to generate negative regions by computing gene positions that exclude the subgenic region

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nextflow_schema.json Outdated
@FerriolCalvet
Copy link
Copy Markdown
Member Author

This is how the result looks for some normal bladder test data:

TP53    all_samples     missense        71      8.981347656250017       0.0     6.9526096761226786      11.417260742187517
TP53    all_samples     truncating      9       7.606250000000015       5.6028366e-06   3.6180332946777414      13.941088867187517
TP53--P53       all_samples     missense        62      11.862500000000026      0.0     9.02452651977541        15.307324218750026
TP53--P53       all_samples     truncating      7       10.337500762939474      8.285046e-06    4.400952777992943       20.282569122314474
TP53--P53--negative     all_samples     missense        9       3.349609375000005       0.0026348233    1.6015325927734398      6.082763671875005
TP53--P53--negative     all_samples     truncating      2       4.532910156250008       0.08774614      0.7509357213974011      14.158154296875008
TP53--P53_TAD--negative all_samples     missense        70      8.836718750000017       0.0     6.828295440673841       11.250659179687517
TP53--P53_TAD--negative all_samples     truncating      9       7.9000000000000155      4.172325e-06    3.7546679687500073      14.469213867187516
TP53--P53_tetramer--negative    all_samples     missense        71      9.007812500000018       0.0     6.972540702819838       11.452270507812518
TP53--P53_tetramer--negative    all_samples     truncating      9       7.8687484741211104      4.2915344e-06   3.7417543413490133      14.425755310058612
TP53--TAD2      all_samples     missense        2       0.7246097564697264      0.6320096       0.12026205226778983     2.254761123657226
TP53--TAD2      all_samples     truncating      1       3.814059448242194       0.2758609       0.21524832472205196     17.552462768554694
TP53--TAD2--negative    all_samples     missense        69      13.087500000000027      0.0     10.097490539550803      16.684301757812527
TP53--TAD2--negative    all_samples     truncating      8       9.987304687500021       2.4437904e-06   4.521831691265115       18.86120605468752

@FerriolCalvet FerriolCalvet changed the title Add the option to generate "negative" subgenic regions Add the option to generate complementary subgenic regions Nov 27, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@FerriolCalvet FerriolCalvet merged commit 0bea730 into dev Nov 28, 2025
6 checks passed
@FerriolCalvet FerriolCalvet deleted the add-domain-negative branch November 28, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants