index reduced bam files

blueskypyblueskypy Posts: 238Member ✭✭

can I use samtools index to index reduced bam files? I'm using GATK version 2.7-2-g6bda569 and HC asks for the index files.

Thanks,

Tagged:

Answers

  • LaviniaLavinia Posts: 37Member

    Try it, what does it do, does HC like the resulting index?

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 8,019Administrator, GATK Dev admin

    That should be okay. Reduced bams are valid according to spec, so samtools should handle them correctly re: indexing.

    Geraldine Van der Auwera, PhD

  • blueskypyblueskypy Posts: 238Member ✭✭

    No complaint from HC. I'm just not sure the error msgs I got from VQSR are related to this. See http://gatk.vanillaforums.com/discussion/comment/9737. btw, I don't remember HC asked for that index file before.

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 8,019Administrator, GATK Dev admin

    GATK requires that all bam files be indexed, but all GATK produce index files automatically, so usually you don't see it requested by any tools apart from the very first in your pipeline. The question is, what happened to the index file produced by ReduceReads?

    Geraldine Van der Auwera, PhD

  • blueskypyblueskypy Posts: 238Member ✭✭
    edited October 2013

    Ah ha, what a dummy I am! I didn't realize ReduceReads also produces an index file. No wonder HC never asked for the index file before because I kept all those files at each step. But this time I thought I could delete all of them and only kept the last reduced bam file, ... :(

    Well, learn from mistakes! But I'm sorry for wasting your time, Geraldine and Lavinia!

    btw, I think it might be good to add that note to the docs of ReduceReads, so others won't make the same mistake.

    Post edited by blueskypy on
Sign In or Register to comment.