forked from jamescasbon/PyVCF
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
If you try and write a string that needs escaping, writing fails with:
need to escape, but no escapechar set
Fix would be to add an escapechar param. Or, just allow **kwargs that you pass to csv.writer (let me know if you want a pull request but this is super simple)
Workaround is to override the writer property
vcf_writer = Writer(f, vcf_reader)
# Need to pass escapechar so redefine writer
vcf_writer.writer = csv.writer(
f,
delimiter="\t",
lineterminator="\n",
quoting=csv.QUOTE_NONE,
escapechar="\\",
)
Metadata
Metadata
Assignees
Labels
No labels