Question: How to extract reads that support the structural variants using the vcf file and bam file?
gravatar for Venkatesh Chellappa
12 months ago by
Venkatesh Chellappa10 wrote:

I am trying to extract reads that support structural variants called from a sample. I would like to get these reads from the bam file that was used in structural variant calling. The purpose of this is to have a minimal bam (evidence bam) that contains only the reads that support structural variant events so I could load the bam bit quickly in IGV. My intention to do this is because I am using 5 Structural variant callers and manually curating each variant called as I want to be super sure before calling them as true variants in patient samples. Effectively I am trying to create a final bam which would be obtained by merging and removing the duplicate reads from the evidence bams from all the 5 callers. I am currently using samtools view to extract reads from bam file using the coordinates of breakpoint1 and breakpoint2 for each structural variant called. Is there an easier way to do this?? Thanks in advance, Venki (Venkatesh Chellappa)

ADD COMMENTlink modified 12 months ago by ATpoint41k • written 12 months ago by Venkatesh Chellappa10

Do you have the reads names that support the SV? If so you can grep them. samtools view my.bam | grep -f reads_name.txt > supporting_reads.sam

More efficient way is to use picard FilterSamReads

ADD REPLYlink modified 12 months ago • written 12 months ago by Medhat8.8k

I am looking for the supporting reads. Without that I cannot have the read_names.txt

ADD REPLYlink written 12 months ago by Venkatesh Chellappa10
Please log in to add an answer.


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