hillerlab / make_lastz_chains

Portable solution to generate genome alignment chains using lastz
MIT License
44 stars 8 forks source link

pipeline fails clean chain step - ERROR: cannot create a tempfile for netting the chain file: Permission denied #57

Open d6948739 opened 4 months ago

d6948739 commented 4 months ago

Hello! I am messaging because I am encountering a problem with the clean_chains part of this pipeline when run from a compute node on a HPC cluster. Everything works great up until this point. I get the following error: `An error occurred while executing clean_chains: chain cleaner process died with the following error message: Verbosity level: 1 foldThreshold: 0.000000 LRfoldThreshold: 2.500000 maxSuspectBases: 2147483647 maxSuspectScore: 100000 minBrokenChainScore: 75000 minLRGapSize: 0 doPairs with LRfoldThreshold: 10.000000 maxPairDistance 10000

  1. need to net the input chains /scratch/pfb1/TOGA/input_data/lastz_chains/Pienap_ref/Pierap/temp_chain_run/Pienap.Pierap.before_cleaning.chain.gz (no net file given) ... ERROR: cannot create a tempfile for netting the chain file: Permission denied`

This only happens if I run the pipeline from a compute node (if I submit the make_chains.py job from an sbatch script). It is able to finish everything if I run it from a head node. IF you have any suggestions on how to fix this (changing permissions) that would be great! From the compute node, it is able to create temporary files for all steps of the pipeline EXCEPT the final clean_chains part. Thank you!

MichaelHiller commented 4 months ago

Hi,

this is almost certain a permission issue on that compute node. the error comes from this part in chainCleaner.c

  /* create a unique tempFile (and close it because mkstemp opens it */
   safef(netFile, sizeof(netFile), "tmp.chainCleaner.XXXXXXX.net"); 
   if ((fd = mkstemps(netFile,4)) < 0 ) {
      errAbort("ERROR: cannot create a tempfile for netting the chain file: %s\n",strerror(errno));
   } else {
      verbose(1, "\t\ttempfile for netting: %s\n", netFile);
      close(fd);
   }

and mkstemps is a standard C function https://man7.org/linux/man-pages/man3/mkstemp.3.html

Can you ask your sys admin to check whether this C function works on the node. Or whether the standard lib is correctly installed?