Repository navigation
Conversation
Default shifted output is unchanged (SEQ, QUAL and all tags dropped). --keepTags TAG [TAG ...] copies only the named tags (e.g. CB). Tags that describe the original alignment (NM, MD, MC, SA, XA, ...) are rejected because the CIGAR is rewritten. Needs --shift/--ATACshift and BAM output. Shift handling is untouched, so expanding and long shifts keep working.
…n, reject AS A multi-byte tag such as 'éA' passed the length check and panicked in Rust. Require [A-Za-z][A-Za-z0-9] in the CLI. AS describes the original alignment score, so it joins the rejected tags.
Shifted records have empty SEQ and QUAL, so tags that depend on the original bases (BQ, MM, ML) would be stale.
CM and PT depend on the original alignment and go stale after the CIGAR rewrite. A repeated tag would be written twice on one record.
… Galaxy wrapper argparse store kept only the last --keepTags group, so the duplicate check missed repeats and earlier tags were dropped.
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.
This is the alignmentSieve half of the reverted #1485, split out and reworked after received input comments. It does not depend on the crate PR.
What changes
New option
--keepTags TAG [TAG ...]. With--shiftor--ATACshiftand BAM output it copies the named tags (for exampleCB) onto the shifted records. Without it nothing changes: SEQ, QUAL and all tags are dropped like on master. I did not touch the shift code itself.Tags that describe the original alignment are refused with an error:
NM,MD,MC,SA,XA,CC,CP,CG,OA,OC,OP,TS. The CIGAR is rewritten, so they would be wrong.--keepTagsalso errors without--shift/--ATACshiftor together with--BED. The docs page has a new section on what shifted BAM output contains.The use case is single-cell data, where the shifted reads still need their cell barcode.
Potential Concerns
--ATACshift --keepTags CBtook about 14 s against about 13 s for the default, so barely slower. OnlyCBis written, so the output stays small. These are a handful of runs on one machine, so treat the number as approximate.--shift -10 10and--shift 100 -100). I reset the branch to master and redid it as an opt-in flag. I re-checked those shifts onpaired_chr2L.bamand they behave as on master again.alignmentSieve.rst.How it was checked
cargo test --features pythonand the alignmentSieve plus bamCoverage/bamCompare pytest files.CBkept with unchanged positions and values, alignment tags rejected, and the shift and BAM output requirement.CB.What requires further feedback
mpos,tlen) when only one read of a pair moves. That is master's behaviour and I left it alone, but we should know that code could be revised later on.--keepTags. Happy to add it here, or later.