dasmoth / dalliance

Interactive web-based genome browser.
http://www.biodalliance.org/
BSD 2-Clause "Simplified" License
226 stars 68 forks source link

Support Coordinate Mapping for Sequence Tiers #85

Open ymen opened 10 years ago

ymen commented 10 years ago

@dasmoth, many thanks for the work on coordinate mapping #82.

I observed that in Dalliance's implementation, coordinate mapping is not applied to sequence tracks (2bit or DASSequence), but only to feature tiers (https://github.com/dasmoth/dalliance/blob/master/js/sourceadapters.js#L83).

I understand that this makes sense for lift-overs but mapping of genomic sequence is meaningful for work like in #63 for accuracy in downstream features like variant calling and translation which grabs sequence data from the genome track.

I'm not sure if I totally understand the fetching code, but if there's anything I can help with, would definitely be glad to help!

dasmoth commented 10 years ago

Yes, when the mapping stuff was originally done, the assumption was that you'd always have the target genome available. But given some of the things we've discussed lately, being able to reconstruct the target genome from the source genome does seem like a valuable addition.

My suggestion would be to add a MappedSequenceSource which mirrors MappedFeatureSource (https://github.com/dasmoth/dalliance/blob/master/js/sourceadapters.js#L1322) as closely as possible.

So in outline, I'd imagine.

Like all the data-fetching stuff in Biodalliance, the SequenceSources are asynchronous, so you need to do a little bit of orchestration waiting for all the fetches to complete. However, this is exactly the same pattern as in the existing MappedFeatureSource.

ymen commented 10 years ago

Thanks Thomas for the outline, that's very helpful.

I would not be able to get to this until a bit later, but will definitely hope to make this happen in the coming weeks.