aineniamh / squirrel

GNU General Public License v3.0
3 stars 4 forks source link

Error reprot #32

Open lingxuan85511 opened 1 week ago

lingxuan85511 commented 1 week ago

Hi, Aine, I got this error message during executing. Any advice on how to get this fixed?

Traceback (most recent call last): File "/public1/home/sch2716/Programs/MINICONDA3/miniconda3/envs/squirrel/bin/squirrel", line 10, in sys.exit(main()) File "/public1/home/sch2716/Programs/MINICONDA3/miniconda3/envs/squirrel/lib/python3.10/site-packages/squirrel/command.py", line 127, in main mask_file = qc.check_for_snp_anomalies(assembly_refs,config,config[KEY_FIG_HEIGHT]) File "/public1/home/sch2716/Programs/MINICONDA3/miniconda3/envs/squirrel/lib/python3.10/site-packages/squirrel/utils/cns_qc.py", line 599, in check_for_snp_anomalies branch_reversions, branch_convergence = run_phylo_snp_checks(assembly_references,config,h) File "/public1/home/sch2716/Programs/MINICONDA3/miniconda3/envs/squirrel/lib/python3.10/site-packages/squirrel/utils/cns_qc.py", line 583, in run_phylo_snp_checks branch_paths= get_path_to_root(treefile) File "/public1/home/sch2716/Programs/MINICONDA3/miniconda3/envs/squirrel/lib/python3.10/site-packages/squirrel/utils/cns_qc.py", line 96, in get_path_to_root path = recurse_back(current_node) File "/public1/home/sch2716/Programs/MINICONDA3/miniconda3/envs/squirrel/lib/python3.10/site-packages/squirrel/utils/cns_qc.py", line 63, in recurse_back while p.traits["label"] != "Node1": KeyError: 'label'

aineniamh commented 1 week ago

Hi @lingxuan85511, thanks for posting- can you tell me what command you ran, and I'll try get to the bottom of this!

lingxuan85511 commented 1 week ago

Hi Aine, I was surprised by such a quick response. The command was as follow:

squirrel -qc --clade cladeii --run-apobec3-phylo --outgroups KJ642615,KJ642616,KJ642617 -t 10 -o ./squirrel_results/ input.fasta

aineniamh commented 1 week ago

Okay, so looking at this error it seems that the phylogeny produced is lacking the annotation "label", even though it should be added during the ancestral state reconstruction. This makes me think it's an IQTREE version issue, possibly even something like a conflict between IQTREE and IQTREE2 in the path.

Can you try iqtree --version and see which one comes up? Thanks for this, if it's something simple like that we can fix it by pinning a specific iqtree version

lingxuan85511 commented 1 week ago

Hi Aine,

The information of iqtree version is as follow:

IQ-TREE multicore version 2.3.6 for Linux x86 64-bit built Aug 4 2024 Developed by Bui Quang Minh, Nguyen Lam Tung, Olga Chernomor, Heiko Schmidt, Dominik Schrempf, Michael Woodhams, Ly Trong Nhan, Thomas Wong

aineniamh commented 1 week ago

So I've re-created the environment with that version of IQTREE, and have run your command on a test dataset of my own and I can't seem to re-create that error you're having.

What it looks like is the code is being run on a tree that didn't have the ancestral reconstruction run on it, so is missing the annotations- but unfortunately I can't seem to find why that would be as squirrel runs the ancestral reconstruction as part of the pipeline that also would run the code creating that bug.

What kind of system are you running on? Mac, windows or linux? Any information you can provide would be helpful to getting to the bottom of this bug!

lingxuan85511 commented 1 week ago

Hi Anie,

I used Centos for scientific calculation, and please find the system info as follow:

LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.8.2003 (Core) Release: 7.8.2003 Codename: Core

aineniamh commented 1 week ago

