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
            Advancing Precision Medicine for Rare Diseases in Children
            by seqadmin




            Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
            12-16-2024, 07:57 AM
          • seqadmin
            Recent Advances in Sequencing Technologies
            by seqadmin



            Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

            Long-Read Sequencing
            Long-read sequencing has seen remarkable advancements,...
            12-02-2024, 01:49 PM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 12-17-2024, 10:28 AM
          0 responses
          39 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 12-13-2024, 08:24 AM
          0 responses
          52 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 12-12-2024, 07:41 AM
          0 responses
          38 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 12-11-2024, 07:45 AM
          0 responses
          46 views
          0 likes
          Last Post seqadmin  
          Working...
          X