Entering edit mode
19 months ago
MobiusT
▴
20
I have a whole genome dataset in a bam file and want to convert a whole exome dataset. Which steps I should take?
I have a whole genome dataset in a bam file and want to convert a whole exome dataset. Which steps I should take?
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Do you mean that you have a bam file generated from WGS data and that you want to extract the exonic alignments? If so take a look into intersectBed.
While possible the solution from Pierre Lindenbaum will be much faster as (if the bam is sorted and indexed) samtools will use random access to pull the entries directly whereas intersect first needs to find them manually.
This would be a theoretically equivalent dataset not a real exome dataset (since that generally uses capture techology).