Skip to content

removes soft clips before saving as fasta/q#2233

Merged
whitwham merged 1 commit into
samtools:developfrom
vasudeva8:fq1
Jul 22, 2025
Merged

removes soft clips before saving as fasta/q#2233
whitwham merged 1 commit into
samtools:developfrom
vasudeva8:fq1

Conversation

@vasudeva8

@vasudeva8 vasudeva8 commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

Fixes #1275
Removes bases corresponding to soft clips. CIGAR and quality values are updated accordingly.
The modified data are stored in aux tags with tag 's0', as 'Z' type array. The aux tag can be controlled with --sc-aux option.
If such aux tag storing is not required, it can be disabled with --no-sc-bkp option.
With reads with reverse flag, the output is reversed and flipped, and the same is done with dumped aux tags as well; the cigar, bases and quality values are reversed and flipped as required.

No other aux tag is updated and at the end of soft clip removal, other aux tag may not be in sync with soft-clipped data if they are about removed data.
Doesn't handle very large cigar tags in bcf aux tag, just uses the cigar in bam.

@daviesrob daviesrob assigned whitwham and unassigned jkbonfield Jul 17, 2025
@whitwham whitwham merged commit 1670eaf into samtools:develop Jul 22, 2025
6 checks passed
@vasudeva8 vasudeva8 deleted the fq1 branch July 22, 2025 18:35
@GWBarberis

Copy link
Copy Markdown

Hello, when are you planning to release a new version with this feature?

@whitwham

Copy link
Copy Markdown
Member

Hello, when are you planning to release a new version with this feature?

We have a couple of pieces of work to finish off before a new release. Hopefully if shouldn't be long.

@GWBarberis

Copy link
Copy Markdown

We have a couple of pieces of work to finish off before a new release. Hopefully if shouldn't be long.

Great, thank you for your prompt reply.

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.

samtools fastq - trim reads based on soft clipping

4 participants