Пример #1
0
  mute=True
)

# score graphs, returns a vector of ranks by similarity
graph ranks = pcreode.pCreode_Scoring(data = pca_reduced_data, file_path = "/ti/workspace/.", num_graphs = params["num_runs"], mute=True)
# select most representative graph
gid = graph_ranks[0]

# extract cell graph
# Wrapper's note: This is actually a cluster graph and a grouping, but none of the objects contain this grouping
# the only thing that is available is a cell graph of only a subset of cells
# so we use this cell graph as milestone network, and then project all cells onto this
analysis = pcreode.Analysis(
  file_path = "/ti/workspace/.",
  graph_id = gid,
  data = pca_reduced_data,
  density = density,
  noise = params["noise"]
)

checkpoints["method_aftermethod"] = time.time()

#   ____________________________________________________________________________
#   Save output                                                             ####
# save cell_ids
cell_ids = pd.DataFrame({
  "cell_ids": expression.index
})
cell_ids.to_csv("/ti/output/cell_ids.csv", index=False)

# save dimred
Пример #2
0
  mute = True
)

# score graphs, returns a vector of ranks by similarity
graph_ranks = pcreode.pCreode_Scoring(data = pca_reduced_data, file_path = "/", num_graphs = parameters["num_runs"], mute=True)
# select most representative graph
gid = graph_ranks[0]

# extract cell graph
# Wrapper's note: This is actually a cluster graph and a grouping, but none of the objects contain this grouping
# the only thing that is available is a cell graph of only a subset of cells
# so we use this cell graph as milestone network, and then project all cells onto this
analysis = pcreode.Analysis(
  file_path = "/",
  graph_id = gid,
  data = pca_reduced_data,
  density = density,
  noise = noise
)

checkpoints["method_aftermethod"] = time.time()

#   ____________________________________________________________________________
#   Save output                                                             ####
dataset = dynclipy.wrap_data(cell_ids = expression.index)

# save dimred
dimred = pd.DataFrame(pca_reduced_data)
dimred["cell_id"] = expression.index

# get milestone network based on cell_graph