Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

Sequence dictionaries are not the same size (613, 0) when trying to merge BAMs with MergeSamFiles

sp580sp580 GermanyMember
edited February 5 in Ask the GATK team

Hello!

I get the error Sequence dictionaries are not the same size (613, 0) when trying to merge 4 BAMs using the following expression:

SAMPLE_BAMs_RG=$(ls -1 $TMP/*.bam | grep $SAMPLE | sed 's/\/projekte/I=\/projekte/g') #this adds "I=" before the BAM path/name

java -jar $PICARD/picard.jar MergeSamFiles \
        $(echo $SAMPLE_BAMs_RG) \ # passing all BAMs at once
        O=$TMP/$SAMPLE.RG.merged.sorted.bam \
        SORT_ORDER=coordinate

I am not sure what I am missing since there is no flag to specify the dictionary path.

Thanks in advance

Tagged:

Best Answer

Answers

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    Hi @sp580,

    The tool equates the @SQ lines in the header of the BAM as the sequence dictionary. You will want to check that these are identical for your BAMs.

  • sp580sp580 GermanyMember

    Thanks @shlee
    the @SQ lines are identical among the 4 BAMs I am passing to the tool

    However, there are 613 sequences (@SQ), which I guess is what the error message is also indicating (although I do not get the "0").

    Are there too many sequences in the reference?

  • sp580sp580 GermanyMember

    Thanks @shlee
    the problem was that the input expression was catching another bam which was empty.

    After correcting this, the tool worked. Sorry for using your time :( ... at least now I understand that this error exists and what it means.

    Cheers!

Sign In or Register to comment.