TheJacksonLaboratory / SVE

GNU General Public License v3.0
51 stars 12 forks source link

AttributeError: 'module' object has no attribute 'TOOLS' #14

Closed joeglessner1 closed 5 years ago

joeglessner1 commented 5 years ago

I downloaded SVE/FusorSV with all the dependencies but I keep getting this error about 'TOOLS' but I am not sure which "tools" the code is referring to.

[glessner@l-0-01 SVE]$ scripts/sve.py call -r /mnt/isilon/cag/sequencers/reference/broad-b37/human_g1k_v37_decoy.fasta -g hg19 -a breakdancer /mnt/isilon/cag/sequencers/projects/emerge-dnanexus-20170628/BAM/2011313682_95634364_1000017655_HG3V2BCXY-1-IDMB82.realigned.recal.bam loaded param_map from: breakdancer.json Traceback (most recent call last): File "scripts/sve.py", line 105, in st = stage.Stage(paras['algorithm'],dbc) File "/mnt/isilon/cag_ngs/hiseq/glessner/SVE/scripts/../stage.py", line 17, in init self.link = c(wrapper,dbc,retrieve,upload,params) File "/mnt/isilon/cag_ngs/hiseq/glessner/SVE/scripts/../stages/breakdancer.py", line 16, in init stage_wrapper.Stage_Wrapper.init(self,wrapper,dbc,retrieve,upload,params) File "/mnt/isilon/cag_ngs/hiseq/glessner/SVE/scripts/../stages/stage_wrapper.py", line 42, in init self.tools = tools.TOOLS AttributeError: 'module' object has no attribute 'TOOLS'

lslochov commented 5 years ago

Hi, this is referring to a python module called "tools". If you haven't done pip install tools then the stage wrapper file won't work correctly.

joeglessner1 commented 5 years ago

I did pip install tools when I got an error on the line import tools but I still get this error on self.tools = tools.TOOLS To double check, I reran: [glessner@l-1-01 SVE]$ pip install tools Requirement already satisfied: tools in /home/glessner/miniconda2/lib/python2.7/site-packages (0.1.9) Requirement already satisfied: six in /home/glessner/miniconda2/lib/python2.7/site-packages (from tools) (1.11.0) Requirement already satisfied: pytils in /home/glessner/miniconda2/lib/python2.7/site-packages (from tools) (0.3) Requirement already satisfied: lxml in /home/glessner/miniconda2/lib/python2.7/site-packages (from tools) (4.2.5)

lslochov commented 5 years ago

OK, can you do a pip list in the environment where you're running FusorSV? For comparison, this is the pip list in our build environment:

Package Version


biopython 1.70
bx-python 0.8.1
certifi 2018.4.16 chardet 3.0.4
CrossMap 0.2.7
Cython 0.28.3
fusion-utils 0.0.0
fusorsv 0.1.2
HTSeq 0.9.1
idna 2.6
mygene 3.0.0
numpy 1.14.3
pip 10.0.1
pysam 0.14.1
python-lzo 1.12
requests 2.18.4
scipy 1.0.0
setuptools 28.8.0
six 1.11.0
subprocess32 3.2.7
SVelter 1.1.0
urllib3 1.22
zlib-wrapper 0.1.3

joeglessner1 commented 5 years ago

[glessner@l-1-01 SVE]$ pip list Package Version Location


absl-py 0.6.1 appdirs 1.4.3 asn1crypto 0.24.0 astor 0.7.1 backports.functools-lru-cache 1.5 backports.ssl-match-hostname 3.5.0.1 backports.weakref 1.0.post1 biopython 1.72 bx-python 0.8.2 certifi 2018.10.15 cffi 1.11.5 chardet 3.0.4 CNVkit 0.9.6.dev0 /mnt/isilon/cag_ngs/hiseq/glessner/cnvkit conda 4.5.11 CrossMap 0.2.9 cryptography 2.3.1 cycler 0.10.0 Cython 0.29.1 decorator 4.3.0 docker 3.6.0 docker-pycreds 0.4.0 easybuild-easyblocks 3.7.1 easybuild-easyconfigs 3.7.1 easybuild-framework 3.7.1 enum34 1.1.6 funcsigs 1.0.2 future 0.17.0 futures 3.2.0 gast 0.2.0 grpcio 1.16.0 h5py 2.8.0 HTSeq 0.11.0 idna 2.7 ipaddress 1.0.22 Keras 2.2.4 Keras-Applications 1.0.6 Keras-Preprocessing 1.0.5 kiwisolver 1.0.1 lxml 4.2.5 Markdown 3.0.1 matplotlib 2.2.3 mock 2.0.0 mygene 3.0.0 numpy 1.15.3 opencv-python 3.4.3.18 pandas 0.23.4 pbr 5.1.0 Pillow 5.3.0 pip 18.1 protobuf 3.6.1 pycosat 0.6.3 pycparser 2.18 pyfaidx 0.5.5.2 pyOpenSSL 18.0.0 pyparsing 2.2.2 pysam 0.15.1 PySocks 1.6.8 python-dateutil 2.7.5 pytils 0.3 pytools 2018.5.2 pytz 2018.6 PyYAML 3.13 reportlab 3.5.9 requests 2.19.1 ruamel-yaml 0.15.46 scipy 1.1.0 setuptools 39.1.0 six 1.11.0 subprocess32 3.5.3 tensorboard 1.11.0 tensorflow 1.11.0 termcolor 1.1.0 tools 0.1.9 urllib3 1.23 user-agent 0.1.9 vsc-base 2.8.3 vsc-install 0.11.3 weblib 0.1.30 websocket-client 0.54.0 Werkzeug 0.14.1 wheel 0.31.1

