pysam-developers / pysam

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.
https://pysam.readthedocs.io/en/latest/
MIT License
774 stars 274 forks source link

Adding contig tag to a output vcf file header shifting chrom numbers in records #1220

Open nathanLauHKGI opened 1 year ago

nathanLauHKGI commented 1 year ago

Adding contig tag to a output vcf file header, then write records from original file, will cause chrom shift, e.g. chrX shift to chr19.

jmarshall commented 1 year ago

Please show us some example code that exhibits the problem.