Entering edit mode
10.1 years ago
s.vdrzeeuw
▴
20
So I have a full genome PACbio BAM file and this has a average coverage of 3-6.
Now I want to split the bam file per read. Since readgroup is not working and sometimes still gives me multiple reads inside my BAM.
The reason why I want this is because i want to run MPILEUP with only 1 read per bam, so that I can identify insertions/deletions per read on a given location. Anyone knows a program to do this? Or another approach to do it?
Thanks!
@Pierre Thanks for your reply, can I also extract one mpileup per read with a filtering region II know try it like this:
unfortunately this fails. I need to have the mpileup files inside a different region directory so that I can distinguish them. Later on and i will not be left over with 1000 files if I have 200 regions in my bed file. Hope this is also possible thanks for you help already!
this is the error I got:
run
samtools index your.bam
before running the loop.I already have my bam file indexed. So this should not be the case or do you mean after splitting the bam per read.
There is no need to specify the region in
mpileup
. The reads are already extracted withview
Hmmm, maybe I should rephrase the question, I need to identify repeat regions for each read. Also I need to know there exact lengths and the lengths after counting of insertions and deletions. Therefore I want to have a separate bam file for each read on each repeat region. So that my follow up script can progress those files into a summary table like this:
Maybe this clarifies my needs more, still many thanks for investing your time ;)