Spaces:
Sleeping
Sleeping
Sync from scbirlab/tutorial-autorep-analysis via hub-sync
Browse files10 unmodified lines111213141516171819202122232425262728293093 unmodified lines124125126127128129130265 unmodified lines3963973983994004014022 unmodified lines40540640740840941041141241341441541641741841942011 unmodified lines43243343443543643743851 unmodified lines49049149249349449549610 unmodified lines# Set the default color cyclempl.rcParams['axes.prop_cycle'] = mpl.cycler(color=("lightgrey", "dimgrey") + colorblind_palette()[1:],)SEED: int = 42MAX_TIME: float = 360. # minutesSOURCES_DIR: str = "sources"E_MAX: float = 2. # transcripts per cell per minute, with no dCas9 boundGROWTH_RATE: float = .03 # per minute, intrinsic growth of non-targeting strainsPSEUDOCOUNT: float = .5 # only to avoid log(0)N_NT: int = 2 # non-targeting guides, pooled as the referenceSTRENGTH_DEFAULTS = [1., 5., 20.]FITNESS_DEFAULTS = [1., 1., .5]N_GUIDES: int = len(STRENGTH_DEFAULTS)STRAIN_LABELS = (["Non-targeting"]93 unmodified linesif vline is not None:axes.axvline(vline, color="grey", linestyle=":", label="_none")axes.set(xlabel="Time (minutes)",yscale="log",**kwargs,)265 unmodified lineswith gr.Row():guide_fitness = [gr.Slider(0., 1.5,step=.05,value=w,label=f"Relative growth rate, guide {i + 1}",2 unmodified lines]with gr.Row():mrna_decay = gr.Slider(.05, 1.,step=.01,value=.2,label="mRNA decay rate (per minute)",)dcas9_rate = gr.Slider(.005, 1.,step=.005,value=.05,label="dCas9 accumulation rate (per minute)",)with gr.Row():inoculum = gr.Slider(11 unmodified linescarrying_capacity = gr.Slider(N_NT + N_GUIDES + 1, 10_000,step=1,value=100,label="Total carrying capacity (x inoculum)",)plot_pool = gr.Button("Plot growth and transcript levels")51 unmodified lineslate_time = gr.Slider(0., MAX_TIME,step=1.,value=160.,label="Use samples after (minutes)",)plot_fit = gr.Button("Estimate sgRNA strength")10 unmodified lines111213141516171819202122232425262728293093 unmodified lines124125126127128129130265 unmodified lines3963973983994004014022 unmodified lines40540640740840941041141241341441541641741841942011 unmodified lines43243343443543643743851 unmodified lines49049149249349449549610 unmodified lines# Set the default color cyclempl.rcParams['axes.prop_cycle'] = mpl.cycler(color=("lightgrey", "dimgrey") + colorblind_palette(name="vibrant_0")[1:],)SEED: int = 42MAX_TIME: float = 5.SOURCES_DIR: str = "sources"E_MAX: float = 2. # transcript rate per cell, with no dCas9 boundGROWTH_RATE: float = 1. # intrinsic growth of non-targeting strainsPSEUDOCOUNT: float = 1. # only to avoid log(0)N_NT: int = 2 # non-targeting guides, pooled as the referenceSTRENGTH_DEFAULTS = [1., 5., 20.]FITNESS_DEFAULTS = [.5, 2., .2]N_GUIDES: int = len(STRENGTH_DEFAULTS)STRAIN_LABELS = (["Non-targeting"]93 unmodified linesif vline is not None:axes.axvline(vline, color="grey", linestyle=":", label="_none")axes.set(xlabel="Time",yscale="log",**kwargs,)265 unmodified lineswith gr.Row():guide_fitness = [gr.Slider(0., 2.,step=.05,value=w,label=f"Relative growth rate, guide {i + 1}",2 unmodified lines]with gr.Row():mrna_decay = gr.Slider(.05, 100.,step=.01,value=2.,label="mRNA decay rate",)dcas9_rate = gr.Slider(.005, 1.,step=.005,value=.8,label="dCas9 accumulation rate",)with gr.Row():inoculum = gr.Slider(11 unmodified linescarrying_capacity = gr.Slider(N_NT + N_GUIDES + 1, 10_000,step=1,value=10,label="Total carrying capacity (x inoculum)",)plot_pool = gr.Button("Plot growth and transcript levels")51 unmodified lineslate_time = gr.Slider(0., MAX_TIME,step=1.,value=0.,label="Use samples after (minutes)",)plot_fit = gr.Button("Estimate sgRNA strength")
app.py+15-15