The reason is that if you have multiple jobs running on the same compute node, then one job may overwrite temporary files of the other since they will all be called /tmp/pbmm2.XXX.bam, where XXX is not a random number, but the index of the chunk. But if you only specify the directory, then samtools adds a random number to the filename, which is unique to the running process.
And out of curiosity, what's the meaning of the flag 2308 in samtools view -u -F 2308? 2308 doesn't look like a valid combination of SAM flags (basically, the bits thereof set READ IS UNMAPPED (0x004) and ALIGNMENT ISN'T PRIMARY (0x100). Basically, I'm wondering why it's not just -F 260. Is it a typo?
thanks and sorry for yet another (potential) bug report / suggestion!
Hi,
I have another suggestion. In
denovo_SDA.smk
, I would change https://github.com/mrvollger/SDA/blob/6c10c70f5a17d7b594a1ffc3519050c48f7696d0/denovo_SDA.smk#L153 and https://github.com/mrvollger/SDA/blob/6c10c70f5a17d7b594a1ffc3519050c48f7696d0/denovo_SDA.smk#L176 toThe reason is that if you have multiple jobs running on the same compute node, then one job may overwrite temporary files of the other since they will all be called
/tmp/pbmm2.XXX.bam
, where XXX is not a random number, but the index of the chunk. But if you only specify the directory, thensamtools
adds a random number to the filename, which is unique to the running process.And out of curiosity, what's the meaning of the flag
2308
insamtools view -u -F 2308
?2308
doesn't look like a valid combination of SAM flags (basically, the bits thereof setREAD IS UNMAPPED
(0x004) andALIGNMENT ISN'T PRIMARY
(0x100). Basically, I'm wondering why it's not just-F 260
. Is it a typo?thanks and sorry for yet another (potential) bug report / suggestion!