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="\\",
)
If you try and write a string that needs escaping, writing fails with:
Fix would be to add an
escapechar
param. Or, just allow **kwargs that you pass tocsv.writer
(let me know if you want a pull request but this is super simple)Workaround is to override the writer property