Skip to content

docs: correct the FASTQ shuffling page (#870) - #871

Merged
joshfactorial merged 1 commit into
developfrom
docs/fastq_shuffling_page
Nov 1, 2026
Merged

joshfactorial merged 1 commit into
developfrom
docs/fastq_shuffling_page

Conversation

@joshfactorial

Copy link
Copy Markdown
Collaborator

Refs #870.

docs-site/src/gen-reads/fastq-shuffling.md had two errors, each checked against seqkit's own usage text and source:

  • Memory. The page said seqkit "uses reservoir sampling and streams from disk, keeping memory use bounded regardless of file size." That is wrong: seqkit's usage text says "By default, all records will be read into memory", and shuffle.go appends every record to a slice before shuffling.
  • The paired example was broken. seqkit shuffle -2 R1 R2 -o … -o … uses -2, which is --two-pass and FASTA only, not a paired mode. Both inputs would be read as one stream and shuffled together.

The fix: shuffle each mate separately with the same -s.

  • Mates stay in register because shuffle.go seeds one generator from -s and calls r.Shuffle(len(sequences), …), so the permutation depends only on the seed and the record count. That is from reading the source; I have not run seqkit.
  • germline_e2e.sbatch already shuffles this way, under SHUFFLE=1.

The page also now says why order matters (aligner batches; variant calling does not depend on it) and points to #870.

Not verified: no seqkit run. Running seqkit's release binary here was not permitted, so the same-seed behavior rests on the source reading above.

🤖 Generated with Claude Code

The page claimed seqkit shuffle streams from disk with bounded memory; it
reads every record into memory. Its paired example passed both mates with
-2, which is --two-pass (FASTA only), not a paired mode, and would shuffle
the mates together into one output. Shuffle each mate separately with the
same seed instead; seqkit's permutation depends only on the seed and the
record count. Also say why order matters (aligner batches) and point to
#870.

Co-Authored-By: Claude <noreply@anthropic.com>
@joshfactorial
joshfactorial merged commit 3fe37a9 into develop Nov 1, 2026
9 checks passed
@joshfactorial
joshfactorial deleted the docs/fastq_shuffling_page branch November 1, 2026 13:07
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