Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    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!

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Best Practices for Single-Cell Sequencing Analysis
      by seqadmin



      While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
      06-06-2024, 07:15 AM
    • seqadmin
      Latest Developments in Precision Medicine
      by seqadmin



      Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

      Somatic Genomics
      “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
      05-24-2024, 01:16 PM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 06-07-2024, 06:58 AM
    0 responses
    13 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 06-06-2024, 08:18 AM
    0 responses
    21 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 06-06-2024, 08:04 AM
    0 responses
    20 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 06-03-2024, 06:55 AM
    0 responses
    14 views
    0 likes
    Last Post seqadmin  
    Working...
    X