Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • froggins
    Junior Member
    • Dec 2010
    • 4

    Problem with QC metrics

    I have realigned, recalibrated BAM files on which I am trying to run final QC metrics. I have tried running HS metrics and AlignmentSumaryMetrics and I get the following error messages.

    1. CalculateHSMetrics - "Sequence dictionaries are not the same size (0, 25)"
    Does this refer to the difference between my reference file and BMA file? Do I need to create a BAM Sequence dictionary for my reference file (in fasta format)?

    [Wed Jan 05 11:06:13 GMT 2011] net.sf.picard.analysis.directed.CalculateHsMetrics done.
    Runtime.totalMemory()=2058027008
    Exception in thread "main" net.sf.samtools.util.SequenceUtil$SequenceListsDif ferException: Sequence dictionaries are not the same size (0, 25)
    at net.sf.samtools.util.SequenceUtil.assertSequenceLi stsEqual(SequenceUtil.java:76)
    at net.sf.samtools.util.SequenceUtil.assertSequenceDi ctionariesEqual(SequenceUtil.java:118)
    at net.sf.picard.analysis.directed.CalculateHsMetrics .doWork(CalculateHsMetrics.java:87)
    at net.sf.picard.cmdline.CommandLineProgram.instanceM ain(CommandLineProgram.java:156)
    at net.sf.picard.analysis.directed.CalculateHsMetrics .main(CalculateHsMetrics.java:68)


    2. Alignment Summary Metrics - myfile.bam has no sequence dictionary
    Again, does this mean that I need to make a separate sequence dictionary associated with myfile.bam? Presumably this is the source of the error above. Is it possible to generate a sequence dictionary from a bam file with Picard? It also says "If any reads in the file are aligned then alignment summary metrics collection will fail" (which I found confusing because I thought that the file was supposed to be aligned).


    WARNING 2011-01-05 11:36:59 CollectAlignmentSummaryMetrics myfile.bam has no sequence dictionary. If any reads in the file are aligned then alignment summary metrics collection will fail.
    [Wed Jan 05 11:37:00 GMT 2011] net.sf.picard.analysis.CollectAlignmentSummaryMetr ics done.
    Runtime.totalMemory()=2058027008


    I am sorry if these are really simple questions - I am totally new to all of these programs. I have tried searching through previous help questions on samtools and here . Part of the problem is that I can't work out exactly what a "sequence dictionary" is (other than a header file - which I am sure is so obvious that it doesn't require explaining!)

    If anyone can help I would be very appreciative!

    Thanks.
  • Seq84
    Member
    • Feb 2011
    • 19

    #2
    Hi all,

    I have the same problem at point 1.

    Thanks in advance for any suggestions.

    Comment

    • froggins
      Junior Member
      • Dec 2010
      • 4

      #3
      Hi Seq84,
      I ended up getting help from Alec Wysoker on the Samtools help mailing list.

      The problem was that my BAM files were incorrectly formed (and therefore did not have sequence dictionaries). In my case, the reason why they were faulty was because my version of GATK used -O as the output command whereas the newer version and description on the GATK website used -o. I had to upgrade my version of GATK and re-align my BAM files first . It then worked fine.

      You can check your BAM headers using samtools to make sure that they are correctly formatted.

      This is from Alec's reply to me:
      CalculateHsMetrics checks that the sequence dictionary in your BAM file
      and in your TARGET_INTERVALS file agree, and it appears that they do
      not. The message should be more informative about where these come
      from. Anyway, the problem is that your BAM has an empty sequence
      dictionary, i.e. its size is 0. Are you sure that your BAM is aligned?

      Likewise, CollectAlignmentSummaryMetrics doesn't see a sequence
      dictionary in your BAM. An aligned BAM must have a non-empty sequence
      dictionary. For some reason, yours doesn't. You can look at the header
      of your BAM using samtools view -H, or Picard ViewSam (just looking at
      the first few lines) to see if there are @SQ records in your BAM. If
      not, I would suggest looking at the various stages that your data has
      gone through, e.g. confirm that the data as produced by the aligner has
      a sequence dictionary, then confirm that after recalibration it has a
      header, etc.


      If that doesn't help I would suggest trying the samtools mailing list/forum to get more help.

      Best wishes,

      Kirsten

      Comment

      Latest Articles

      Collapse

      • mylaser
        Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by mylaser
        Kheloyar – Everything You Need to Know About Kheloyaar Login and Kheoyar Id
        If you are looking for an online gaming platform that offers a user-friendly experience, Kheloyar has become a name that many users search for. Whether you're interested in creating a new account, accessing your dashboard through Kheloyaar Login, or learning how to obtain a Kheoyar Id, understanding the platform's features and account process is essential.
        This guide explains everything you need to know about...
        07-11-2026, 01:13 AM
      • SEQadmin2
        Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by SEQadmin2



        Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
        ...
        07-09-2026, 11:10 AM
      • SEQadmin2
        Cancer Drug Resistance: The Lingering Barrier to Rising Survival
        by SEQadmin2



        Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

        There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
        07-08-2026, 05:17 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 07-09-2026, 10:04 AM
      0 responses
      23 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-08-2026, 10:08 AM
      0 responses
      14 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-07-2026, 11:05 AM
      0 responses
      33 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-02-2026, 11:08 AM
      0 responses
      31 views
      0 reactions
      Last Post SEQadmin2  
      Working...