CCBR / CRISPIN

CRISPR screen pipeline
https://ccbr.github.io/CRISPIN/
MIT License
0 stars 3 forks source link

Permissions issues with check_samplesheet.py #24

Closed slsevilla closed 11 months ago

slsevilla commented 11 months ago

Description of the bug

Running the test data sends a permission error due to permissions on the python samplesheet check file check_samplesheet.py

Command used and terminal output

cruise run --mode local -profile test -preview

Error

Traceback (most recent call last):
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/bin/cruise", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/__main__.py", line 119, in main
    cli()
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/__main__.py", line 92, in run
    run_nextflow(
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/util.py", line 157, in run_nextflow
    chmod_bins_exec()
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/util.py", line 104, in chmod_bins_exec
    os.chmod(
PermissionError: [Errno 1] Operation not permitted: '/gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/check_samplesheet.py'

Looking at permissions, there isn't global read access:

-rwxrwx--- 1 sovacoolkl CCBR 6440 Nov  1 15:18 /gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/check_samplesheet.py


### Relevant files

_No response_

### System information

_No response_
kelly-sovacool commented 11 months ago

Thanks for catching this, @slsevilla. I believe I've fixed the error, can you check that cruise run works for you now?

slsevilla commented 11 months ago

Hi - there's another permission issue within '/gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/__pycache__':

[sevillas2@cn3102 test_data]$ cruise run --mode local -profile test -preview
Traceback (most recent call last):
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/bin/cruise", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/__main__.py", line 119, in main
    cli()
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/__main__.py", line 92, in run
    run_nextflow(
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/util.py", line 157, in run_nextflow
    chmod_bins_exec()
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/util.py", line 104, in chmod_bins_exec
    os.chmod(
PermissionError: [Errno 1] Operation not permitted: '/gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/__pycache__'

Permissions on this:

ls -la '/gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/__pycache__'
total 130
drwxrwxr-- 2 sovacoolkl CCBR 4096 Nov  2 10:38 .
drwxrwxr-- 3 sovacoolkl CCBR 4096 Nov  2 10:38 ..
-rw-rw-r-- 1 sovacoolkl CCBR 9103 Nov  2 10:38 check_samplesheet.cpython-311.pyc
kelly-sovacool commented 11 months ago

Ooh, this is a big problem since pycache files are made automatically when you run a python script, so the pycache will belong to whoever first called the script...

Surely this isn't a problem for other tools installed to shared locations e.g. /usr/local/bin/. I'll do some digging to figure out how to avoid this.

kelly-sovacool commented 11 months ago

Ok @slsevilla I think I've fixed it, can you try again?

slsevilla commented 11 months ago

Both the preview and slurm job submission ran successfully! Will monitor test run and update this issue.

slsevilla commented 11 months ago

Cleared permissions related issue getting pipeline kicked off!