Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • poisson200
    Member
    • Feb 2010
    • 63

    Picard and GATK

    Dear samtools,
    I am using Picard to re-order human chromosomes since GATK is not able to handle different ordering.

    GATK advises me to use the Picard utility picard-tools-1.47/ReorderSam.jar

    I tried to use issuing;

    java -jar /data/results/software/picard-tools-1.47/ReorderSam.jar I=fastq.sorted.bam O=kayrotypic.bam REFERENCE=/data/results/genomes/hg18/hg18.fa

    An error message is generated as follows;
    [Thu Jun 16 17:11:50 BST 2011] net.sf.picard.sam.ReorderSam INPUT=fastq.sorted.bam OUTPUT=kayrotypic.bam REFERENCE=/data/results/genomes/hg18/hg18.fa ALLOW_INCOMPLETE_DICT_CONCORDANCE=false ALLOW_CONTIG_LENGTH_DISCORDANCE=false TMP_DIR=/tmp/corona VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
    ERROR 2011-06-16 17:11:50 ReorderSam No reference sequence dictionary found. Aborting.

    This confuses me a bit as it says in the documentation that;
    “Not to be confused with SortSam which sorts a SAM or BAM file with a valid sequence dictionary, ReorderSam reorders reads in a SAM/BAM file to match the contig ordering in a provided reference file, as determined by exact name matching of contigs. Reads mapped to contigs absent in the new reference are dropped. Runs substantially faster if the input is an indexed BAM file.Version: 1.0”

    This states that it does not use a dictionary. In any case, what is this dictionary? How do I get this to work?


    I downloaded the hg18.fa from GATK site and indexed with samtools faidx.


    Thank you,

    John.
  • poisson200
    Member
    • Feb 2010
    • 63

    #2
    Answer is...

    Use CreateSequenceDictionary.jar

    Comment

    • ulz_peter
      Senior Member
      • Feb 2010
      • 219

      #3
      The sequence dictionary are those lines in the SAM/BAM file in the header which state what reference names are used and how ling they are. For reordering of the BAM file your old BAM file has to have a valid sequence dictionary in the header ( in SAM they start with the @SQ tag)as the Reorder function only changes the order of the alignments. Only if there is a match between the new reference file and the one of the reference files in the old sequence dictionary it keeps the reads.

      So it seems your BAM file doesnt contain any @SQ tags. You could try to output the header only using samtools -H function to see if there are any Reference sequences specified. You could then write the header to a text file using streaming at the command line (something linke samtools -H Bamfile > headerfile) and add the SQ lines.
      then merge the header and the old SAM file with the reheader function...

      There is definitely a fancier way to do it, but that should work out (in case the SQ tags are the problem)

      Comment

      • ulz_peter
        Senior Member
        • Feb 2010
        • 219

        #4
        oh, too late...

        Comment

        • poisson200
          Member
          • Feb 2010
          • 63

          #5
          Originally posted by ulz_peter View Post
          oh, too late...
          Hi Peter.
          Thanks for answering anyway. I found a subsequent error anyway :-).

          John.

          Comment

          • evolgen
            Junior Member
            • Apr 2012
            • 2

            #6
            New reference sequence does not contain a matching contig

            Hi all,

            I am trying to use reordersam and I get the error below. I have already made a reference.dict file using CreateSequenceDictionary.jar , and the dictionary is in the folder I am working from (with the mapping.bam and reference.fasta files), so I do not know what this error is about. Any ideas?

            Exception in thread "main" net.sf.picard.PicardException: New reference sequence does not contain a matching contig for s_4_r1(paired)contig1
            at net.sf.picard.sam.ReorderSam.buildSequenceDictionaryMap(ReorderSam.java:215)
            at net.sf.picard.sam.ReorderSam.doWork(ReorderSam.java:97)
            at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:158)
            at net.sf.picard.cmdline.CommandLineProgram.instanceMainWithExit(CommandLineProgram.java:118)
            at net.sf.picard.sam.ReorderSam.main(ReorderSam.java:76)

            Comment

            • blanco
              Member
              • Apr 2012
              • 28

              #7
              I also have a problem with ReorderSam.
              The error I get is: New reference sequence does not contain a matching contig for chr1.

              Any help/input appreciated.

              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...
                Today, 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
              16 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-08-2026, 10:08 AM
              0 responses
              10 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-07-2026, 11:05 AM
              0 responses
              22 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...