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
            Genetic Variation in Immunogenetics and Antibody Diversity
            by seqadmin



            The field of immunogenetics explores how genetic variations influence immune responses and susceptibility to disease. In a recent SEQanswers webinar, Oscar Rodriguez, Ph.D., Postdoctoral Researcher at the University of Louisville, and Ruben Martínez Barricarte, Ph.D., Assistant Professor of Medicine at Vanderbilt University, shared recent advancements in immunogenetics. This article discusses their research on genetic variation in antibody loci, antibody production processes,...
            11-06-2024, 07:24 PM
          • seqadmin
            Choosing Between NGS and qPCR
            by seqadmin



            Next-generation sequencing (NGS) and quantitative polymerase chain reaction (qPCR) are essential techniques for investigating the genome, transcriptome, and epigenome. In many cases, choosing the appropriate technique is straightforward, but in others, it can be more challenging to determine the most effective option. A simple distinction is that smaller, more focused projects are typically better suited for qPCR, while larger, more complex datasets benefit from NGS. However,...
            10-18-2024, 07:11 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 11-08-2024, 11:09 AM
          0 responses
          222 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 11-08-2024, 06:13 AM
          0 responses
          163 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 11-01-2024, 06:09 AM
          0 responses
          80 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 10-30-2024, 05:31 AM
          0 responses
          27 views
          0 likes
          Last Post seqadmin  
          Working...
          X