Thank you so much and I could retrieve partially mapped reads using samjdk. I have one more query, I want to retrieve the part of the read sequences which are soft-clipped. Any tools are available for this or do I need to write the code for the same.
Hi, It would be great if anyone can give some suggestion on extracting partially mapped reads from bam/sam generated using BWA or articles which describes more about partially mapped reads. Thank you.
1 answer
using samjdk: http://lindenb.github.io/jvarkit/SamJdk.html
search for mapped read with clipped read (partial mapping) and other canonical alignments (SA attribute)
java -jar src/jvarkit-git/dist/samjdk.jar -e 'return !record.getReadUnmappedFlag() && record.getCigar().isClipped() && record.getAttribute("SA")!=null;' in.bam
I used samextractclip.jar and converted clipped part of the reads into fastq file. Actually I am trying to figure out the breakpoints for a balanced translocation using these reads. Could you please give some suggestion in this regard.
Please don't pile up the questions.
This is a new independent question.
validate this one (green tick on the left) if it's been answered ( and it was).
Hi,
Is there any other way to do it? I tried using your code but it says: Error: Unable to access jarfile src/jvarkit-git/dist/samjdk.jar
Swadha
Unable to access jarfile src/jvarkit-git/dist/samjdk.jar
it was , of course, just an example of path.... after compilation it should be in the 'dist' directory.
I know that was a dumb question to ask but I still can't locate "samjdk.jar". It looks like I have java installed on my server.
Log in to answer this question.