Skip to content

Alter operation grouping to minimise number of jobs - #260

Merged
annacuomo merged 4 commits into
mainfrom
high_throughput
Oct 15, 2025
Merged

Alter operation grouping to minimise number of jobs#260
annacuomo merged 4 commits into
mainfrom
high_throughput

Conversation

@MattWellie

Copy link
Copy Markdown
Contributor
  • the current approach is creating one or two additional QOB jobs per gene, loading the chromosome MT in and running gene-specific filtering
  • this is causing some batch chaos

This change mirrors the approach here: https://github.com/populationgenomics/saige-tenk10k/blob/main/saige_assoc_set_test.py#L275-L282

  • the only gene-specific arguments to make_group_file are the gene name and the output file, all other arguments are constant across the whole chromosome
  • instead of starting a pythonJob per gene, group multiple genes into bigger jobs
    • we loop over all genes, and where an output file doesn't exist yet we add the gene name and output file to a list
    • once the list is long enough (default 50) we start a single job, passing all the arguments in once
    • make_group_file is edited to start a Hail runtime and open the MT once, then to loop over [gene, group_file], carrying out the existing process to generate group files.
    • if we reach the end of the gene loop and there are genes which weren't packaged into a job, shove them in a final job

Hopefully this brings down the number of jobs involved.

…e, process multiple genes while the MT is loaded

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the gene group file generation process to reduce the number of batch jobs by grouping multiple genes into single jobs instead of creating one job per gene.

  • Batches multiple genes (default 50) into single jobs to reduce batch system overhead
  • Modifies the make_group_file function to process multiple genes in one execution
  • Loads the chromosome matrix table once per job and processes all genes in that batch

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread make_group_file.py Outdated
Comment thread make_group_file.py Outdated
Comment thread make_group_file.py Outdated
@annacuomo
annacuomo merged commit 9bf0497 into main Oct 15, 2025
2 checks passed
@annacuomo
annacuomo deleted the high_throughput branch October 15, 2025 07:53
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.

3 participants