Header Leaderboard Ad

Collapse

Changing header of BAM

Collapse

Announcement

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

  • Changing header of BAM

    Hello,

    I apologize if my question is redundant....

    I created bam files from fastq files by ELAND_standalone and tried to feed them to GATK. Then I got the following error message.
    ##### ERROR MESSAGE: SAM/BAM file reanalysis.bam is malformed: SAM file doesn't have any read groups defined in the header. The GATK no longer supports SAM files without read groups
    ##### ERROR -

    How can I change the header? Samtools?

    Thank you very much.

    Hiroki

  • #2
    you could easily change the header using samtools, but that won't solve the problem as the readgroup is necessary in each alignment section as well.
    You could have a look in the AddOrReplaceReadGroup Utility of Picard:
    http://picard.sourceforge.net/comman...laceReadGroups

    I don't know if that changes the header as well but if not have a look here:
    http://picard.sourceforge.net/comman...placeSamHeader

    Comment


    • #3
      Thanks ulz_peter!

      I was told to use Picard from another guy.
      Now I'm trying it.

      Thank you so much anyways!

      Comment


      • #4
        I've run into similar issues using GATK for bam files, and Picard. The option that always has helped me when I knew hte BAM file was "ok,"

        java [args to jvm] GATK.jar [GAKT opts] VALIDATION_STRINGENCY=SILENT

        Comment


        • #5
          Hi, I have the same problem as Hiroki.

          I made a sam file using command:
          Code:
          bwa samse ref.fa my.sai my.fastq > my.sam
          then, I have creaded .bam file:
          Code:
          samtools view -bS my.sam > my.bam
          next, I have sorted my.bam file:
          Code:
          samtools sort my.bam my_sorted
          Using GATK, I need to put a .bam file as an input.
          According to the instructions from http://www.broadinstitute.org/gsa/wi...s_for_the_GATK I have used Picard's ReordereSam, to reorder reads:
          Code:
          java -jar ReordereSam.jar I=/path/my_sorted.bam O=/path/my_reordered.bam R=/path/ref.fa
          Trying i.e.
          Code:
          java -jar GenomeAnalysisTK.jar -T DepthOfCoverage -R /paht/ref.fa -I /path/aln_reordered.bam
          an error is returned:
          HTML Code:
          ##### ERROR MESSAGE: SAM/BAM file /path/my_reordered.bam is malformed: SAM file doesn't have any read groups defined in the header.  The GATK no longer supports SAM files without read groups
          I have tried Picards AddOrReplaceReadGroups.jar and ReplaceSamHeader.jar but it didn't help me.

          Any suggestions how to bulid proper .bam file for GATK?
          thx

          Comment


          • #6
            hi the damian,
            when creating your sam file, you have to add read group header.
            this should work:

            bwa samse -r @RG\tID:IDa\tSM:SM\tPL:Illumina ref.fa my.sai my.fastq > my.sam
            bests

            colin

            Comment


            • #7
              Yes, I've already realised how to do this. Another option is to use Picard's AddOrReplaceReadGropus.jar.
              Code:
              java -jar AddOrReplaceReadGroups I=my.bam O=myGr.bam LB=whatever PL=illumina PU=whatever SM=whatever
              Of course prior using AddOrReplaceReadGroups your .sam file needs to pass Picard's validation (ValidateSamFile.jar)

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Improved Targeted Sequencing: A Comprehensive Guide to Amplicon Sequencing
                by seqadmin



                Amplicon sequencing is a targeted approach that allows researchers to investigate specific regions of the genome. This technique is routinely used in applications such as variant identification, clinical research, and infectious disease surveillance. The amplicon sequencing process begins by designing primers that flank the regions of interest. The DNA sequences are then amplified through PCR (typically multiplex PCR) to produce amplicons complementary to the targets. RNA targets...
                03-21-2023, 01:49 PM
              • seqadmin
                Targeted Sequencing: Choosing Between Hybridization Capture and Amplicon Sequencing
                by seqadmin




                Targeted sequencing is an effective way to sequence and analyze specific genomic regions of interest. This method enables researchers to focus their efforts on their desired targets, as opposed to other methods like whole genome sequencing that involve the sequencing of total DNA. Utilizing targeted sequencing is an attractive option for many researchers because it is often faster, more cost-effective, and only generates applicable data. While there are many approaches...
                03-10-2023, 05:31 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, Yesterday, 11:44 AM
              0 responses
              8 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-24-2023, 02:45 PM
              0 responses
              18 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-22-2023, 12:26 PM
              0 responses
              18 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-17-2023, 12:32 PM
              0 responses
              19 views
              0 likes
              Last Post seqadmin  
              Working...
              X