Extraction of partially mapped reads from BAM
1
0
Entering edit mode
6.2 years ago
nkausthu ▴ 30

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.

BAM Partially mapped reads BWA • 3.4k views
ADD COMMENT
3
Entering edit mode
6.2 years ago

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
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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).

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 1204 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