carmonalab / ProjecTILs

Interpretation of cell states using reference single-cell maps
GNU General Public License v3.0
246 stars 28 forks source link

Enhancement: Comparing reference labels with custom labels #12

Open mihem opened 3 years ago

mihem commented 3 years ago

Great tool! Annotating T cells is really hard and this tool is really helpful especially because it also provides a reference atlas. However, I am missing a function that allows a comparison between custom labels of the query dataset and the labels of the reference dataset. Although plot.projection shows you where your cells are located, it does not allow a direct comparison between custom labels of the query dataset and the labels of the reference atlas.

A very easy solution would be a heatmap showing reference annotation as columns and your labels as rows. If your labels are stored in query.projected@meta.data$cluster:

table(query.projected$cluster, query.projected$functional.cluster) |>
    pheatmap::pheatmap(scale = "row")