DASL-Lab / provoc

PROportions of Variants of Concern using counts, coverage, and a variant matrix.
https://dasl-lab.github.io/provoc/
MIT License
0 stars 0 forks source link

Visualize `lineage_def` matrix (and pairwise matrix visualization) #48

Closed DBecker7 closed 3 months ago

DBecker7 commented 3 months ago

Especially helpful for comparing, say, constellations to Usher barcodes.

Individually, should show the same things as plot_variants() (plot_variants() should be extended to handle one or two mutation_def matrices).

Pairwise should display lineages present in both, set differences, and measures of similarity.

Both should work before and after data.

DBecker7 commented 3 months ago

For pairwise comparison: Mutations to the left are in left matrix but not right, mutations in center are in both, mutations to the right are in right matrix but not left. Mutations on the left and right are just grey, whereas mutations in the center are one colour if in left, one colour if in right, and white if in both. Similar for lineages.

The resultant visualization will look like a colourful matrix with a grey border.

DBecker7 commented 3 months ago

For individual matrix, the entries are plotted as white or coloured squares. Values should be sorted appropriately, and only shared mutations are shown.

In the matrix below, the "1s" in the m* columns will be coloured according to how many 1s are in the column. The "unique" column denotes how many mutations are unique to that lineage (which don't need to be visualized).

m1 m2 m3 unique
v1 1 1 0 20
v2 1 1 1 10
v3 1 0 1 2

A helper function (visible to the user) will create this table, allowing for text-based analysis.

DBecker7 commented 3 months ago

Closed with version 0.5.3