Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marissa97 opened this issue Jun 28, 2023 · 0 comments
Open

Comments

@marissa97
Copy link

  • 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(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant