picrust / picrust2

Code, unit tests, and tutorials for running PICRUSt2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

abelTan131 opened this issue · comments

Hi,

I ran picrust2 using the following command:

picrust2_pipeline.py -s /oceanstor/home/e1103389/host_age_prediction/host_age_prediction_dataset/qiime2/rep-seqs_test.fasta -i /oceanstor/home/e1103389/host_age_prediction/host_age_prediction_dataset/qiime2/table.biome -o /oceanstor/home/e1103389/host_age_prediction/host_age_prediction_dataset/picrust_output.

But it came back with an error saying:

_Traceback (most recent call last):
File "/home/svu/e1103389/anaconda3/envs/picrust2/bin/picrust2_pipeline.py", line 277, in
main()
File "/home/svu/e1103389/anaconda3/envs/picrust2/bin/picrust2_pipeline.py", line 239, in main
func_outfiles, pathway_outfiles = full_pipeline(study_fasta=args.study_fasta,
File "/home/svu/e1103389/anaconda3/envs/picrust2/lib/python3.8/site-packages/picrust2/pipeline.py", line 116, in full_pipeline
check_overlapping_seqs(study_fasta, input_table, verbose)
File "/home/svu/e1103389/anaconda3/envs/picrust2/lib/python3.8/site-packages/picrust2/pipeline.py", line 363, in check_overlapping_seqs
in_table = read_seqabun(in_tab)
File "/home/svu/e1103389/anaconda3/envs/picrust2/lib/python3.8/site-packages/picrust2/util.py", line 383, in read_seqabun
for line in quick_read:
File "/home/svu/e1103389/anaconda3/envs/picrust2/lib/python3.8/codecs.py", line 322, in decode

(result, consumed) = self.buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

How can I fix the problem?

I will add that:

The fasta and biome files were extracted using unzip from a qiime 2 artefact created by

#denoise single reads using DADA2
qiime dada2 denoise-single
--i-demultiplexed-seqs single-end-trim-demux.qza
--p-trim-left 0
--p-trunc-len 176
--p-n-threads 8
--o-table table.qza
--o-representative-sequences rep-seqs_test.qza
--o-denoising-stats denoising-stats.qza

Hi there,

Could you add your input files please? The .fasta and .biome files? This kind of error usually suggests some character in one of the files that isn't expected with the given formatting, but I'll be able to work that out more easily if I can see the files.

Robyn

Hello Robyn

No worries, I fixed the error already.

Thanks for your help.