statgen / fivex

Interactive eQTL visualizations
MIT License
13 stars 3 forks source link

Show DAP-G on Y-axis #45

Closed amkwong closed 4 years ago

amkwong commented 4 years ago

Ticket

n/a

Purpose

Add an additional field (Posterior Inclusion Probability - PIP, results from Wen et al.'s DAP-G analysis of GTEx v8) to be plotted on the Y-axis (where the data is available). This requires a new database file containing the additional data.

Since the additional data is somewhat sparse, my approach is to retrieve the data for a given query, convert this into a Python dictionary, pass that dictionary to the parser, and add the PIP values to the points if possible. This approach should broadly work well enough for any additional data we may want to add.

How to test this

View the single-variant view for the test variant chr19:488506, and click the "PIP" button to ensure the correct variable is plotted on the Y-axis. Switch back and forth between other Y-axis variables, and other buttons, to confirm that it works (and that I didn't break something else).

Deployment / configuration notes

Adds new data

Download the test database file (data/GTEx_v8_finemapping_DAPG.sqlite.db) to your current data directory (as specified in your local settings) - please note that this test file contains only information for chr19:488506. For all available data, you can use the full database (~3GB), which you can find at the following location: /net/amd/amkwong/browseQTL/data/GTEx_v8_finemapping_DAPG.sqlite.db

Modifies dependencies

Be sure to update python dependencies (per requirements.txt) , to reflect the new required version of zorp.

amkwong commented 4 years ago

Note: this has currently broken region view, I am fixing that right now

abought commented 4 years ago

Thanks! Let me know when it's ready for a look. Is there a time goal (like demo) in mind? Otherwise I might slate Monday to look at this.

amkwong commented 4 years ago

Thanks! Let me know when it's ready for a look. Is there a time goal (like demo) in mind? Otherwise I might slate Monday to look at this.

I am aiming to have this functional on my local machine by tomorrow so I can show it at the meeting. Once I have something that works, then reviewing next Monday sounds good to me.

Thanks!

amkwong commented 4 years ago

The problem turned out to be a silly mistake that I should have caught earlier, and has been fixed accordingly. This PR is ready to be reviewed.

amkwong commented 4 years ago
  • Have we evaluated the performance of the PIP lookup on a dense region (eg 500kb, our max allowed extent)? What is the worst case scenario for the amount of data involved for lookup + serialization?

I only tested this on my own laptop using the full data file, and I didn't look for the region of highest density, but the average lookup time was about a second to load the data in both the single-variant and region views.

amkwong commented 4 years ago

I forgot to remove custom ticks in the region plot for non-PIP views, so I fixed that. After updating zorp everything seems to work on my computer.