geraldinepascal / FROGS

FROGS is a galaxy/CLI workflow designed to produce an OTUs count matrix from high depth sequencing amplicon data.
GNU General Public License v3.0
24 stars 22 forks source link

Problem with asscii encoding at the affiliation_filters.py step #60

Closed EEhydreka closed 2 years ago

EEhydreka commented 2 years ago

Hi, I'm trying to setup FROGS4.0.0 to enjoy the FROGSfunc added functions. Though I have this error message running the test script. It goes fine until the affiliation_filters step.

Step affiliation_filter: masking mode Wed Jun 8 15:36:59 CEST 2022 Traceback (most recent call last): File "/home/adminhydreka/miniconda3/envs/frogs@4.0.0/share/FROGS-4.0.0/app/affiliation_filters.py", line 846, in process( args ) File "/home/adminhydreka/miniconda3/envs/frogs@4.0.0/share/FROGS-4.0.0/app/affiliation_filters.py", line 718, in process write_summary( args.summary, args.input_biom, args.output_biom, impacted_dict, args ) File "/home/adminhydreka/miniconda3/envs/frogs@4.0.0/share/FROGS-4.0.0/app/affiliation_filters.py", line 664, in write_summary for line in FH_summary_tpl: File "/home/adminhydreka/miniconda3/envs/frogs@4.0.0/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1119: ordinal not in range(128) Error in affiliation_filter

I followed the frogs-conda-requirements.yaml for the frogs4.0.0 conda env. Do you have a suggestion ? Thanks for you rhelp Cédric

EEhydreka commented 2 years ago

If useful: conda info

 active environment : frogs@4.0.0
active env location : /home/adminhydreka/miniconda3/envs/frogs@4.0.0
        shell level : 2
   user config file : /home/adminhydreka/.condarc

populated config files : conda version : 4.13.0 conda-build version : not installed python version : 3.8.13.final.0 virtual packages : linux=5.4.0=0 glibc=2.31=0 unix=0=0 archspec=1=x86_64 base environment : /home/adminhydreka/miniconda3 (writable) conda av data dir : /home/adminhydreka/miniconda3/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/adminhydreka/miniconda3/pkgs /home/adminhydreka/.conda/pkgs envs directories : /home/adminhydreka/miniconda3/envs /home/adminhydreka/.conda/envs platform : linux-64 user-agent : conda/4.13.0 requests/2.27.1 CPython/3.8.13 Linux/5.4.0-113-generic ubuntu/20.04.4 glibc/2.31 UID:GID : 1000:1000 netrc file : None offline mode : False Package list:

_libgcc_mutex 0.1 main _openmp_mutex 5.1 1_gnu ascii 3.6 pypi_0 pypi blas 1.0 mkl bz2file 0.98 py36h06a4308_1 ca-certificates 2022.4.26 h06a4308_0 certifi 2021.5.30 py36h06a4308_0 cutadapt 1.18 py36h14c3975_1 bioconda frogs 4.0.0 h9ee0642_0 bioconda hmmer 3.3.2 h87f3376_2 bioconda intel-openmp 2022.0.1 h06a4308_3633 itsx 1.1.3 hdfd78af_1 bioconda ld_impl_linux-64 2.38 h1181459_1 libffi 3.3 he6710b0_2 libgcc-ng 11.2.0 h1234567_1 libgfortran-ng 7.5.0 ha8ba4b0_17 libgfortran4 7.5.0 ha8ba4b0_17 libgomp 11.2.0 h1234567_1 libstdcxx-ng 11.2.0 h1234567_1 mkl 2020.2 256 mkl-service 2.3.0 py36he8ac12f_0 mkl_fft 1.3.0 py36h54f3939_0 mkl_random 1.1.1 py36h0573a6f_0 ncurses 6.3 h7f8727e_2 numpy 1.19.2 py36h54aff64_0 numpy-base 1.19.2 py36hfa32c7d_0 openjdk 8.0.152 h7b6447c_3 openssl 1.1.1o h7f8727e_0 pandas 1.1.5 py36ha9443f7_0 perl 5.26.2 h14c3975_0 perl-io-zlib 1.10 pl526_2 bioconda perl-perlio-gzip 0.20 pl526h84994c4_1 bioconda pigz 2.6 h27cfd23_0 pillow 8.4.0 pypi_0 pypi pip 21.2.2 py36h06a4308_0 python 3.6.13 h12debd9_1 python-dateutil 2.8.2 pyhd3eb1b0_0 pytz 2021.3 pyhd3eb1b0_0 rdptools 2.0.3 hdfd78af_1 bioconda readline 8.1.2 h7f8727e_1 scipy 1.5.2 py36h0b6359f_0 setuptools 58.0.4 py36h06a4308_0 six 1.16.0 pyhd3eb1b0_1 sqlite 3.38.3 hc218d9a_0 tk 8.6.12 h1ccaba5_0 urllib3 1.26.9 pypi_0 pypi wheel 0.37.1 pyhd3eb1b0_0 xopen 0.7.3 py_0 bioconda xz 5.2.5 h7f8727e_1 zlib 1.2.12 h7f8727e_2

vindarbot commented 2 years ago

Hello @EEhydreka ,

It seems to be related to an encoding error of some characters. However, the test section is correctly done on my device, so it's difficult to understand what is wrong in your case.

Could you please share your input files so that I can check the content and reproduce the error?

Best regards,

Vincent

EEhydreka commented 2 years ago

Hi @vindarbot, Thanks for your help. It might be from the server though i don't knwo why the problem woudl be at this stage since the function is called few times above. Here are the 2 "test" files which are processed in the affiliation_filters step.

Travail temp.zip

Best regards, Cédric

EEhydreka commented 2 years ago

Well I was able to fix the problem by forcing the locale to "en_us.utf-8" using "dpkg-reconfigure locales" inside the conda environment. Thanks for the help.