phlower.tl.tree_mbranch_markers

phlower.tl.tree_mbranch_markers(adata: ~anndata._core.anndata.AnnData, branches_1: {<class 'tuple'>}, branches_2: {<class 'tuple'>}, tree_attr: str = 'original', fate_tree: str = 'fate_tree', include_pre_branch: bool = False, name_append: str = '', ratio: float = 0.3, compare_position: str = 'start', vs_name: str | None = None, iscopy: bool = False, **kwargs)

if compare_position is start:

|>>O>>>>>>>—-O—–a |

-<<<|ab

|<<O<<<<<<<<————O—-b | |>>O>>>>>>>>————O—-c

if compare_position is end:

|–O———–O<<<<<a | |

–<<|ab

|–O————->>>>>>>O>>>>b | |–O————->>>>>>>O>>>>c

  1. find different markers that regulate branch set(a) and branch set(b, c)

  2. the markers can be the start of the branch or the end of the branch

  3. this function focus on the start of the branch
    1. find all of the nodes of the branch a and branch b

    2. select a good ratio of the nodes as the start of the branch(>>>>)

    3. find the markers that regulate the start of the branch

(>>>>>) against (<<<)

Parameters

adata: AnnData

AnnData object

branch_1: set

the branching node to have branches, here could be a

branch_2: set

the branching node to have branches, here could be b

tree_attr: str

the attribute of the tree to be used: default is node_name, could also be original

fate_tree: str

the fate tree name

include_pre_branch: bool

whether to include the branching node branch in the comparison

ratio: float

the ratio of the nodes in a branch to be compared to the number of nodes in the other branch

compare_position: str

the position to compare, could be start or end

iscopy: bool

whether to return a copy of the AnnData object

kwargs: dict

the parameters for tree_nodes_markers