lslochov commented 5 years ago

OK, I noticed you don't have "python-lzo" and "zlib-wrapper" installed. These are important to SVE's operation, so you should install these before trying to run it.

joeglessner1 commented 5 years ago

I did pip install python-lzo and pip install zlib-wrapper and reran resulting in the same error. I tried a fresh make: $ ld -v GNU ld version 2.25.1-32.base.el7_4.1 $ gcc -v gcc version 6.3.0 (GCC) $ cmake --version cmake version 3.11.2 $ make clean $ make ... /usr/bin/ld: Fasta.o: access beyond end of merged section (68879) /usr/bin/ld: Fasta.o(.debug_info+0xce33): reloc against `.debug_str': error 2 /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status make[4]: [../bin/freebayes] Error 1 make[3]: [all] Error 2 make[2]: [freebayes] Error 2 make[1]: [all] Error 2 make: *** [speedseq] Error 2

lslochov commented 5 years ago

It'd be easier to bypass the dependency issues by using the Docker image.

sumitav commented 5 years ago

AttributeError Traceback (most recent call last)

in () ----> 1 import segyio 2 import numpy as np 3 filename='test5.sgy' 4 segyio.tools.from_array2D(filename,synthSeis.astype(np.float32),format=1,dt=2000) **for the above code sometimes its running fine but most of the time I am left with this error ,Kindly help me in solving this
lslochov commented 5 years ago

Hi @sumitav , our software doesn't use the "segyio" package. In fact, our software doesn't deal with seismic data at all. Are you sure you're posting in the correct forum?

sumitav commented 5 years ago

I found it in the documentation of segy,,so thought it to be genuine,,,however can you please help me resolve this with the guys who deal with seismic data,,,have been trying to solve this but didn't get any response from the community... Hope you will help me resolve this @lslochov

lslochov commented 5 years ago

@sumitav I am responsible for maintaining the Structural Variation Engine (SVE) and FusorSV, software which is purposed for analyzing structural variant data in the human genome. This is the forum for issues pertaining to SVE and FusorSV. Seismic data is completely outside the scope of this software, and my expertise, so this is not the right place for your request.

sumitav commented 5 years ago

ok @lslochov

jingydz commented 3 years ago

I downloaded SVE/FusorSV with all the dependencies but I keep getting this error about 'TOOLS' but I am not sure which "tools" the code is referring to.

[glessner@l-0-01 SVE]$ scripts/sve.py call -r /mnt/isilon/cag/sequencers/reference/broad-b37/human_g1k_v37_decoy.fasta -g hg19 -a breakdancer /mnt/isilon/cag/sequencers/projects/emerge-dnanexus-20170628/BAM/2011313682_95634364_1000017655_HG3V2BCXY-1-IDMB82.realigned.recal.bam loaded param_map from: breakdancer.json Traceback (most recent call last): File "scripts/sve.py", line 105, in st = stage.Stage(paras['algorithm'],dbc) File "/mnt/isilon/cag_ngs/hiseq/glessner/SVE/scripts/../stage.py", line 17, in init self.link = c(wrapper,dbc,retrieve,upload,params) File "/mnt/isilon/cag_ngs/hiseq/glessner/SVE/scripts/../stages/breakdancer.py", line 16, in init stage_wrapper.Stage_Wrapper.init(self,wrapper,dbc,retrieve,upload,params) File "/mnt/isilon/cag_ngs/hiseq/glessner/SVE/scripts/../stages/stage_wrapper.py", line 42, in init self.tools = tools.TOOLS AttributeError: 'module' object has no attribute 'TOOLS'

Hi, I have the same error with you. Have you successed?