Loading CCI results
This tutorial shows how to load CCI results from different CCI tools
import mmcci
stLearn
We can load stLearn outputs from the path of the h5ad file that has been run through stLearn
stlearn = mmcci.io.read_stLearn('/path/to/stLearn.h5ad')
We can also convert AnnData objects that have been processed with stLearn
stlearn = mmcci.io.convert_stLearn(adata)
CellPhoneDB
We can load CellPhoneDB outputs from the interaction scores text file
cellphonedb = mmcci.io.read_CellPhoneDB('/path/to/interaction_scores.txt')
Squidpy
We can load Squidpy results from running squidpy.gr.ligrec, which is a Python dict.
This can be saved as a pkl file and loaded in.
import pickle
with open('/path/to/squidpy_dict.pkl', 'rb') as f:
squidpy_dict = pickle.load(f)
squidpy = mmcci.io.read_Squidpy(squidpy_dict)
You can also load single networks such as squidpy.gr.interaction_matrix
squidpy = mmcci.io.read_network('/path/to/network.csv')
CellChat
We can load CellChat outputs from the path of the cellchat_out@dr, saved as a csv file.
cellchat = mmcci.io.read_CellChat('/path/to/cellchat_dr.csv')
NATMI
We can load NATMI outputs from the Edges_lrc2p.csv file that is outputted from NATMI
natmi = mmcci.io.read_NATMI('/path/to/Edges_lrc2p.csv')