scPhyloX.tools.utils ==================== .. py:module:: scPhyloX.tools.utils Functions --------- .. autoapisummary:: scPhyloX.tools.utils.corr_plot scPhyloX.tools.utils.colless_index scPhyloX.tools.utils.colless_index_corrected scPhyloX.tools.utils.ext_gen scPhyloX.tools.utils.ext_cid scPhyloX.tools.utils.reconstruct Module Contents --------------- .. py:function:: corr_plot(x, y, ax, stats='pearson', r0_x=None, r0_y=None, r1_x=None, r1_y=None, line='fit', alternative='two-sided', fontsize=10) Draw a scatter plot of the two sets of data and show their correlation coefficients Args: x: data1 y: data2 ax: axes to draw scatter on stats: pearson or spearman r0_x, r0_y, r1_x, r1_y: locations to label the correlation coefficient and the p-value line: fit or diag, fit for linear regression alternative: greater, less or two-sided fontsize: fontsize Return: matplotlib.axes .. py:function:: colless_index(tree) calculate Colless' index Args: tree: Phylogenetic tree Return: float: Colless' index .. py:function:: colless_index_corrected(tree) calculate corrected Colless' index Args: tree: Phylogenetic tree Return: float: corrected Colless' index .. py:function:: ext_gen(cell) Extract generation with given cell name .. py:function:: ext_cid(cell) Extract cell id with given cell name .. py:function:: reconstruct(lineage_info, sel_cells, file_name=None) Reconstruct phylogenetic tree of simulation data Args: lineage_info: system.lineage_info sel_cells: cells to build phylogenetic tree file_name: path to save tree. if None, just return Return: text newick tree