SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging bam files memento Bioinformatics 1 02-17-2012 03:39 PM
merging bam files with different headers dnusol Bioinformatics 2 02-06-2012 11:09 PM
merging many bam files-novice needs help please shawpa Bioinformatics 2 01-06-2012 08:03 AM
Problem merging BAM files hlwright Bioinformatics 6 10-10-2011 11:36 PM
Calling multiple BAM files for SNPs and vcf newbietonextgen Bioinformatics 3 04-19-2011 11:29 AM

Reply
 
Thread Tools
Old 08-25-2011, 01:40 AM   #1
unibegenomics
Junior Member
 
Location: Bern

Join Date: Aug 2011
Posts: 1
Default Merging multiple BAM files

Hello all,

We are new to using samtools and are trying to solve a problem with merging multiple BAM files.

We have several BAM files, one from each individual. They have all been mapped (one at a time) to the same reference genome, whose assembly consists of about 7000 scaffolds. Now reads from each individual map to several but not always all of the scaffolds in the reference. Therefore, for example, individual_1 may have no reads mapping to scaffold 1234 of the reference, but individual_2 might. Now we want to merge all of these alignments into a single BAM file but samtools cannot deal with the fact that some scaffold names do not match.

The BAM files were created using samtools from SAM files exported from CLC genomics workbench.

Any help will be greatly appreciated.

Thanks.
unibegenomics is offline   Reply With Quote
Old 08-25-2011, 02:03 AM   #2
sdvie
Member
 
Location: Spain

Join Date: Jul 2010
Posts: 68
Default

I am not familiar with the importance of scaffolds in the reference genome.

However, I would recommend to try and use picard tools.
It does things similar to samtools and more.

Perform two steps:

1. AddAndReplaceReadgroups for each of your bam files (to annotate the reads and be able to follow them in the merged file).
2. MergeSamFiles. Although the tools says "sam", it also works for bam files.

good luck!
sdvie is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 07:59 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO