Simplify Alignment Job and Resolve SAM Flag Issue in CRAM to FASTQ Conversion - #802
Draft
michael-harper wants to merge 90 commits into
Draft
michael-harper wants to merge 90 commits into
michael-harper wants to merge 90 commits into
Conversation
…emoval of Bazam when realigning from cram file
…ferentiate between picard extracted and samtools extracted. Also adding config parameter 'extract_picard' to trigger instead of hardcoding into align job
…eaved fastq file as an input to dragen-os aligner. This is to attempt to reproduce the same cram as the input
…The previous approach only allowed for specific versions of crams to be realigned, and we were essentially unable to create a new version of the cram. The new approach allows for specifying if we want to realign from the 'base' cram and creates a new path to the realigned cram as well as the ability to specify a reference to use during realigning
…m. Adding documentation to large_cohort.toml to accurately reflect new usecase
…options to the align stage level to avoid multiple config retrievals. Making code more readable and easier to follow. Also reconfiguring how we parameterise realignment options, providing full explanation in large_cohort.toml file.
…at can be passed to the align job so that if required we can retrieve necessary cram file specified in the newly implemented RealignOptions object
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.
Context and Motivation
The primary motivation for these changes is to address an underlying bug in
bazam, the tool we previously used for converting CRAM files to FASTQ format for re-alignment. The bug causes the SAM flag relating to read pair orientation to be overwritten for correctly oriented read pairs on the reverse strand. This is critical because it impacts the accurate representation of read pair orientations in re-aligned CRAM files. Notably, this issue does not affect the individual read strand flag, which remains correctly preserved.Changes Introduced
bazamfor CRAM to fastq conversion in favour ofsamtools fastq:samtools fastq, ensuring the integrity of SAM flags.samtools fastqis discussed in this Slack post.picardto mark duplicates now._get_alignment_input. This was capable of realigning from a specified 'cram version' but was seemingly unable to produce new cram versions when we wanted to realign. I have added the functionality to realign from an input cram and subsequently save the cram to the newly created 'new_version' directory.['workflow']['realign_from_cram_version']_align_onefunction to handle direct FASTQ extraction and alignment using the selected aligner.subset_cramfunction in for future use/testing purposes (it is not currently used within the stage).