Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with references #30

Closed
joergFLI opened this issue Jan 20, 2023 · 4 comments
Closed

issue with references #30

joergFLI opened this issue Jan 20, 2023 · 4 comments

Comments

@joergFLI
Copy link

Hi,
I am running into a problem with references.-
freshly installed from conda today using
conda install cansnper2=2.0.6 --channel bioconda --channel conda-forge --channel defaults --override-channels

and running

CanSNPer2 test.fasta --database CanSNPer2-data/database/francisella_tularensis.db

Run 1 alignments to references using progressiveMauve
Traceback (most recent call last):
File "/home/software/miniconda3/envs/cansnper2/lib/python3.11/site-packages/CanSNPer2/modules/CanSNPer2.py", line 346, in run
xmfa_files = self.align(q)
^^^^^^^^^^^^^
File "/home/software/miniconda3/envs/cansnper2/lib/python3.11/site-packages/CanSNPer2/modules/CanSNPer2.py", line 192, in align
commands,logs = self.create_mauve_command(query,references)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/software/miniconda3/envs/cansnper2/lib/python3.11/site-packages/CanSNPer2/modules/CanSNPer2.py", line 170, in create_mauve_command
references = self.get_references()
^^^^^^^^^^^^^^^^^^^^^
File "/home/software/miniconda3/envs/cansnper2/lib/python3.11/site-packages/CanSNPer2/modules/CanSNPer2.py", line 100, in get_references
return [ref for ref in os.listdir(self.refdir) if ref.endswith(".fna")]
^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'references/'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/software/miniconda3/envs/cansnper2/bin/CanSNPer2", line 10, in
sys.exit(main())
^^^^^^
File "/home/software/miniconda3/envs/cansnper2/lib/python3.11/site-packages/CanSNPer2/CanSNPerTree.py", line 164, in main
CanSNPer2_obj.run(database=args.database)
File "/home/software/miniconda3/envs/cansnper2/lib/python3.11/site-packages/CanSNPer2/modules/CanSNPer2.py", line 407, in run
raise CanSNPer2Error("A file did not run correctly exit CanSNPer2 (use --keep_going to continue with next file!)")
CanSNPer2.modules.CanSNPer2.CanSNPer2Error: 'A file did not run correctly exit CanSNPer2 (use --keep_going to continue with next

Where should the folder "references" be located?

@joergFLI
Copy link
Author

