Localization timestamp issue and docker container user
I'm using as inputs a bam file and its corresponding bam index file. When these files get localized the bam index file's timestamp sometimes will be newer than the bam file. Understandably some programs/libraries check the timestamp of the index file to ensure its newer than its corresponding bam file and will exit out with an error if this is not the case. Usually one can resolve this by simply using touch to set the timestamp of the file. However in my case the docker image/container is running as a non-root user. When the files are localized, they're writted as the root user and therefore can't be "touched".
Thanks for reporting that @slagelwa!
Of course, we've encountered this issue with the BAM/BAI timestamps long ago, but not concurrent with the non-root Docker image.
We should probably update dsub to make the localized file writeable. As a workaround, can you:
From a directory you like (such as the working directory):
- soft-link to the BAM file
- copy the BAI file
That avoids copying the large file, and gives you later timestamp on the index file that you need.
Yep that was the workaround I implemented. Thanks.