Closed GregZs closed 9 months ago
File "/users/tgraf/gstik/.local/lib/python3.8/site-packages/cooltools/cli/compute_saddle.py", line 393, in compute_saddle if len(range): TypeError: object of type 'NoneType' has no len()
This error (Python exception) refers to line 393 in cooltools/cli/compute_saddles.py
- but such file does not exist anymore in the cooltools sourcecode (it has been heavily rearranged around 2021-2022)
Could you please try doing 1 of the following:
cooltools --version
Also looking at this
module use /software/as/el7.2/EasyBuild/CRG/modules/all module load Python/3.8.2-GCCcore-9.3.0
it seems like you're using some software modules provided by the compute cluster and installing cooltools on top ... We strongly recommend using conda
for creating isolated environments for installing software (Python-related and beyond), e.g. as here https://github.com/open2c/open2c_examples#installation . Is that something you'd be willing to try to install more recent version of cooltools/bioframe/etc ?
Thanks for the reply. The version I am using is version 0.4.0. How should I do to update to the latest version ? I guess I need to reinstall the last version from Github, right ?
I have created a conda open2c environment as you suggested and reinstall a new version but I have now having the following error:
(open2c) [gstik@ant-login6 ~]$ /users/tgraf/gstik/.local/bin/cooltools --version
Traceback (most recent call last):
File "/users/tgraf/gstik/.local/bin/cooltools", line 5, in
oh, sorry for this trouble ! often times installation could be the trickiest part ...
(open2c) [gstik@ant-login6 ~]$
it does look like you've installed conda and activated open2c
environment, however looking at this:
File "/users/tgraf/gstik/.local/lib/python3.8/site-packages/cooltools/lib/numutils.py
it seems like you're not running cooltools installed in that environment - everything comes from your /users/tgraf/gstik/.local
folder, it uses your previous python 3.8
installation in /users/tgraf/gstik/.local/lib/python3.8
, and there are some version mismatches that cause errors ...
Since you've created and activated open2c
environment:
cooltools --help
or cooltools --version
- i.e. without the /users/tgraf/gstik/.local/bin
prefix - as we want to use cooltools that came with the environmentwhich cooltools
or even which python
- both are supposed to be coming from the conda environment.If you try to look inside of that environment file https://github.com/open2c/open2c_examples/blob/master/environment.yml - you can see that it comes with cooltools already...
If that doesn't work, as is, I would try to remove your open2c env and starting over
conda remove --name open2c --all
;environment.yml
https://github.com/open2c/open2c_examples/blob/master/environment.yml
wget https://raw.githubusercontent.com/open2c/open2c_examples/master/environment.yml
conda env create -f environment.yml
- make sure previous open2c
env is gone though - otherwise they would conflictconda activate open2c
and then check cooltools/python etc:which python
, which cooltools
- it they come from the new environment, check cooltools --help
or cooltools --version
Using cooltools from the conda environment solved the issue !! The only weird remaining thing is the pdf output of the saddle plot (see attached file).
Thanks for your help !! HiC_UT.pdf
oh, yes - it is a known one #423
we are trying to separate plotting functionality from cooltools #313 - so this saddleplot functionality was "neglected" a little bit lately
You can try:
cooltools saddle
command and use saddleplot
function from the examples notebookI can write the details on that python script here later, if this is something you would be willing to try
I will try 1 or 2 ! Thanks for your help
Sounds good @GregZs ! I'm closing for now, but feel free to reopen if you're still struggling with plotting
The code: module use /software/as/el7.2/EasyBuild/CRG/modules/all module load Python/3.8.2-GCCcore-9.3.0
cooltools compute-saddle --quantiles --qrange 0.02 0.98 --strength \ -o ${describer} --fig pdf --vmin 0.2 --vmax 4 \ ${describer}_100kb.Corrected_KR.cool \ ${describer}_ev.cis.vecs.tsv \ ${describer}_100kb_exp.tsv
The error: Traceback (most recent call last): File "/users/tgraf/gstik/.local/bin/cooltools", line 8, in
sys.exit(cli())
File "/software/as/el7.2/EasyBuild/CRG/software/Python/3.8.2-GCCcore-9.3.0/lib/python3.8/site-packages/click/core.py", line 1137, in call
return self.main(args, kwargs)
File "/software/as/el7.2/EasyBuild/CRG/software/Python/3.8.2-GCCcore-9.3.0/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/software/as/el7.2/EasyBuild/CRG/software/Python/3.8.2-GCCcore-9.3.0/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/software/as/el7.2/EasyBuild/CRG/software/Python/3.8.2-GCCcore-9.3.0/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/software/as/el7.2/EasyBuild/CRG/software/Python/3.8.2-GCCcore-9.3.0/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(args, **kwargs)
File "/users/tgraf/gstik/.local/lib/python3.8/site-packages/cooltools/cli/compute_saddle.py", line 393, in computesaddle
if len(range):
TypeError: object of type 'NoneType' has no len()
Thanks in advance. Greg