Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aarmey committed Mar 6, 2024
1 parent 8480dc0 commit f13977f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
5 changes: 3 additions & 2 deletions lineage/LineageInputOutput.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" The file contains the methods used to input lineage data from the Heiser lab. """

import logging
import math
import pandas as pd
from .CellVar import CellVar as c
Expand Down Expand Up @@ -250,7 +251,7 @@ def tryRecursion(

# Check that the parent cell didn't get time censored (Likely divided in last frame)
if divisionTime == exp_time:
print(
logging.info(

Check warning on line 254 in lineage/LineageInputOutput.py

View check run for this annotation

Codecov / codecov/patch

lineage/LineageInputOutput.py#L254

Added line #L254 was not covered by tests
f"Cell time censorship, but daughters were found in row {parentPos+1}, column {pColumn+1}. By default they will be set to None"
)

Expand All @@ -263,7 +264,7 @@ def tryRecursion(

# Creating daughter
daughterCell = c(parent=parentCell)
daughterCell.obs = [0, 0, 0, 0, 0, 0]
daughterCell.obs = np.array([0.0, 0, 0, 0, 0, 0])

# find upper daughter
daughterCell.left = tryRecursion(
Expand Down
9 changes: 1 addition & 8 deletions lineage/figures/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,14 +1023,7 @@ def plot_all(ax, num_states, tHMMobj_list, Dname, cons, concsValues):
(4, num_states, 2)
) # the avg lifetime: num_conc x num_states x num_phases
bern_lpt = np.zeros((4, num_states, 2)) # bernoulli
# print parameters and estimated values
print(
Dname,
"\n the \u03C0: ",
tHMMobj_list[0].estimate.pi,
"\n the transition matrix: ",
tHMMobj_list[0].estimate.T,
)

for idx, tHMMobj in enumerate(tHMMobj_list): # for each concentration data
for i in range(num_states):
lpt_avg[idx, i, 0] = np.log10(
Expand Down
2 changes: 1 addition & 1 deletion lineage/figures/figureS17.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def makeFigure():
"""
Makes figure 101.
"""
num_lins = [len(hgf_tHMMobj_list[i].X) for i in range(4)]
num_lins = [len(tM.X) for tM in hgf_tHMMobj_list]
ax, f = getSetup((10, 20), (np.max(num_lins), 4))

for i in range(4 * np.max(num_lins)):
Expand Down

0 comments on commit f13977f

Please sign in to comment.