Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • SAMtool merge/cat problem

    Hi guys,

    I d like to cat or merge 2 BAMs file. My problem is that I try to cat the two BAMs but when I ve used IGV to see the result the file doesn t work well. the 2 BAMs file instead (after sorted and indexed of course) work normally.
    I concluded that likely the problem is in cat process so I try merge command, but the program give me error: "different target sequence name".

  • #2
    I read http://seqanswers.com/forums/showthr...153#post126153

    my problem is different in the head of .sam I have 4 "@" in which 2@SQ
    SN:chrM LN: ......
    SN:chrC LN: ......

    But both SAMs have the same "head" so why samtool merge BAMs:
    "samtools merge output.bam 1input.bam 2input.bam&"
    gives me error:
    different target sequence name ifferent target sequence name: 'chrC' != 'chrM' in file 2input.bam
    Could be happen something during the conversion from sam to bam?

    Comment


    • #3
      You can't merge BAM files that don't contain sequences mapped to the same reference (well, technically you can, but the result would be useless). (1) How did you create the BAM files? (2) Given that they seem to be mapped to different things, why do you want to merge them to begin with?

      Comment


      • #4
        Thanks for the reply :-)
        The BAMs come from bowtie and tophat used on the same references. They maps the same things... Bowtie maps only a part of the total submitted to tophat.
        I want to merge these 2 output to reach the max yield in term of reads mapped possible.

        Maybe Can I merge the SAMs file but I don t know how.. :-/

        Comment


        • #5
          What do the headers of each BAM look like? Do they each contain the same contigs, but just in a different order?

          Comment


          • #6
            the first line is: ÿBCsrôeLc``pðpá

            they contain contings from the same genome but the 2 programs use different mapping method. So I mapped the reads with one program, and by the second program I mapped all the reads that the first one didn t map..

            Comment


            • #7
              If that's from "samtools view -H" then it looks like the file is corrupted.

              Comment


              • #8
                Sorry I make a mistake..

                samtools view -H 1.bam&

                @HD VN:1.0 SO:unsorted
                @SQ SN:chr2 LN:3......
                @SQ SN:chr1 LN:1......
                @PG ID:bowtie2 PN:bowtie2 VN:2.1.0


                samtools view -H 2.bam&

                @HD VN:1.0 SO:coordinate
                @SQ SN:chr1 LN:1.....
                @SQ SN:chr2 LN:3.....
                @PG ID:TopHat VN:2.0.9

                Comment


                • #9
                  So yes, the chromosomes are just in a different order. Just coordinate sort the bowtie results and make sure the chromosomes are in the same order in the header. Then you'll be able to merge things.

                  Comment


                  • #10
                    Thank you very much Dpryan! I will try!

                    Comment

                    Latest Articles

                    Collapse

                    • seqadmin
                      Essential Discoveries and Tools in Epitranscriptomics
                      by seqadmin




                      The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                      04-22-2024, 07:01 AM
                    • seqadmin
                      Current Approaches to Protein Sequencing
                      by seqadmin


                      Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                      04-04-2024, 04:25 PM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, Today, 11:49 AM
                    0 responses
                    12 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, Yesterday, 08:47 AM
                    0 responses
                    16 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-11-2024, 12:08 PM
                    0 responses
                    61 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-10-2024, 10:19 PM
                    0 responses
                    60 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X