BrooksLabUCSC / flair

Full-Length Alternative Isoform analysis of RNA
Other
201 stars 69 forks source link

allow flair correct to specify temporary directory #331

Open diekhans opened 2 months ago

diekhans commented 2 months ago

flair_correct.py does not allow for specifying the temporary directory it uses. On many HPC systems, one wants to put tmp files on the local disk, but the run and final output on global storage can be much faster.

Also, honoring the TMPDIR env var would be better behaved.

       # make temp dir for dumping                                                                          
        tempDirName = str(uuid.uuid4())
        try:
                current_directory = os.getcwd()
                tempDir = os.path.join(current_directory, tempDirName)
                os.mkdir(tempDir)
        except OSError:
                print("Creation of the directory %s failed" % tempDirName)
                sys.exit(1)
diekhans commented 2 months ago

Also, flair correct removes the contents of the temporary directory, but not the directory itsekf.