Thanks,
Either seal.sh or cutprimers.sh is spliting the raw sequencing file based on matched primers. However, I still want to begin from bam file.
Hi all,
I want to extract bam of specific amplicon to evaluate the according amplicon performance. I used to use samtools view xx.bam chr:start-end to extract the bam, however, if the two amplicon are totally overlapped, this command will return us the whole reads covering the two region.
For example:
first amplicon:
------------------------------------> <----------------------------------------
second amplicon:
-------------------->
<-------------------
I firstly convert the bam to bed using bedtools, and get those reads name that are exactly match with the start position of the first amplicon. Then paired reads that belong the amplicon 1 were then extract from the bam file, as well as amplicon 2.
Is there any convenient method to seperately extract the exact reads belong to the two amplicons?
Thanks, Junfeng
A couple of suggestions:
1) use seal.sh from BBTools to split the sequencing before mapping. You could try something like:
seal.sh in=amplicons.fq ref=primers.fa pattern=out%.fq k=21 restrictleft=25 \
nzo=f refstats=refstats.txt
See the discussion starting from post #25 on this SeqAnswers thread.
2) Maybe msa.sh and cutprimers.sh could also do what you want (I am tagging Brian Bushnell and genomax because they can probably clarify this). See discussion starting at post #19 on the same thread as above
Thanks,
Either seal.sh or cutprimers.sh is spliting the raw sequencing file based on matched primers. However, I still want to begin from bam file.
Log in to answer this question.