PyVCF
PyVCF copied to clipboard
Would anyone be interested in working on json output from VCF using PyVCF?
@GlyphDataServices, PyVCF makes it reasonably easy to do this myself. I was thinking more about an extension (a module, basically) to this project. I know that there are not "standard" ways to do such a json mapping, but having one or more alternatives "built-in" might be useful.
Indeed just using json.dumps would be quite easy and I don't really see a reason to wrap such a call in a PyVCF function.
About the serialization, the problem with JSON is that it does not in any way define how you model your data. Perhaps there are standardized models by now, for example developed by @ga4gh, but I'm not following that too closely.
@seandavi Do you have any specific functionality in mind?
I have a very specific and (potentially useful) functionality in mind: exposing VCF's as API's like iobio does and/or exporting it into Pandas/Dato/R DataFrames for later exploration.
Will give a try to the jsom.dumps option for now and see how/what comes out of it.
I'm with @seandavi on this issue. For instance, having a Record model that is directly JSON-serializable would be much nicer than having to json.dumps() every attribute (CHROM, REF, INFO...). Ideally following @ga4gh variation (avro) schema as pointed out above, but that might take a bit longer to implement.