Skip to content

vcfpy writer.write_record write string with "comma (,)" into "%2C" #156

Description

@marissa97
  • vcfpy version: vcfpy 0.13.6
  • Python version: 3.8.5
  • Operating System: Linux

Description

I want to add self defined Filter into my vcf column (such as LowQual etc)

What I Did

## read a vcf 
vcf_reader= vcfpy.Reader.from_path(vcfInput)

## add Filter-Header

## vcf output
vcf_writer= vcfpy.Writer.from_path(newOutput+'/'+ name+'.filtered.vcf',vcf_reader.header)  

## add filter in each variant e.g if QUAL < 30: filter= "LowQual"
## write variant in vcf output
vcf_writer.write_record(record) 

Solution:
maybe instead of:

",".join(...)

use
','.join(...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions