Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aarmey committed Mar 6, 2024
1 parent 4e7cf0a commit 8935bdf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 3 additions & 5 deletions lineage/figures/figure13.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@
num_states = 3
hgf_tHMMobj_list = Analyze_list(GFs, num_states)[0]

hgf_states_list = [tHMMobj.predict() for tHMMobj in hgf_tHMMobj_list]

# assign the predicted states to each cell
for idx, hgf_tHMMobj in enumerate(hgf_tHMMobj_list):
states = hgf_tHMMobj.predict()

for lin_indx, lin in enumerate(hgf_tHMMobj.X):
lin.states = hgf_states_list[idx][lin_indx]
lin.states = states[idx][lin_indx]

T_hgf = hgf_tHMMobj_list[0].estimate.T

num_states = hgf_tHMMobj_list[0].num_states

rcParams["font.sans-serif"] = "Arial"


Expand Down
5 changes: 3 additions & 2 deletions lineage/figures/figureS17.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
from ..Analyze import Analyze_list

hgf_tHMMobj_list = Analyze_list(GFs, 3)[0]
hgf_states_list = [tHMMobj.predict() for tHMMobj in hgf_tHMMobj_list]

# assign the predicted states to each cell
for idx, hgf_tHMMobj in enumerate(hgf_tHMMobj_list):
states = hgf_tHMMobj.predict()

for lin_indx, lin in enumerate(hgf_tHMMobj.X):
lin.states = hgf_states_list[idx][lin_indx]
lin.states = states[idx][lin_indx]

for thmm_obj in hgf_tHMMobj_list:
thmm_obj.X = sort_lins(thmm_obj)
Expand Down
6 changes: 4 additions & 2 deletions lineage/plotTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def CladeRecursive(cell: CellVar, a: list, censor: bool, color: bool):
return my_clade


def plotLineage(lineage: LineageTree, axes, censor: bool=True, color: bool=True):
def plotLineage(lineage: LineageTree, axes, censor: bool = True, color: bool = True):
"""
Given a lineage of cells, uses the `CladeRecursive` function to plot the lineage.
"""
Expand All @@ -107,7 +107,9 @@ def plotLineage(lineage: LineageTree, axes, censor: bool=True, color: bool=True)
return draw(c, axes=axes)


def plotLineage_MCF10A(lineage: LineageTree, axes, censor: bool=True, color: bool=True):
def plotLineage_MCF10A(
lineage: LineageTree, axes, censor: bool = True, color: bool = True
):
"""
Given a lineage of cells, uses the `CladeRecursive` function to plot the lineage.
"""
Expand Down

0 comments on commit 8935bdf

Please sign in to comment.