How to selectively turn soft-clipped bases to hard-clipped bases based on part of the sequence?
0
0
Entering edit mode
4.5 years ago

Hey,

Is there an easy way to convert soft-clipped bases to hard-clipped bases, based on a small barcode sequence that precedes the clipped bases..?

i.e. if the barcode would be: ACGTA, we'd like this,

ACAGTACA ACGTA ACCAGTAAACAGTAGACATGA with CIGAR 8S26M to be converted to 8H26M

but this:

ACAGTACA TCGTA ACCAGTAAACAGTAGACATGA with CIGAR 8S26M to remain unchanged.

Could this be done with a script that just opens a BAM, searches the CIGAR + SEQ columns for the requirements and make the change? Would just changing the CIGAR be enough, or do I need to delete the hard-clipped bases fromt he SEQ as well (For visualization in IGV, where I don't want to see the hard-clipped bases)?

Or is there already a tool out there that could really make my life a lot easier?

Cheers!

sequencing BAM Clipping • 606 views
ADD COMMENT

Login before adding your answer.

Traffic: 2457 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6