how can I extract all the read pairs that one of the read in a region from BAM file ?
How many reads in a BAM file are aligned to an arbitrary region
siyu, you've had a string of questions that suggest you have put no effort into searching for answers to your questions or even tried to spend more time than it took you to write the question out. Please read the about tab and read this paper to learn how to better use this forum and not anger the people here to support you.
I so sorry to that. Why did you I have put no effort into searching for answers ? I am a green hand in this filed, and I always want to solve it by myself. In fact, I have try to find the answers to my questions,such as pairToBed tools in bedtools ,But I want to find another rsolution to the quetion. I am so sad to read the word you wrote.
what they mean is that if you just perform a couple of queries, even on BioStar only, regarding "reads" and "bam files" you would eventually get to posts like the one above mentioned by Pierre for instance, which explains exactly what you need to know. go through it, as it is quite self-explanatory, and if you still have doubts then you can come back with a more concise (and previously unanswered) question.