Clipping both ends with ClipReads
GATK version used: 4.2.6.1
Exact command used: gatk ClipReads -I in.bam -O out.bam -CR HARDCLIP_BASES -CT "1-5"
Hi,
I'd appreciate any advice regarding clipping both ends of reads in BAM file with ClipReads.
Running gatk ClipReads -I in.bam -O out.bam -CR HARDCLIP_BASES -CT "1-5" clipped the first 5 bases, but I couldn't figure out how to clip the last 5 bases as well. Setting -CT "1-5, -5--1", for example, resulted in an error:
java.lang.RuntimeException: Badly formatted cyclesToClip argument.
My reads have different lengths, so the number of cycles that are 5 from the end is different for each read.
Thanks!
-
Hi Chen Leibson
GATK ClipReads does not have that functionality to clip reads dynamically from the ends but needs precise cycle numbers to clip, therefore our suggestion would be to use a different tool. Although we cannot provide direct support for it fgbio's ClipBam tool seems to do the job just as you expect.
https://fulcrumgenomics.github.io/fgbio/tools/latest/ClipBam.html
I hope this helps.
-
Okay, I'll try it out
Thank you!
Please sign in to leave a comment.
2 comments