Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taxol #973

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Taxol #973

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lineage/Lineage_collections.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
""" This file is to collect those lineages that have the same condition, and have 3 or greater number of cells in their lineages. """

from .LineageInputOutput import import_exp_data
from .import_lineage import MCF10A
from .import_lineage import MCF10A, import_taxol
from .states.StateDistributionGaPhs import StateDistribution
from .states.StateDistributionGamma import StateDistribution as StDist
from .LineageTree import LineageTree
Expand Down Expand Up @@ -217,3 +217,15 @@ def popout_single_lineages(lineages):
AllLapatinib = [Lapatinib_Control + Gemcitabine_Control, Lapt25uM, Lapt50uM, Lap250uM]
AllGemcitabine = [Lapatinib_Control + Gemcitabine_Control, Gem5uM, Gem10uM, Gem30uM]
GFs = [pbs, egf, hgf, osm]

##########################################################
# NEW PACLITAXEL DATA
untreated, taxol_05, taxol_1, taxol_15, taxol_2, taxol_25, taxol_3, taxol_4 = import_taxol()
# 555, 1119, 486, 382, 272, 365, 246, 266
untreated_taxol = [LineageTree(list_cells, E) for list_cells in untreated] # 555 cells
Taxol_1 = [LineageTree(list_cells, E) for list_cells in taxol_1] # 486 cells
Taxol_2 = [LineageTree(list_cells, E) for list_cells in taxol_2] # 272 cells
Taxol_3 = [LineageTree(list_cells, E) for list_cells in taxol_3] # 246 cells
Taxol_4 = [LineageTree(list_cells, E) for list_cells in taxol_4] # 266 cells

taxols = [untreated_taxol, Taxol_1, Taxol_2, Taxol_4]
45 changes: 45 additions & 0 deletions lineage/figures/figureS18.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
""" In this file we plot the raw data before fitting from paclitaxel treated HCC1143 cells """
# from ..Lineage_collections import taxols as Taxol_lin_list
import numpy as np
from ..import_lineage import import_taxol_file, trim_taxol
from ..plotTree import plotLineage
from .common import getSetup
from string import ascii_lowercase
from ..states.StateDistributionGaPhs import StateDistribution
from ..LineageTree import LineageTree

desired_num_states = 2
E = [StateDistribution() for _ in range(desired_num_states)]
untreated_t = import_taxol_file()
untreated_taxol = [LineageTree(list_cells, E) for list_cells in untreated_t]
c = 0
for lins in untreated_t:
for cell in lins:
c += 1
# counts = len(untreated_taxol)
counts = 100
print("number of lineages", len(untreated_taxol), " and the number of total cells: ", c)

def makeFigure():
"""
Makes figure S18.
"""
titles = ["Untreated", "Taxol 1 nM", "Taxol 2 nM", "Taxol 3 nM", "Taxol 4 nM"]
ax, f = getSetup((17, 35), (counts, 4))

for i in range(counts):
ax[4 * i].axis('off')
# ax[4 * i + 1].axis('off')
# ax[4 * i + 2].axis('off')
# ax[4 * i + 3].axis('off')
plotLineage(untreated_taxol[i], ax[4 * i], color=False)
# plotLineage(Taxol_lin_list[1][i], ax[4 * i + 1], color=False)
# plotLineage(Taxol_lin_list[2][i], ax[4 * i + 2], color=False)
# plotLineage(Taxol_lin_list[3][i], ax[4 * i + 3], color=False)

for i in range(4):
ax[i].axis('off')
ax[i].text(-0.2, 1.55, ascii_lowercase[i], transform=ax[i].transAxes, fontsize=20, fontweight="bold", va="top")
ax[i].text(0.0, 1.55, titles[i], transform=ax[i].transAxes, fontsize=20, va="top")

return f
35 changes: 35 additions & 0 deletions lineage/figures/figureS19.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
""" BIC for Taxol data."""
from ..Lineage_collections import taxols as Taxol_lin_list
from ..Analyze import run_Analyze_over, Analyze_list
from .common import getSetup
from .figure9 import find_BIC

import pickle
import numpy as np
from matplotlib.ticker import MaxNLocator

desired_num_states = np.arange(1, 8)

def makeFigure():
"""
Makes figure 9.
"""
ax, f = getSetup((14, 4), (1, 3))

BIC, Obj = find_BIC(Taxol_lin_list, desired_num_states, num_cells=1041)

# create a pickle file
pik1 = open("taxols.pkl", "wb")
for taxol_tHMMobj_list in Obj:
for laps in taxol_tHMMobj_list:
pickle.dump(laps, pik1)
pik1.close()

i = 0
ax[i].set_xlabel("Number of States Predicted")
ax[i].set_ylabel("Normalized BIC")
ax[i].xaxis.set_major_locator(MaxNLocator(integer=True))

ax[0].set_title("Taxol Treated Populations")

return f
Loading