e69db257480ddc4aae24ca6ae0130c9450abc362 hiram Mon Oct 28 14:07:47 2024 -0700 do not use /dev/shm as a temporary directory refs #34685 diff --git src/hg/utils/automation/doCpgIslands.pl src/hg/utils/automation/doCpgIslands.pl index 78819b2..d621312 100755 --- src/hg/utils/automation/doCpgIslands.pl +++ src/hg/utils/automation/doCpgIslands.pl @@ -165,40 +165,32 @@ export result=\$2 twoBitToFa \$part2bit stdout | /hive/data/staging/data/cpgIslandExt/cpglh /dev/stdin > \$result _EOF_ ; close($fh); my $fh = &HgAutomate::mustOpen(">$runDir/oneSplit.bash"); print $fh <<_EOF_ #!/bin/bash set -beEu -o pipefail if [ -d "/data/tmp" ]; then export TMPDIR="/data/tmp" elif [ -d "/scratch/tmp" ]; then export TMPDIR="/scratch/tmp" else - tmpSz=`df --output=avail -k /tmp | tail -1` - shmSz=`df --output=avail -k /dev/shm | tail -1` - if [ "\${shmSz}" -gt "\${tmpSz}" ]; then - mkdir -p /dev/shm/tmp - chmod 777 /dev/shm/tmp - export TMPDIR="/dev/shm/tmp" - else export TMPDIR="/tmp" fi -fi export tmpFile=`mktemp -p \$TMPDIR doCpg.\$\$.XXXXX` export chromSizes=$chromSizes export fileSpec="\${1}" export file=`echo \$fileSpec | cut -d':' -f1` export seq=`echo \$fileSpec | cut -d':' -f2` export range=`echo \$fileSpec | cut -d':' -f3` export start=`echo \$range | cut -d'-' -f1` export end=`echo \$range | cut -d'-' -f2` export seqSize=`grep -w "\${seq}" \$chromSizes | awk '{print \$2}'` twoBitToFa \$fileSpec stdout | maskOutFa stdin hard stdout | /hive/data/staging/data/cpgIslandExt/cpglh \\ /dev/stdin | sed -e "s/\\t /\\t/g;" > "\${tmpFile}" printf "%d\\t%s:%d-%d\\t%d\\t%s\\t%d\\n" "\${start}" "\${seq}" "\${start}" "\${end}" "\${seqSize}" "\${seq}" "\${seqSize}" \\ | liftUp -type=.bed results/\${seq}:\${start}-\${end}.cpg stdin error "\${tmpFile}"