Beispiel #1
0
# run GPfates by feeding it the true pseudotime.
m = GPfates.GPfates(sInfo, logexp, pseudotime_column=1)
# perform GPLVM
m.dimensionality_reduction()
# store reduced dimensions
m.store_dr()
m.model_fates(t='global_pseudotime')
# save plot
# currIter = pd.read_csv('/Users/koenvandenberge/Dropbox/PhD/Research/singleCell/trajectoryInference/trajectoryDE/tradeSeqPaper/simulation/sim2_dyntoy_bifurcating_4/currIter.txt', sep=" ", header=None)
# cc = currIter[0]
# cc = cc[0]
# d = 'dataset'
# curd = d + str(cc)
# m.make_fates_viz()
# m.fates_viz.plot()
# GPfates.plt.savefig('/Users/koenvandenberge/Dropbox/PhD/Research/singleCell/trajectoryInference/trajectoryDE/tradeSeqPaper/simulation/sim2_dyntoy_bifurcating_4/GPfates_' + curd + '.png')

# identify bifurcation
p = m.identify_bifurcation_point()
#print(p)

# get output
weights = m.fate_model.phi
from GPfates.gp_utils import bifurcation_statistics
bif_stats = bifurcation_statistics(m.fate_model, m.e)

# write output
np.savetxt('/Users/koenvandenberge/Dropbox/PhD/Research/singleCell/trajectoryInference/trajectoryDE/tradeSeqPaper/simulation/sim2_dyntoy_bifurcating_4/GPfatesWeights.txt', weights)
np.savetxt('/Users/koenvandenberge/Dropbox/PhD/Research/singleCell/trajectoryInference/trajectoryDE/tradeSeqPaper/simulation/sim2_dyntoy_bifurcating_4/GPfatesBifStats.txt', bif_stats)
Beispiel #2
0
def bifStats_kvdb(m, fate_model, e):
    p = m.identify_bifurcation_point()
    bif_stats = bifurcation_statistics(fate_model, e)
    return bif_stats