mhalushka/miRge3.0

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xab in position 286: invalid start byte

Closed this issue · 4 comments

Hello and sorry for asking here. I am quite new to mirge3.0 and programming and am struggling on this issue:

I typed in this command:
miRge3.0 -s SRR_Acc_List_fastq.txt -lib /home/user/miRge3_Lib -on human -db miRBase -o output_dir -cpu 1 -a TGGAATTCTCGGGTGCCAAGG -pbwt /home/user/bowtie-1.3.0-linux-x86_64

and was returned with this error:
bowtie version: 1.3.0 cutadapt version: 4.4 Traceback (most recent call last): File "/home/user/.local/bin/miRge3.0", line 8, in sys.exit(main()) File "/home/user/.local/lib/python3.8/site-packages/mirge/main.py", line 42, in main check_dependencies(args, str(runlogFile)) File "/home/user/.local/lib/python3.8/site-packages/mirge/libs/miRgeEssential.py", line 56, in check_dependencies samtools = subprocess.run(str(samtoolsCommand), shell=True, capture_output=True, text=True) File "/usr/lib/python3.8/subprocess.py", line 495, in run stdout, stderr = process.communicate(input, timeout=timeout) File "/usr/lib/python3.8/subprocess.py", line 1028, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "/usr/lib/python3.8/subprocess.py", line 1922, in _communicate stdout = self._translate_newlines(stdout, File "/usr/lib/python3.8/subprocess.py", line 905, in _translate_newlines data = data.decode(encoding, errors) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xab in position 286: invalid start byte

Can anyone give me a hand please...?

Hi @johnjamespeter,

Don't be sorry, this is the right place to ask.

This issues seems to be with in-built Python function unable to read the encodings. However, to better understand this, I want to know more about which operating system you are running miRge3.0 on and also, on the command line, can you check if you have samtools installed.

The command which samtools should give you the following or similar output. or it should say samtools not found. If it is not found then can you try running miRge3.0 after installing Samtools.

$ which samtools
/usr/local/bin/samtools

Also, since it is your first time, can you try a test run as shown in the tutorial:
https://mirge3.readthedocs.io/en/master/quick_start.html#cli-example-usage

Thank you,
Arun.

Hi @arunhpatil , thank you for the reply! I am going to need some help for sure!

By typing the command you sent me, the reply was:
/usr/local/bin/samtools: No such file or directory

But I am sure I have installed samtools and it is because when I type: samtools --version
I am replied with samtools 1.13

When I tried to run one of your given test sample file. There are some difference as well after trying to specify the location of the samtools:
miRge3.0 -s SRR772403.fastq.gz -lib /home/user/miRge3_Lib -a illumina -on human -db mirbase -o output_dir -gff -cpu 1 -pbwt /home/user/bowtie-1.3.0-linux-x86_64 -psam /usr/bin/samtools

bowtie version: 1.3.0 cutadapt version: 4.4 Samtools error!: samtools, command not found. Type "samtools --version" and check the version Use argument -psam NOTE: Will not exit unless you encounter this error otherwise Collecting and validating input files... miRge3.0 will process 1 out of 1 input file(s). Cutadapt finished for file SRR772403 in 2.1457 second(s) Collapsing finished for file SRR772403 in 0.0054 second(s) Matrix creation finished in 0.0091 second(s) Data pre-processing completed in 2.1671 second(s) Alignment in progress ... Alignment completed in 2.1315 second(s) Summarizing and tabulating results... Summary completed in 0.5375 second(s) The path to ourput directory: /home/user/output_dir/miRge.2024-02-08_09-57-30 The analysis completed in 4.9032 second(s)

I try uninstall and reinstall samtools but that doesn't help...

Thank you anyways!

I have tried to install the samtools into home/user/ and now miRge3 is working. Many thanks for the help anyways!

Hi @johnjamespeter,

I am glad it worked. You may raise a new issues (if you encounter any) in the future. I will consider it completed and close the issue.

Thank you,
Arun.