This is a test version of Biostars. For the public version, visit https://www.biostars.org.
getting the coordinates of mapped regions from a bam file

Once I mapped a genome to a reference genome, how can I get the mapped region coordinates and chromosome?

In addition, if possible, how can I get a bam file with the regions of the mapped + a padding (so maybe 2000kb above and below)?

reads mapping sam bam bwa

It looks like a homework; but anyways, I did not get the first part of the question, for the second part, did you try to look at bedtools?

What have you tried?

I mapped a genome to a reference genome

What does this mean? Please explain in more detail.

how can I get a bam file with the regions of the mapped + a padding

You get a BAM file from an alignment program. The BAM file will not give you any padding. Rather, you would read the BAM file - giving you an alignment position for each read. From this you can collapse (or reduce) overlapping reads to regions, and add padding using things like bedtools, R and the GenomicRanges library, etc. etc.

0 answers

No answers yet.

Log in to answer this question.