Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • BAM header fix

    I'm having trouble running a BAM file through GATK. I got this error:

    ##### 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

    So i figure I need to replace the header. I checked the header with samtools view -h, and I see an extremely long list that starts like this:

    @HD VN:1.0 SO:unsorted
    @PG ID:novoalign PN:novoalign VN:V2.08.02 CL:novoalign -o SAM -d ./reference/chok1ref.nix -f ./cho9/reads.fq
    @SQ SN:gi|351517969|ref|NW_003613580.1| AS:chok1ref.nix LN:8779783

    and continues with many @SQ lines

    I tried fixing the header with Picard using

    Code:
    java -jar picard/AddOrReplaceReadGroups.jar INPUT=cho9/cho9output.bam OUTPUT=cho9/cho9outputH.bam RGID=RSNS002 RGLB=RSNS002 RGPL=illumina RGPU=RSNS002 RGSM=RSNS002
    But that didn't seem to generate an output file, and I did just put the same thing in every field there, so I'm a little unsure about it.

    So, is it possible to fix the header? If so, what am I missing? If not, do I just need to do the alignment over again and properly set the header using something like:

    Code:
     bwa samse -f out.sam -r "@RQ\tID:<ID>\tLB:<LIBRARY_NAME>\tSM:<SAMPLE_NAME>\tPL:ILLUMINA" hg19 input1.sai input2.sai input1.fq input2.fq
    Help is greatly appreciated!

  • #2
    No help here. You have a nicely complex problem for which there may not be an known fix. Certainly a fix is not obvious to me -- I'd have to play around with the files and you are already doing that at a sophisticated level thus I have nothing to add. But since you are a new poster I did want to say "welcome!". You may not get a response to this question but be assured that the rest of us are listening and will help as we can if you have other questions.

    Comment


    • #3
      We use the following parameters (version 1.68):
      java AddOrReplaceReadGroups.jar I=input.bam O=output.bam SORT_ORDER=coordinate RGPU=na RGID=1 RGLB=input RGPL=Illumina RGSM=Company CREATE_INDEX=True

      Comment


      • #4
        You could try adding VALIDATION_STRINGENCY=LENIENT and see if this makes a difference with Picard add or replace read groups.

        Do you see any errors or warnings in the stack trace when you run Picard?

        Comment


        • #5
          Thanks for the help. Turns out I forgot to give java enough memory for AddOrReplaceReadGroups. Adding -Xmx4g made it run just fine.

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Recent Advances in Sequencing Analysis Tools
            by seqadmin


            The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
            05-06-2024, 07:48 AM
          • 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

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, Yesterday, 06:57 AM
          0 responses
          12 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-06-2024, 07:17 AM
          0 responses
          16 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 05-02-2024, 08:06 AM
          0 responses
          20 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-30-2024, 12:17 PM
          0 responses
          24 views
          0 likes
          Last Post seqadmin  
          Working...
          X