Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

Depth with and without Soft-Clipping

ccnnccnn Member
edited May 2018 in Ask the GATK team

Hi guys,

I'm trying to use GATK3 (since v4 doesn't have the DepthOfCoverage tool yet) to calculate the depth of coverage across some WGS BAM files, with and with out soft clipping.

Currently, I'm using the following the following

#calculate depth, exclude soft-clipped bases
java -Xmx${mem}g -jar $jar -mbq 0 -mmq 0 -L ${bed} -o $out/${bamName}.doc -I $bam  -T DepthOfCoverage -R $ref

#calculate depth, include soft-clipped bases
java  -Xmx${mem}g -jar $jar -T ClipReads -l INFO -I $bam -o $bam.noclip.bam -R $ref -CR REVERT_SOFTCLIPPED_BASES -os clip.stats 2>> err.sc >> out.sc
java  -Xmx${mem}g -jar $jar -mbq 0 -mmq 0 -L $bed -o $out/${bamName}.noclip.bam.doc -I $bam.noclip.bam  -T DepthOfCoverage -R $ref

Basically, what I'm asking GATK to do is: 1) traverse the original BAM file and calculate the depth; 2) convert this original BAM file into a new BAM file with no soft clipping; 3) traverse this new BAM file and calculate the depth.

This is a computationally intensive process; it takes both large amounts of time and memory. And I'm wondering if there's a more efficient way to do it?

Thanks!

Answers

  • SheilaSheila Broad InstituteMember, Broadie admin
    edited May 2018

    @ccnn
    Hi,

    I don't think there is an easier way to do it, unfortunately.
    You may want use some outside tools that do consider soft clips when calculating coverage.

    -Sheila

  • ccnnccnn Member
    edited May 2018

    @Sheila thanks for your quick response. Could you point me toward some of these tools? I'm assuming these tools don't also report the coverage without soft-clipping, right?—meaning I could use them only as a substitute for my current method for #calculate depth, include soft-clipped bases?

  • SheilaSheila Broad InstituteMember, Broadie admin

    @ccnn
    Hi,

    I think Qualimap has a way to output the number of hard and soft clipped reads. I did a quick google search and people recommend bedtools on biostars. You may also try asking on biostars. Let us know what you use/find :smile:

    -Sheila

Sign In or Register to comment.