problems with utf-8 decoding

24 views
Skip to first unread message

glass...@gmail.com

unread,
May 2, 2019, 7:14:47 PM5/2/19
to picrust-users
Hey all together,

Installing picrust2 was smoothly. I ran the picrust2_pipeline.py --help command to test the function and it worked.

When I tried the code with my own data from qiime2 moving pictures tutorial
"picrust2_pipeline.py -s rep-seqs-deblur.qza -i pathabun_exported/feature-table.biom  -o picrust2_out_pipeline2                      --threads 1",
this error message was given.


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

Thanks for support!
Sunny greetings,
Carla

glass...@gmail.com

unread,
May 2, 2019, 7:17:46 PM5/2/19
to picrust-users
Maybe just to clarify here is the code and the full error message:

(picrust2) [carla@gra796 moving_pictures_piece_by_piece]$ picrust2_pipeline.py -s rep-seqs-deblur.qza -i pathabun_exported/feature-table.biom  -o picrust2_out_pipeline2                      --threads 1
Traceback (most recent call last):
  File "/home/carla/miniconda3/envs/picrust2/bin/picrust2_pipeline.py", line 219, in <module>
    main()
  File "/home/carla/miniconda3/envs/picrust2/bin/picrust2_pipeline.py", line 212, in main
    verbose=args.verbose)
  File "/home/carla/miniconda3/envs/picrust2/lib/python3.6/site-packages/picrust2/pipeline.py", line 113, in full_pipeline
    check_overlapping_seqs(study_fasta, input_table, verbose)
  File "/home/carla/miniconda3/envs/picrust2/lib/python3.6/site-packages/picrust2/pipeline.py", line 311, in check_overlapping_seqs
    FASTA_ASVs = set(read_fasta(in_seq).keys())
  File "/home/carla/miniconda3/envs/picrust2/lib/python3.6/site-packages/picrust2/util.py", line 41, in read_fasta
    for line in fasta_in:
  File "/home/carla/miniconda3/envs/picrust2/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)

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

Gavin Douglas

unread,
May 3, 2019, 2:14:04 AM5/3/19
to picrus...@googlegroups.com
Hi there,

You’ll need to input the FASTA file rather than the QIIME2 artifact (i.e. use qiime tools export on rep-seqs-deblur.qza). QZA files are zipped folders containing the datafiles along with their provenance in the QIIME2 pipeline.


Best,

Gavin

--
You received this message because you are subscribed to the Google Groups "picrust-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picrust-user...@googlegroups.com.
To post to this group, send email to picrus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cybele Collins

unread,
May 3, 2019, 12:33:55 PM5/3/19
to picrus...@googlegroups.com
I'm just starting with PICRUSt2, with interest in specific metabolic pathways as well as an overview on which pathways are represented

How do I start? A tutorial is listed with a vulcan server, but requires a password that's apparently given in a class and not available. https://github.com/picrust/picrust2/wiki/PICRUSt2-Tutorial

I did do the QIIME plugin, but am looking for more then comparisons between datasets, and was not clear on how to organize the list of feature details, which contain more than 10,000 features from ko_metagenome.qzv

And what are those features? They seem to correspond to specific proteins but is there a way to filter them for specific pathways?

Thanks very much in advance!

--
You received this message because you are subscribed to the Google Groups "picrust-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picrust-user...@googlegroups.com.
To post to this group, send email to picrus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

carla glassl

unread,
May 3, 2019, 2:17:43 PM5/3/19
to picrus...@googlegroups.com
Hey Gavin,

thanks for the quick response. I got the fasta format now, but got a bigger error message this time. I am afraid there is a problem with the alignment between my fasta file and the reference.

This is the error-message I got:
(picrust2) [carla@gra800 moving_pictures_piece_by_piece]$ picrust2_pipeline.py -s seq-fastq/dna-sequences.fasta -i pathabun_exported/feature-table.biom -o picrust2_out_pipeline4                      --threads 1

Error running this command:
place_seqs.py --study_fasta seq-fastq/dna-sequences.fasta --ref_dir /home/carla/miniconda3/envs/picrust2/lib/python3.6/site-packages/picrust2/default_files/prokaryotic/pro_ref --out_tree picrust2_out_pipeline4/out.tre --threads 1 --intermediate picrust2_out_pipeline4/intermediate/place_seqs --chunk_size 5000

