Repository navigation
Add FASTQ header cleaning as the first pipeline step - #35
Open
Chromojones wants to merge 1 commit into
Open
Chromojones wants to merge 1 commit into
Chromojones wants to merge 1 commit into
Conversation
Some FASTQ files carry spaces in their header lines (for example "@Readid 1:N:0:INDEX"). Tools further down the pipeline truncate read names at the first space, which breaks UMI extraction and read-name matching after alignment. CLEAN_FASTQ_HEADERS replaces every space in a header line with an underscore. It runs on the raw reads immediately after the samplesheet is parsed, before UMI moving, trimming and alignment, and reassigns ch_fastq the same way the surrounding steps do, so nothing downstream needed changing. Sequence and quality lines are passed through untouched. Off by default; enable with --clean_fastq_headers. The cleaned reads are intermediates and are not published. TrimGalore re-links its input to "${prefix}.fastq.gz", so downstream published file names are unchanged. pigz signals a corrupt or truncated input by exiting non-zero after emitting a partial stream, so both ends of the pipe are checked and the record count is validated; otherwise the task would succeed and hand a silently truncated FASTQ to the rest of the pipeline. The pipeline is single-end only - single_end is parsed into meta but never read downstream - so the module accepts exactly one FASTQ per sample and fails loudly on anything else. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some FASTQ files carry spaces in their header lines (for example "ID 1:N:0:INDEX"). Tools further down the pipeline truncate read names at the first space, which breaks UMI extraction and read-name matching after alignment (samtools).
CLEAN_FASTQ_HEADERS replaces every space in a header line with an underscore. It runs on the raw reads immediately after the samplesheet is parsed, before UMI moving, trimming and alignment, and reassigns ch_fastq the same way the surrounding steps do. Sequence and quality lines are passed through untouched.
Off by default, enable with --clean_fastq_headers.
The cleaned reads are intermediates and are not published. TrimGalore re-links its input to "${prefix}.fastq.gz", so downstream published file names are unchanged. pigz signals a corrupt or truncated input by exiting non-zero after emitting a partial stream, so both ends of the pipe are checked and the record count is validated.