Question: Extraction of partially mapped reads from BAM
0
gravatar for nkausthu
2.1 years ago by
nkausthu30
nkausthu30 wrote:

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.

bwa bam partially mapped reads • 1.3k views
ADD COMMENTlink modified 2.1 years ago by Pierre Lindenbaum130k • written 2.1 years ago by nkausthu30
3
gravatar for Pierre Lindenbaum
2.1 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum130k wrote:

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 COMMENTlink written 2.1 years ago by Pierre Lindenbaum130k

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 REPLYlink written 2.1 years ago by nkausthu30

extracting the soft clipped seq only from a sam file ; How to extract only 5-prime hard/soft clipped reads? ; Extract soft-clipped reads from BWA -generated SAM file

ADD REPLYlink written 2.1 years ago by Pierre Lindenbaum130k

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 REPLYlink written 2.1 years ago by nkausthu30

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 REPLYlink written 2.1 years ago by Pierre Lindenbaum130k

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 REPLYlink written 2.0 years ago by s.singh20

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 REPLYlink written 2.0 years ago by Pierre Lindenbaum130k

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 REPLYlink written 2.0 years ago by s.singh20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1629 users visited in the last hour