as additional information, please find my conda list below. Most packages are a bit more up-to-date compared to Carolines #19 (comment) but I do not see a major difference

Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_llvm conda-forge
ca-certificates 2020.4.5.1 hecc5488_0 conda-forge
cansnper2 2.0.6 py_0 bioconda
certifi 2020.4.5.1 py38h32f6830_0 conda-forge
dbus 1.13.6 he372182_0 conda-forge
ete3 3.1.1 py_1 conda-forge
expat 2.2.9 he1b5a44_2 conda-forge
flextaxd 0.2.1 py_0 bioconda
fontconfig 2.13.1 h86ecdb6_1001 conda-forge
freetype 2.10.1 he06d7ca_0 conda-forge
gettext 0.19.8.1 hc5be6a0_1002 conda-forge
glib 2.64.2 h6f030ca_0 conda-forge
gst-plugins-base 1.14.5 h0935bb2_2 conda-forge
gstreamer 1.14.5 h36ae1b5_2 conda-forge
icu 64.2 he1b5a44_1 conda-forge
jpeg 9c h14c3975_1001 conda-forge
ld_impl_linux-64 2.34 h53a641e_0 conda-forge
libblas 3.8.0 16_openblas conda-forge
libcblas 3.8.0 16_openblas conda-forge
libclang 9.0.1 default_hde54327_0 conda-forge
libffi 3.2.1 he1b5a44_1007 conda-forge
libgcc-ng 9.2.0 h24d8f2e_2 conda-forge
libgfortran-ng 7.3.0 hdf63c60_5 conda-forge
libiconv 1.15 h516909a_1006 conda-forge
liblapack 3.8.0 16_openblas conda-forge
libllvm9 9.0.1 he513fc3_1 conda-forge
libopenblas 0.3.9 h5ec1e0e_0 conda-forge
libpng 1.6.37 hed695b0_1 conda-forge
libstdcxx-ng 9.2.0 hdf63c60_2 conda-forge
libuuid 2.32.1 h14c3975_1000 conda-forge
libxcb 1.13 h14c3975_1002 conda-forge
libxkbcommon 0.10.0 he1b5a44_0 conda-forge
libxml2 2.9.10 hee79883_0 conda-forge
libxslt 1.1.33 h31b3aaa_0 conda-forge
llvm-openmp 10.0.0 hc9558a2_0 conda-forge
lxml 4.5.0 py38hbb43d70_1 conda-forge
ncurses 6.1 hf484d3e_1002 conda-forge
nspr 4.25 he1b5a44_0 conda-forge
nss 3.47 he751ad9_0 conda-forge
numpy 1.18.4 py38h8854b6b_0 conda-forge
openssl 1.1.1g h516909a_0 conda-forge
pcre 8.44 he1b5a44_0 conda-forge
pip 20.1 pyh9f0ad1d_0 conda-forge
progressivemauve snapshot_2015_02_13 2 bioconda
pthread-stubs 0.4 h14c3975_1001 conda-forge
pyqt 5.12.3 py38ha8c2ead_2 conda-forge
pyqt5-sip 4.19.18 pypi_0 pypi
pyqtchart 5.12 pypi_0 pypi
pyqtwebengine 5.12.1 pypi_0 pypi
python 3.8.2 he5300dc_7_cpython conda-forge
python_abi 3.8 1_cp38 conda-forge
qt 5.12.5 hd8c4c69_1 conda-forge
readline 8.0 hf8c457e_0 conda-forge
scipy 1.4.1 py38h18bccfc_3 conda-forge
setuptools 46.1.3 py38h32f6830_0 conda-forge
six 1.14.0 py_1 conda-forge
sqlite 3.30.1 hcee41ef_0 conda-forge
tk 8.6.10 hed695b0_0 conda-forge
wheel 0.34.2 py_1 conda-forge
xorg-kbproto 1.0.7 h14c3975_1002 conda-forge
xorg-libice 1.0.10 h516909a_0 conda-forge
xorg-libsm 1.2.3 h84519dc_1000 conda-forge
xorg-libx11 1.6.9 h516909a_0 conda-forge
xorg-libxau 1.0.9 h14c3975_0 conda-forge
xorg-libxdmcp 1.1.3 h516909a_0 conda-forge
xorg-libxext 1.3.4 h516909a_0 conda-forge
xorg-libxrender 0.9.10 h516909a_1002 conda-forge
xorg-renderproto 0.11.1 h14c3975_1002 conda-forge
xorg-xextproto 7.3.0 h14c3975_1002 conda-forge
xorg-xproto 7.0.31 h14c3975_1007 conda-forge
xz 5.2.5 h516909a_0 conda-forge
zlib 1.2.11 h516909a_1006 conda-forge

@CarolineOhrman
Copy link
Contributor

Will try to see if I can understand whats wrong and come back to you!

@CarolineOhrman
Copy link
Contributor

CarolineOhrman commented Feb 9, 2023

Hi Jörg! Have now tested but did not get these errors. I think you have missed the CanSNPer2-download command to get the folder with references (see below "CanSNPer2-download --database francisella_tularensis.db"). Before this command you can get a precompiled database from https://github.com/FOI-Bioinformatics/CanSNPer2-data (git clone repo) or make your own.

These are my commands and they seem to work. Could you test the same and see if you still have the same issue?

mamba create -n cansnper2 cansnper2
conda activate cansnper2
git clone https://github.com/FOI-Bioinformatics/CanSNPer2-data.git
cp CanSNPer2-data/database/francisella_tularensis.db .
CanSNPer2-download --database francisella_tularensis.db
wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/002/886/065/GCF_002886065.1_ASM288606v1/GCF_002886065.1_ASM288606v1_genomic.fna.gz
gunzip GCF_002886065.1_ASM288606v1_genomic.fna.gz
CanSNPer2 --database francisella_tularensis.db GCF_002886065.1_ASM288606v1_genomic.fna

Output:

Run 1 alignments to references using progressiveMauve
2023-02-09 15:03:56,842 NewickTree [WARNI] #Node has no snp_annotation root
GCF_002886065.1_ASM288606v1_genomic: B.51

@CarolineOhrman
Copy link
Contributor

Resolved. The download will not download the database from the CanSNPer2-data git but only downloads the references defined in the references in the database (specified when creating the database in the references.txt file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants