Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • evansdan
    Junior Member
    • Feb 2012
    • 1

    Samtools error: "different target sequence name"

    I'm using samtools version 0.1.16 (r963:234), bwa 0.6.1-r104 and bowtie 0.12.7 on a Linux box. When I run:

    samtools merge file1_672_all.bam file1_672_bowtie.bam file1_672_bwa.bam

    I get the following error:

    [bam_merge_core] different target sequence name: 'chr8' != 'chrX' in file 'file1_672_bwa.bam'

    Both bam files were aligned simultaneously with bwa to the same indexed hg19 fasta files, and no error messages were printed during execution.

    How can I find out what has gone wrong? Has anyone else come across this problem before? The only other thread that I came across with this error had something to do with joining chromosome-separated bam files together before trying to merge them with samtools.

    This didn't happen with a very small dataset I've run through the alignment/variant calling process in this pipeline, so I have seen the setup work previously.

    Thank you much.
  • swbarnes2
    Senior Member
    • May 2008
    • 910

    #2
    You didn't mention that the .bam files were sorted. Do your files conform to what the documentation says they have to look like?

    Merge multiple sorted alignments. The header reference lists of all the input BAM files, and the @SQ headers of inh.sam, if any, must all refer to the same set of reference sequences. The header reference list and (unless overridden by -h) ‘@’ headers of in1.bam will be copied to out.bam, and the headers of other files will be ignored.

    Comment

    • spacup
      Member
      • Apr 2013
      • 17

      #3
      Yes, sure. But how to do when you want to merge a .bam file generated from a male sample with another one generated from a female sample?

      Just add the ChrY line in the female header .bam file ?
      The problem is that .bam are compressed binary files... so how to do?

      See thread : http://seqanswers.com/forums/showthr...153#post126153
      Last edited by spacup; 12-02-2013, 03:14 AM.

      Comment

      Latest Articles

      Collapse

      • GATTACAT
        Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by GATTACAT
        Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
        07-01-2026, 11:43 AM
      • SEQadmin2
        Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by SEQadmin2


        I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

        Here are nine questions we think about, in roughly the order they matter, before...
        06-18-2026, 07:11 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 07-02-2026, 11:08 AM
      0 responses
      14 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-30-2026, 05:37 AM
      0 responses
      15 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-26-2026, 11:10 AM
      0 responses
      20 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-17-2026, 06:09 AM
      0 responses
      54 views
      0 reactions
      Last Post SEQadmin2  
      Working...