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
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.