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:- First, it reduces the size of the file that need to be uploaded to the web server for analysis.
- Second, it mark or extract only uniquely mapped reads which are used for the analysis based on read profiles.
Download
- bam2bed v1.3 - release (December 18, 2013).
- Additional feature to extract only uniquely mapped reads (-q). Also sort the output BED file with respect to the chromosome and genomic coordinates.
- bam2bed v1.2 - release (November 11, 2013).
- During default usage, the program can now correctly extract the expression corresponding to tags which have been formatted in the form like <tag id>|<read count>
- bam2bed v1.1 - release (November 06, 2013).
- Bug fix during conversion of SAM/BAM files for organisms having large number of ambiguious chromosome names e.g. in Pig.
- Additional feature to retrieve uniquely mapped reads based on the read identifier (-u parameter). This feature is less memory intensive as compared to the default mode. Please note that this feature require samtools and bedtools to be installed on the user's computer.
- bam2bed v1.0 - release (March 29, 2013).
Important note (summary)
bam2bed | Pros | Cons |
---|---|---|
default | no need to collapse the identical reads into tags | takes longer time and memory |
-u parameter | low time and memory requirement | collapse 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.