bam2bed: covert BAM/SAM into BED format

This program is used to convert mapped reads in BAM/SAM format into BED format. This has two advantages:

Download

Important note (summary)

bam2bedProsCons
defaultno need to collapse the identical reads into tagstakes longer time and memory
-u parameterlow time and memory requirementcollapse identical reads into tags
having format as >tagId|<read count>

Important note (detail)

When using the version >1.0 of the bam2bed program with -u parameter, it is important to collapse the identical reads into tags prior to mapping. For this purpose, fastx_collapser can be used that also formats the resulting tag identifier into mandatory format of

>TagId|<read count>
ATGCGTCAGCACAGACT

Here, TagId should be unique. This information is then used by the bam2bed script to take into account the correct expression of the respective tags while converting the BAM/SAM into BED format.

There is no such formatting requirement when using the program in default mode i.e. without the -u parameter. However, the default mode takes much longer time and memory than the mode with -u parameter.