Skip to content

Mark UniProt dat.gz files as temp to free ~200GB disk space - #249

Merged
jonasfreimuth merged 1 commit into
devfrom
copilot/clean-up-uniprot-dat-gz-files
Aug 26, 2026
Merged

Mark UniProt dat.gz files as temp to free ~200GB disk space#249
jonasfreimuth merged 1 commit into
devfrom
copilot/clean-up-uniprot-dat-gz-files

Conversation

Copilot AI commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The uniprot_sprot.dat.gz and uniprot_trembl.dat.gz files extracted from the UniProt snapshot are not cleaned up after use, with TrEMBL alone consuming ~200GB that is of little direct value to users.

Changes

  • workflow/rules/pull_resources.smk: Wrap both outputs of extract_uniprot_snapshot in temp() so Snakemake deletes them once all downstream consumers have completed
output:
    swissprot=temp("resources/uniprot/uniprot_sprot.dat.gz"),
    trembl=temp("resources/uniprot/uniprot_trembl.dat.gz"),

Copilot AI linked an issue Aug 24, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Clean up uniprot dat.gz files Mark UniProt dat.gz files as temp to free ~200GB disk space Aug 24, 2026
Copilot AI requested a review from jonasfreimuth August 24, 2026 15:27
Mark uniprot_sprot.dat.gz and uniprot_trembl.dat.gz as temp so
Snakemake removes them after use, freeing ~200GB of disk space.

Closes #248

Co-authored-by: jonasfreimuth <68993915+jonasfreimuth@users.noreply.github.com>
@jonasfreimuth
jonasfreimuth force-pushed the copilot/clean-up-uniprot-dat-gz-files branch from 26ac53a to c91b1ad Compare August 24, 2026 15:48
@jonasfreimuth
jonasfreimuth changed the base branch from main to dev August 24, 2026 15:49
@jonasfreimuth

Copy link
Copy Markdown
Collaborator

Anticipates #250, needs to be merged after that.

@jonasfreimuth
jonasfreimuth marked this pull request as ready for review August 24, 2026 15:50
Copilot AI lite review requested due to automatic review settings August 24, 2026 15:50

@jonasfreimuth jonasfreimuth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good from my side.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aims to reduce disk usage in the UniProt resource pipeline by allowing Snakemake to clean up large extracted UniProt *.dat.gz files once downstream rules are complete, and also includes a small robustness change in UniProt release parsing plus release metadata updates.

Changes:

  • Mark uniprot_sprot.dat.gz and uniprot_trembl.dat.gz as temp() outputs so they can be deleted after downstream consumption.
  • Adjust gzip parsing in extract_uniprot_release.py to avoid hard UTF-8 decode failures.
  • Bump release metadata to 2.0.1 and add a 2.0.1 changelog entry.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
workflow/rules/pull_resources.smk Marks extracted UniProt snapshot *.dat.gz outputs as temporary to enable cleanup.
workflow/scripts/extract_uniprot_release.py Changes gzip reading to handle decode errors more robustly.
pixi.toml Bumps project version to 2.0.1.
CHANGELOG.md Adds a 2.0.1 release entry (but currently doesn’t mention the UniProt temp-file cleanup).
.release-please-manifest.json Updates release-please manifest version to 2.0.1.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread workflow/scripts/extract_uniprot_release.py
Comment thread workflow/rules/pull_resources.smk
Comment thread CHANGELOG.md

@LKress LKress left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great, thanks!

@jonasfreimuth
jonasfreimuth merged commit c91b1ad into dev Aug 26, 2026
3 checks passed
@jonasfreimuth
jonasfreimuth deleted the copilot/clean-up-uniprot-dat-gz-files branch August 26, 2026 08:25
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.

Clean up uniprot dat.gz files

4 participants