cycledash
cycledash copied to clipboard
Provide a python library to generate Cycledash URLs
Kind of a random idea. Interested if people think it'd make any sense. Possibly this should be filed against pileupjs.
IPython + matplotlib etc. is a pretty reasonable place to be exploring a large number of variants from many BAMs, multiple callers, etc. For simple things CycleDash alone can work, but for complex analyses, we need a full programming environment. Having a way to integrate this with CycleDash to look at pileups would be pretty useful.
One possible way to do this would be to expose everything in the pileup in the URL (or, if the state ends up being too big to fig in a URL, as POST variables I suppose) and have a kind of "state free examine page" that just shows what was passed in. This would include:
- The variant(s) to show. We'd want to be able to pass the variants themselves, not just paths to VCFs.
- The reads to show (support both passing the reads themselves and also the paths to BAMs)
- The state of the pileup viewer: locus, zoom level, and annotation tracks.
Then, we'd also have a Python library for generating URLs that would allow me to say, e.g.:
- Here's some
varcode.Variant
instances - Here's some reads (or paths to BAMs)
- Here's a locus and zoom level I want to focus the pileup viewer on.
- Now, give me a URL (or snippits of HTML that submit a form, etc.) that when opened in a browser will give me CycleDash at this state.
The focus here would be viewing the pileups for a small number of variants in a local region of the genome (usually one variant) along with their read evidence. I can use Python to programmatically select the variants I want to look at.
If there is any preprocessing the CycleDash wants to do on variants, I'm imagining that this preprocessing would happen in the Python library on the client-side, so that the CycleDash page is state free, and doesn't have to wait for the server to do anything.