File format conversion - tidy up and consistify #1488
Replies: 1 comment 2 replies
-
This is tricky. Tsconvert started really as a way to get some useful-ish functions into a repo that didn't need to be brought up to library quality. Also, any My thoughts were that where we had popular and well known formats that don't incur any extra dependencies or lots of code, we could include these in tskit. These aren't particularly well thought out thoughts, though, so I'd be happy to think again about it!
One advantage of this I guess is that we could in principle do things more efficiently by pulling in some dependency to write BCF directly (not that I suggest actually doing this). |
Beta Was this translation helpful? Give feedback.
-
@nikbaya is working on FAM file import to tskit in #1487 and we'd like to document
write_ms
in #1464In
tskit
we also havets.write_vcf
and in https://github.com/tskit-dev/tsconvert we have theto
/from_ms
to
/from_newick
andfrom_oriented_forest
.This has grown organically, so needs some tidying up. It seems cleanest to move all input/output conversions to https://github.com/tskit-dev/tsconvert and add new ones there moving forward. This would mean bringing
tsconvert
up to standard, e.g. getting thetsconvert
CLI implemeted, supporting pipe streaming totskit
CLI, improving docs and tutorials.The exception here is
ts.write_vcf
as it is documented in a release, to deal with this I propose a two phase deprecation:ts.write_vcf
as deprecated and implementtsconvert.to_vcf
ts.write_vcf
call the tsconvert method, throwing a "You need topip install tsconvert
" error if it is not available.In this way we don't break anything for a while, and when we do it is a quick obvious fix, and we don't have two VCF export codes forever.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions