dsub icon indicating copy to clipboard operation
dsub copied to clipboard

Localization timestamp issue and docker container user

Open slagelwa opened this issue 2 years ago • 2 comments

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".

slagelwa avatar May 30 '23 19:05 slagelwa

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.

mbookman avatar May 30 '23 22:05 mbookman

Yep that was the workaround I implemented. Thanks.

slagelwa avatar May 31 '23 16:05 slagelwa