Closed ArtPoon closed 2 years ago
Have to remember to credit Paul Gordon and his site for mutation metadata in this details panel
This will enable us to abbreviate the number of mutations listed in the lineage tooltip
Table should report the following for a selected lineage (do not modify for selected variant or bead?)
aa:orf1ab:P314L
)Might need to use some sort of letter or abbreviation encoding of phenotypic effects, and adding a corresponding legend above/below the details table.
Let's make a new branch for backend and frontend development of this issue
See branch mutationstable
Need to modify backend to add mutation frequencies to dbstats.json
file:
https://github.com/PoonLab/covizu/blob/0691e41167294a3033b7a5a69db8cb24f562daaa/covizu/utils/batch_utils.py#L210-L229
I think we can just modify this line in above code:
common = [feat for feat, count in counts.items() if count/len(samples) >= 0.5]
to
common = dict([(feat, count/len(samples)) for feat, count in counts.items() if count/len(samples) >= 0.5])
Need to update batch.py
to handle dict instead of list
Need to write a unit test for extracting mutation frequencies, with a specific test fixture
I've rewritten mut_annotation_edit.py
to output a JSON file with the mutations as keys and phenotypes as values. Some mutations have ~20 phenotypes attributed to them. Not quite sure how to integrate this into our table — I was thinking of doing it with a tooltip but I'm open to suggestions right now!
We can try a few things:
Shorten listing of mutations in tooltip when we implement the details table (#364)
The graph above shows the distribution of phenotype frequencies! Our current coverage, with 7 phenotypes in the legend, is about 70%.
Thanks - so based on the barplot, the top N are:
Need to provide some more informative text than "see more" for tooltip where number of mutations of lineage exceeds 5 (maybe display 10? display mutations derived from ancestral lineage?) Perhaps something more like "and 27 others"?
I've just had a sudden realization as to why the frequencies in the above graph are not adding up. The image I attached earlier had the 7 most frequent phenotypes removed (oops). This image below should represent the full set of phenotypes!
dbstats.json
breaks the GISAID and VirusSeq front-ends before we can consider merging these changes to master
. Checkout the respective branch and copy over JSON data from the mut_table
branch to verify. We just need these other front ends to not break, i.e., tolerate changes to JSON formats.@ArtPoon to convert clusters.json
and return to @bonnielu for testing
mut_table
branch into dev
dev
to master
merge process (manual update on BEVi, etc.)
These can be presented as a table. See also #286