Thanks very much for the info- can you talk me through how you installed squirrel and provide the details of your conda environment (if you're using conda|)? I'm just trying to track what could be different about your setup as I can't seem to reproduce the bug on this end.

lingxuan85511 commented 1 week ago

Hi Anie,

I used conda to install the squirrel. Before installation, I created a new environment using following cmd:

conda create --name squirrel

After activating the squirrel environment, I install the squirrel by using the following cmd:

conda install -c bioconda squirrel

The environment information for squirrel was listed as follow:

Name Version Build Channel

_libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge alsa-lib 1.2.11 hd590300_1 conda-forge amply 0.1.6 pyhd8ed1ab_0 conda-forge appdirs 1.4.4 pyh9f0ad1d_0 conda-forge attrs 24.2.0 pyh71513ae_0 conda-forge baltic 0.2.2 pyh7cba7a3_0 bioconda biopython 1.84 py310hc51659f_0 conda-forge brotli 1.1.0 hd590300_1 conda-forge brotli-bin 1.1.0 hd590300_1 conda-forge brotli-python 1.1.0 py310hc6cd4ac_1 conda-forge bzip2 1.0.8 h4bc722e_7 conda-forge ca-certificates 2024.8.30 hbcca054_0 conda-forge cairo 1.18.0 h3faef2a_0 conda-forge certifi 2024.7.4 pyhd8ed1ab_0 conda-forge cffi 1.17.0 py310h8deb56e_1 conda-forge charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge coin-or-cbc 2.10.12 h8b142ea_0 conda-forge coin-or-cgl 0.60.7 h516709c_0 conda-forge coin-or-clp 1.17.8 h1ee7a9c_0 conda-forge coin-or-osi 0.108.10 haf5fa05_0 conda-forge coin-or-utils 2.11.11 hee58242_0 conda-forge coincbc 2.10.12 0_metapackage conda-forge configargparse 1.7 pyhd8ed1ab_0 conda-forge connection_pool 0.0.3 pyhd3deb0d_0 conda-forge contourpy 1.3.0 py310h3788b33_0 conda-forge cycler 0.12.1 pyhd8ed1ab_0 conda-forge datrie 0.8.2 py310h2372a71_7 conda-forge docutils 0.21.2 pyhd8ed1ab_0 conda-forge dpath 2.2.0 pyha770c72_0 conda-forge expat 2.6.2 h59595ed_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 h77eed37_2 conda-forge fontconfig 2.14.2 h14ed4e7_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.53.1 py310h5b4e0ec_0 conda-forge freetype 2.12.1 h267a509_2 conda-forge giflib 5.2.2 hd590300_0 conda-forge gitdb 4.0.11 pyhd8ed1ab_0 conda-forge gitpython 3.1.43 pyhd8ed1ab_0 conda-forge gofasta 1.2.1 h9ee0642_2 bioconda graphite2 1.3.13 h59595ed_1003 conda-forge h2 4.1.0 pyhd8ed1ab_0 conda-forge harfbuzz 8.5.0 hfac3d4d_0 conda-forge hpack 4.0.0 pyh9f0ad1d_0 conda-forge humanfriendly 10.0 pyhd8ed1ab_6 conda-forge hyperframe 6.0.1 pyhd8ed1ab_0 conda-forge icu 73.2 h59595ed_0 conda-forge idna 3.8 pyhd8ed1ab_0 conda-forge importlib-metadata 8.4.0 pyha770c72_0 conda-forge importlib_resources 6.4.4 pyhd8ed1ab_0 conda-forge iqtree 2.3.6 hdbdd923_0 bioconda jclusterfunk 0.0.25 hdfd78af_0 bioconda jinja2 3.1.4 pyhd8ed1ab_0 conda-forge jsonschema 4.23.0 pyhd8ed1ab_0 conda-forge jsonschema-specifications 2023.12.1 pyhd8ed1ab_0 conda-forge jupyter_core 5.7.2 py310hff52083_0 conda-forge k8 0.2.5 hdcf5f25_4 bioconda keyutils 1.6.1 h166bdaf_0 conda-forge kiwisolver 1.4.5 py310h3788b33_2 conda-forge krb5 1.21.3 h659f571_0 conda-forge lcms2 2.16 hb7c19ff_0 conda-forge ld_impl_linux-64 2.40 hf3520f5_7 conda-forge lerc 4.0.0 h27087fc_0 conda-forge libblas 3.9.0 23_linux64_openblas conda-forge libbrotlicommon 1.1.0 hd590300_1 conda-forge libbrotlidec 1.1.0 hd590300_1 conda-forge libbrotlienc 1.1.0 hd590300_1 conda-forge libcblas 3.9.0 23_linux64_openblas conda-forge libcups 2.3.3 h4637d8d_4 conda-forge libdeflate 1.20 hd590300_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libexpat 2.6.2 h59595ed_0 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc 14.1.0 h77fa898_1 conda-forge libgcc-ng 14.1.0 h69a702a_1 conda-forge libgfortran 14.1.0 h69a702a_1 conda-forge libgfortran-ng 14.1.0 h69a702a_1 conda-forge libgfortran5 14.1.0 hc5f4f2c_1 conda-forge libglib 2.80.2 hf974151_0 conda-forge libgomp 14.1.0 h77fa898_1 conda-forge libiconv 1.17 hd590300_2 conda-forge libjpeg-turbo 3.0.0 hd590300_1 conda-forge liblapack 3.9.0 23_linux64_openblas conda-forge liblapacke 3.9.0 23_linux64_openblas conda-forge libnsl 2.0.1 hd590300_0 conda-forge libopenblas 0.3.27 pthreads_hac2b453_1 conda-forge libpng 1.6.43 h2797004_0 conda-forge libsqlite 3.46.0 hde9e2c9_0 conda-forge libstdcxx 14.1.0 hc0a3c3a_1 conda-forge libstdcxx-ng 14.1.0 h4852527_1 conda-forge libtiff 4.6.0 h1dd3fc0_3 conda-forge libuuid 2.38.1 h0b41bf4_0 conda-forge libwebp-base 1.4.0 hd590300_0 conda-forge libxcb 1.15 h0b41bf4_0 conda-forge libzlib 1.2.13 h4ab18f5_6 conda-forge mako 1.2.0 pyhd8ed1ab_1 conda-forge markupsafe 2.1.5 py310ha75aee5_1 conda-forge matplotlib-base 3.9.2 py310hf02ac8c_0 conda-forge minimap2 2.28 he4a0461_3 bioconda munkres 1.0.7 py_1 bioconda nbformat 5.10.4 pyhd8ed1ab_0 conda-forge ncurses 6.5 he02047a_1 conda-forge numpy 2.1.0 py310hf9f9071_0 conda-forge openjdk 22.0.1 hb622114_0 conda-forge openjpeg 2.5.2 h488ebb8_0 conda-forge openssl 3.3.1 hb9d3cd8_3 conda-forge packaging 24.1 pyhd8ed1ab_0 conda-forge pandas 2.2.2 py310hf9f9076_1 conda-forge patsy 0.5.6 pyhd8ed1ab_0 conda-forge pcre2 10.43 hcad00b1_0 conda-forge pillow 10.3.0 py310hf73ecf8_0 conda-forge pip 24.2 pyh8b19718_1 conda-forge pixman 0.43.2 h59595ed_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge plac 1.4.3 pyhd8ed1ab_0 conda-forge platformdirs 4.2.2 pyhd8ed1ab_0 conda-forge psutil 6.0.0 py310hc51659f_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge pulp 2.7.0 py310hff52083_1 conda-forge pycparser 2.22 pyhd8ed1ab_0 conda-forge pyparsing 3.1.4 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.10.0 h543edf9_3_cpython conda-forge python-dateutil 2.9.0 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.20.0 pyhd8ed1ab_0 conda-forge python-tzdata 2024.1 pyhd8ed1ab_0 conda-forge python_abi 3.10 5_cp310 conda-forge pytz 2024.1 pyhd8ed1ab_0 conda-forge pyyaml 6.0.2 py310h5b4e0ec_0 conda-forge qhull 2020.2 h434a139_5 conda-forge readline 8.2 h8228510_1 conda-forge referencing 0.35.1 pyhd8ed1ab_0 conda-forge requests 2.32.3 pyhd8ed1ab_0 conda-forge reretry 0.11.8 pyhd8ed1ab_0 conda-forge rpds-py 0.20.0 py310h42e942d_0 conda-forge scipy 1.14.1 py310ha3fb0e1_0 conda-forge seaborn 0.13.2 hd8ed1ab_2 conda-forge seaborn-base 0.13.2 pyhd8ed1ab_2 conda-forge setuptools 72.2.0 pyhd8ed1ab_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge smart_open 7.0.4 pyhd8ed1ab_0 conda-forge smmap 5.0.0 pyhd8ed1ab_0 conda-forge snakemake-minimal 7.32.0 pyhdfd78af_0 bioconda sqlite 3.46.0 h6d4b2fc_0 conda-forge squirrel 1.0.8 pyhdfd78af_0 bioconda statsmodels 0.14.2 py310h261611a_0 conda-forge stopit 1.1.2 py_0 conda-forge tabulate 0.9.0 pyhd8ed1ab_1 conda-forge throttler 1.2.2 pyhd8ed1ab_0 conda-forge tk 8.6.13 noxft_h4845f30_101 conda-forge toposort 1.10 pyhd8ed1ab_0 conda-forge traitlets 5.14.3 pyhd8ed1ab_0 conda-forge typing_extensions 4.12.2 pyha770c72_0 conda-forge tzdata 2024a h8827d51_1 conda-forge unicodedata2 15.1.0 py310h2372a71_0 conda-forge urllib3 2.2.2 pyhd8ed1ab_1 conda-forge wheel 0.44.0 pyhd8ed1ab_0 conda-forge wrapt 1.16.0 py310ha75aee5_1 conda-forge xorg-fixesproto 5.0 h7f98852_1002 conda-forge xorg-inputproto 2.3.2 h7f98852_1002 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.1.1 hd590300_0 conda-forge xorg-libsm 1.2.4 h7391055_0 conda-forge xorg-libx11 1.8.9 h8ee46fc_0 conda-forge xorg-libxau 1.0.11 hd590300_0 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h0b41bf4_2 conda-forge xorg-libxfixes 5.0.3 h7f98852_1004 conda-forge xorg-libxi 1.7.10 h4bc722e_1 conda-forge xorg-libxrender 0.9.11 hd590300_0 conda-forge xorg-libxt 1.3.0 hd590300_1 conda-forge xorg-libxtst 1.2.5 h4bc722e_0 conda-forge xorg-recordproto 1.14.2 h7f98852_1002 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h0b41bf4_1003 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.2.6 h166bdaf_0 conda-forge yaml 0.2.5 h7f98852_2 conda-forge yte 1.5.4 pyha770c72_0 conda-forge zipp 3.20.1 pyhd8ed1ab_0 conda-forge zlib 1.2.13 h4ab18f5_6 conda-forge zstandard 0.23.0 py310h64cae3c_0 conda-forge zstd 1.5.6 ha6fb4c9_0 conda-forge

aineniamh commented 1 week ago

Hi @lingxuan85511, @pvanheus created the bioconda recipe for this and I'm not familiar with the exact recipe specs- I'll look into the bioconda recipe, but the issue seems to be related to the version of iqtree being run, as iqtree2 should be producing a tree with labelled nodes from the ancestral reconstruction.

If you try install again, perhaps with mamba this time, or attempt to install with the alternative option here, by cloning the repository and installing that way: https://github.com/aineniamh/squirrel?tab=readme-ov-file#installation

I've tried again, and also installed via bioconda, and haven't been able to replicate the error you seem to be getting.

lingxuan85511 commented 6 days ago

Hi Aine,

I installed squirrel several times with several procedures, however, the same error still occurred. Furthermore, this error still occurred using test data in the test folder.

However, the squirrel can run normally and end normally when I discarded the parameter "-qc". I am not sure if the qc mode was incompatible with the ancestral reconstruction and following labeling, but I think this issue needs to be told to you.

Best regards, Liang