Skip to content

Sketch store: trim a broken ENA stream to whole read pairs; retry partial downloads - #319

Merged
hyphaltip merged 1 commit into
mainfrom
sketch-store-ena-truncation
Nov 8, 2026
Merged

hyphaltip merged 1 commit into
mainfrom
sketch-store-ena-truncation

Conversation

@hyphaltip

Copy link
Copy Markdown
Member

Follow-up to #315, found in the running A. fumigatus build.

Six PRJEB1497 runs fail at sketching with "Failed to read a record". These are 3 GB FASTQ files from 2013 that NCBI never loaded, so they come through the ENA HTTPS fallback. Their streams stopped at about a third of the 30x target (9.6-12.6x) and left a truncated last record, which singlesketch rejects.

  • take_pairs now keeps only whole records (4 lines, @ header, sequence and quality of equal length), in whole pairs for paired runs.
  • An ENA subsample under half the target (or under half the run, for runs smaller than the target) exits as ena_partial. The planner then retries it (up to 3 tries) instead of keeping a thin sketch.

The fix is already deployed in the store's bin/, and the planner will retry the 6 samples with it. The trimmer was checked on truncated test input: both a short quality line and a missing quality line keep only the complete pair.

🤖 Generated with Claude Code

…n under half the target arrived

Six PRJEB1497 runs (3 GB FASTQ files from 2013) streamed from ENA over HTTPS stopped at about a third of the 30x target, leaving a
truncated record that singlesketch rejects ("Failed to read a record"). take_pairs now keeps only whole records in whole pairs, and
an ENA subsample under half the target (or half the run, for smaller runs) exits as ena_partial so the planner retries it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hyphaltip
hyphaltip merged commit 1ed1a60 into main Nov 8, 2026
2 checks passed
@hyphaltip
hyphaltip deleted the sketch-store-ena-truncation branch November 9, 2026 01:17
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.

1 participant