I want to annotate scTCR-seq/scBCR-seq information to scRNA-seq, umap or bar plot. It is convinient do this by just add adaptor immune receptor(AIR) information in adata_gex.obs.But if I want to use muon to create a mudata which contains multple model omics data, some analysis become confusing. For example, if I want to annotate AIR information on a gex umap, it’s convinient using function mu.pl.embedding(mdata, basis="gex:umap", color=["gex:CD79A", "bcr:chain_pairing", "tcr:chain_pairing"])
. But If I want to draw a stacked bar plot which x-axis is different celltypes and y-axis is proportion of different types of “bcr:chain_pairing”, there is no function like mu.pl.barplot(mdata, groupby="gex:cell_type", value="bcr:chain_pairing")
. So how can I annotate scTCR-seq&scBCR-seq data to scRNA-seq data and draw a stacked plot using muon?
I think you are looking for the ir.pl.group_abundance
function, which is implemented in scirpy, rather than muon.
For more customized plots, mdata.obs
is just a pandas dataframe that can be used for plotting with e.g. seaborn or altair.
Hi gregor,
I think ir.pl.group_abundance is about cells detected by scTCR-seq rather than scRNA-seq, however I want to annotate cell detected by scRNA-seq which is detected by scTCR-seq, too.
mdata.obs
sounds like the thing I’m looking for. I will try this recently, thanks!
Best,
Zhendiao Zhou
group_abundance
just reads mdata.obs
as well. It doesn’t care if cells come from scRNA-seq or scTCR-seq. But I’m also not entirely sure if you are trying to do something that couldn’t be accomplished with group_abundance
.
This is informative. Thanks!