Пример #1
0
 def test_cell_assign_em(self):
     example_rda = os.path.join(base_dir, "tests/cell_assign_test.RData")
     sce = SingleCellExperiment.fromRData(example_rda)
     cellassigner = CellAssign()
     rho = GeneMarkerMatrix(genes=[
         "Gene161", "Gene447", "Gene519", "Gene609", "Gene677", "Gene750",
         "Gene754", "Gene860", "Gene929", "Gene979"
     ],
                            cells=["Groups1", "Groups2"])
     res = cellassigner.run_em(sce, rho)
Пример #2
0
 def test_cell_assign_pkl(self):
     import pickle
     import collections
     tenx = TenxAnalysis("tests/pre_igo")
     sce = TenX.read10xCounts(tenx)
     handle = open("tests/rho_up.pkl","rb")
     rho_matrix = pickle.load(handle)
     handle.close()
     rho = GeneMarkerMatrix(rho_matrix)
     cellassigner = CellAssign()
     res = cellassigner.run_em(sce, rho)
Пример #3
0
 def test_cell_assign_em(self):
     #example_rda = os.path.join(base_dir, "tests/cell_assign_test.RData")
     print("Init CellEM")
     sce = "sce_final.rdata"
     # sce = SingleCellExperiment.fromRData(example_rda)
     cellassigner = CellAssign()
     # rho_matrix = dict()
     # rho_matrix["Group1"] = ["Gene161", "Gene447", "Gene609", "Gene754", "Gene860", "Gene929", "Gene979"]
     # rho_matrix["Group2"] = ["Gene161", "Gene447", "Gene609", "Gene754", "Gene860", "Gene929", "Gene979","Gene101","Gene212","Gene400"]
     # rho = GeneMarkerMatrix(rho_matrix)
     res = cellassigner.run_em(sce, "cell_assign_fit.rdata", "test")