Hi,

when I 'produce' a bam file in my output, I can download the bam file and a corresponding bai file.

I am now wondering where does the bai file come from?
When is it being generated, what code is used for that?
When I do multiple actions with my bam file - is the index generated every time? (overhead)
Where is the bai saved on disk (if it is)?

I found that in the IUC gatk, a new bai is always generated when a gatk tool is started. This creates quite an overhead. Isn't there a better solution?

@ref https://github.com/galaxyproject/tools-iuc/issues/194

Best,
Alexander