DECIPHER-genomics / Genoverse

HTML5 scrollable genome browser
https://genoverse.org/
Other
106 stars 44 forks source link

Convert highlights to histogram #49

Closed alisha2468 closed 2 years ago

alisha2468 commented 6 years ago

I am trying to change the SNV display highlights to histogram form. Any help would be appreciated. Thanks!

simonbrent commented 6 years ago

I don't really understand what you're trying to do.

alisha2468 commented 6 years ago

Hi simon,

When you drag and drop a vcf file into the genome browser, a new track is generated showing the SNVs at each position. I want to generate histograms of SNP density at each position instead

Get Outlook for iOShttps://aka.ms/o0ukef


From: Simon Brent notifications@github.com Sent: Thursday, March 15, 2018 10:03:58 AM To: wtsi-web/Genoverse Cc: Ahamed, Alisha; Author Subject: Re: [wtsi-web/Genoverse] Convert highlights to histogram (#49)

I don't really understand what you're trying to do.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/wtsi-web/Genoverse/issues/49#issuecomment-373323401, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjpKbw9wltcP8XT15Y1rNf_j5mz4EbQLks5tejyOgaJpZM4SqjWf.

simonbrent commented 6 years ago

I'm afraid that isn't really possible at this time. I would recommend creating a back-end process that reads the VCF and outputs data as required by Genoverse.Track.Graph.Bar, but that won't really help with the drag and drop use case.

alisha2468 commented 6 years ago

Thank you Simon! If possible, could you give me an example please?

Get Outlook for iOShttps://aka.ms/o0ukef


From: Simon Brent notifications@github.com Sent: Friday, March 16, 2018 11:38:47 AM To: wtsi-web/Genoverse Cc: Ahamed, Alisha; Author Subject: Re: [wtsi-web/Genoverse] Convert highlights to histogram (#49)

I'm afraid that isn't really possible at this time. I would recommend creating a back-end process that reads the VCF and outputs data as required by Genoverse.Track.Graph.Bar, but that won't really help with the drad and drop use case.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/wtsi-web/Genoverse/issues/49#issuecomment-373688252, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjpKb6nLt-VRF2mmXzASuW41CuJnQUy2ks5te6RHgaJpZM4SqjWf.

simonbrent commented 6 years ago

Not really...you'll need a VCF parser (like bcftools), a web server written in the language of your choice which a) can accept VCF uploads/extract data from URLs where VCFs are stored b) has an endpoint that extracts data from a VCF for a region it and returns a JSON array where each entry is in the form { chr: 1, start: 100, end: 100, height: 5 } // height = the number of variants found at that location

alisha2468 commented 6 years ago

Hi Simon, I tried parsing the VCF but it does not work when extended from Graph.Bar or Graph.Line but works otherwise. Any idea why that is happening?

alisha2468 commented 6 years ago

Hi Simon, its working now and i am able to view the histograms as well. Any tips on smoothening the histograms? i am currently trying d3.js. Any inputs would be appreciated!