Pysam is a Python package for reading, manipulating, and writing genomics data such as SAM/BAM/CRAM and VCF/BCF files. It's a lightweight wrapper of the HTSlib API, the same one that powers samtools, bcftools, and tabix.
I would like to use set_encoding_error_handler to handle non-ascii character in vcf info field, e.g. 'Papillon-Lefèvre_syndrome', generate the following issue:
Hi,
I would like to use set_encoding_error_handler to handle non-ascii character in vcf info field, e.g. 'Papillon-Lefèvre_syndrome', generate the following issue:
UnicodeDecodeError: 'utf-8' codec can't decode byte
please can you provide an example python source code?