Babyplots Jupyter Notebook Demo

Babyplots is available through the babyplots python package to use in jupyter notebooks to visualize your data.

In [2]:
from babyplots import Babyplot
import pandas as pd

Plot Demo

In [3]:
dat = pd.read_csv("E:/Dokumente/repos/mca_dt.txt", sep="\t")
In [4]:
dat.head()
Out[4]:
UMAP_1 UMAP_2 UMAP_3 orig.ident nCount_RNA nFeature_RNA ClusterID Tissue Batch Cell.Barcode percent.mt RNA_snn_res.3 seurat_clusters
0 2.232274 -7.775582 -10.968533 MouseCellAtlas 11512 3469 Bladder_9 Bladder Bladder_1 CCATCTAGCGAGTTTAGG 2.936067 69 69
1 2.092620 -7.915526 -10.998805 MouseCellAtlas 13580 3725 Bladder_9 Bladder Bladder_1 GAGGAGCGCTTGATACAG 2.260677 69 69
2 1.947722 -7.657710 -10.638845 MouseCellAtlas 12089 3401 Bladder_9 Bladder Bladder_1 CCAGACACAATAGAATTA 2.225163 69 69
3 2.109386 -7.830964 -10.924024 MouseCellAtlas 12949 3574 Bladder_9 Bladder Bladder_1 CCGACGGGACATATGGCG 1.814812 69 69
4 2.229176 -7.529998 -10.927272 MouseCellAtlas 11790 3392 Bladder_9 Bladder Bladder_1 TAGCATTCAAAGATTCCA 2.044105 69 69
In [5]:
coords = dat.iloc[:,0:3].values.tolist()
In [6]:
clusts = dat["Tissue"].values.tolist()
In [7]:
bp = Babyplot()
bp.add_plot(coords, "pointCloud", "categories", clusts, {"colorScale": "Paired"})