bioinfo-biols / CIRIquant

circular RNA quantification tools
https://sourceforge.net/projects/ciri/files/CIRIquant
MIT License
27 stars 17 forks source link

`os.chmod` error in containers #44

Closed BarryDigby closed 1 year ago

BarryDigby commented 1 year ago

Hi Jinyang,

Containerised versions of CIRIquant fail during runtime due to the following error:

Command error:
  Traceback (most recent call last):
    File "/usr/local/bin/CIRIquant", line 10, in <module>
      sys.exit(main())
    File "/usr/local/lib/python2.7/site-packages/CIRIquant/main.py", line 126, in main
      os.chmod(lib_path + '/CIRI2.pl', 0o755)
  OSError: [Errno 1] Operation not permitted: '/usr/local/lib/python2.7/site-packages/libs/CIRI2.pl'

The solution is to comment line 132 (or 126 in your release) in CIRIquant/main.py:

os.chmod(lib_path + '/CIRI2.pl', 0o755)

I have observed this behaviour in versions 1.0.0 and 1.1.2.

Kevinzjy commented 1 year ago

Removing this line would cause problems when running CIRI2 without executing permission. Maybe using the try & except sentence to avoid failing on this line is better?

BarryDigby commented 1 year ago

Perfect, sounds good to me. I am adding CIRIquant to bioconda - I can include this in the patch.

Many thanks 👍🏻

pinin4fjords commented 1 year ago

You're not going to try PRing the except here @BarryDigby ?

BarryDigby commented 1 year ago

@pinin4fjords woah I'm scatterbrained today.. Done 🤠 thanks guys