Standard output of failed command:
""

Standard error of failed command:
"
Error running this command:
epa-ng --tree /home/carla/miniconda3/envs/picrust2/lib/python3.6/site-packages/picrust2/default_files/prokaryotic/pro_ref/pro_ref.tre --ref-msa picrust2_out_pipeline4/intermediate/place_seqs/ref_seqs_hmmalign.fasta --query picrust2_out_pipeline4/intermediate/place_seqs/study_seqs_hmmalign.fasta --chunk-size 5000 -T 1 -m /home/carla/miniconda3/envs/picrust2/lib/python3.6/site-packages/picrust2/default_files/prokaryotic/pro_ref/pro_ref.model -w picrust2_out_pipeline4/intermediate/place_seqs/epa_out --filter-acc-lwr 0.5 --filter-max 20

Standard output of failed command:
"INFO Selected: Output dir: picrust2_out_pipeline4/intermediate/place_seqs/epa_out/
INFO Selected: Query file: picrust2_out_pipeline4/intermediate/place_seqs/study_seqs_hmmalign.fasta
INFO Selected: Tree file: /home/carla/miniconda3/envs/picrust2/lib/python3.6/site-packages/picrust2/default_files/prokaryotic/pro_ref/pro_ref.tre
INFO Selected: Reference MSA: picrust2_out_pipeline4/intermediate/place_seqs/ref_seqs_hmmalign.fasta
INFO Selected: Filtering by accumulated threshold: 0.5
INFO Selected: Maximum number of placements per query: 20
INFO Selected: Automatic switching of use of per rate scalers
INFO Selected: Preserving the root of the input tree
INFO Selected: Specified model file: /home/carla/miniconda3/envs/picrust2/lib/python3.6/site-packages/picrust2/default_files/prokaryotic/pro_ref/pro_ref.model
INFO    Rate heterogeneity: GAMMA (4 cats, mean),  alpha: 0.453141 (user),  weights&rates: (0.25,0.0250674) (0.25,0.220229) (0.25,0.782933) (0.25,2.97177)
        Base frequencies (user): 0.229585 0.22008 0.298596 0.251739
        Substitution rates (user): 1.00319 2.79077 1.5301 0.87441 3.83966 1
INFO Selected: Reading queries in chunks of: 5000
INFO Selected: Using threads: 1
INFO     ______ ____   ___           _   __ ______
        / ____// __ \ /   |         / | / // ____/
       / __/  / /_/ // /| | ______ /  |/ // / __
      / /___ / ____// ___ |/_____// /|  // /_/ /
     /_____//_/    /_/  |_|      /_/ |_/ \____/ (v0.3.5)
INFO Output file: picrust2_out_pipeline4/intermediate/place_seqs/epa_out/epa_result.jplace
"

Standard error of failed command:
""
"
Thanks a lot for your support!!
Sunny greetings,
Carla


carla glassl

unread,
May 4, 2019, 1:48:30 AM5/4/19
to picrus...@googlegroups.com
I managed to solve it by giving more computing time/power. But thanks for keeping up this amazing platform!!!!! 

Thumbs up !

Cybele Collins

unread,
May 4, 2019, 4:44:55 PM5/4/19
to picrus...@googlegroups.com
Hi,

Just a note: my questions about the tutorial seem to be resolved, as the page appears to have been edited yesterday, and a password is no longer required.

I also realized that a different QIIME2 plugin artifact contains the MetaCyc predictions, really what I'm after; I'm going to see if it's possible to search the KEGG feature list for specific enzymes.

Thanks very much!

Gavin Douglas

unread,
May 5, 2019, 3:01:14 AM5/5/19
to picrus...@googlegroups.com
Ok great to hear!

Gavin Douglas

unread,
May 5, 2019, 3:07:18 AM5/5/19
to picrus...@googlegroups.com
Hi there,

Sorry for the confusion - that tutorial was written for a specific workshop, which is why it required password information.

You can see what the functions (either metacyc pathways or KOs) correspond to by looking at the description files in the PICRUSt2 github repo here: picrust2/picrust2/default_files/description_mapfiles/


Best,

Gavin
Reply all
Reply to author
Forward
0 new messages