PyVCF icon indicating copy to clipboard operation
PyVCF copied to clipboard

Would anyone be interested in working on json output from VCF using PyVCF?

Open seandavi opened this issue 10 years ago • 7 comments
trafficstars

seandavi avatar Aug 07 '15 15:08 seandavi

@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.

seandavi avatar Aug 17 '15 16:08 seandavi

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?

martijnvermaat avatar Sep 14 '15 15:09 martijnvermaat

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.

brainstorm avatar Jan 12 '16 14:01 brainstorm

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.

brainstorm avatar Jan 12 '16 16:01 brainstorm