ax.set(xlabel='Doubling Time (min)', ylabel='CTD repeats') # assign intelligible strain names strain_labels = ['26', '14', '12', '10', '9', '8'] plt.yticks(plt.yticks()[0], strain_labels) plt.tight_layout() plt.savefig('./figures/output/Fig2_growthrates.png') ############################################################################### # RPB1/RPB3 nuclear fluorescence ############################################################################### rpb1fluor = pd.read_csv('./data/mScarRPB1_052019_mean.csv') fig, ax = plt.subplots(figsize=(14, 8)) ax = plot.ecdfbystrain('mean_intensity_nuc', rpb1fluor, ax=ax, formal=True, line_kws={ 'alpha': 0.8, 'rasterized': True }) ax.set(xlabel='RPB1 Nuclear Fluorescence (a.u.)', ylabel='ECDF', xlim=(230, 900)) plt.tight_layout() plt.savefig('./figures/output/Fig2_rpb1fluor.svg') rpb3fluor = pd.read_csv('./data/mScarRPB3_022020_mean.csv') rpb3fluor = rpb3fluor[~(rpb3fluor.strain.isin([15, 16]))] fig, ax = plt.subplots(figsize=(10, 8)) ax = plot.ecdfbystrain('mean_intensity_nuc', rpb3fluor, ax=ax,
growth, ax=ax, colors=[colors_ctd[c] for c in colors_ctd]) ax.set(xlabel='Doubling Time (min)', ylabel='CTD repeats') # assign intelligible strain names strain_labels = ['26', '14', '12', '10', '9', '8'] plt.yticks(plt.yticks()[0], strain_labels) plt.tight_layout() plt.savefig('./figures/output/Fig2_growthrates.png') ############################################################################### # RPB1 nuclear fluorescence ############################################################################### rpb1fluor = pd.read_csv('./data/mScarRPB1_05212019_quantiles.csv') fig, ax = plt.subplots(figsize=(14, 8)) ax = plot.ecdfbystrain('0.95_quant_nc', rpb1fluor, ax=ax) ax.set(xlabel='Nuclear Fluorescence (a.u.)', ylabel='ECDF', xlim=(100, 1250)) plt.tight_layout() plt.savefig('./figures/output/Fig2_rpb1fluor_.svg') ############################################################################### # RNA-seq ############################################################################### # get sleuth data sleuth = pd.read_csv('./data/sleuth_all.csv').dropna(axis=0) # get unique coefficient id, as they occur in multiple models sleuth['cid'] = sleuth['coef'] + sleuth['model'] # get q-value cumulative distribution by model and coefficient qvalecdf_series = Parallel(n_jobs=n_jobs)( delayed(ecdftools.compute_qvalecdf)(model, coef, _df)
vmin=np.min(traces.values), vmax=np.max(traces.values), cbar_kws={'label': 'Normalized Fluorescence'}) plt.xticks(rotation=60) ax.set(xlabel='', ylabel=plot.CTDr_dict[strain], yticks=[]) ax.set(xlabel='Time (min)') plt.tight_layout() plt.subplots_adjust(hspace=0.01) plt.savefig('./figures/output/Fig3_pp7traces_afmhot.png') ############################################################################### # Distribution of burst fluorescence for strains yQC21, yQC22 and yQC23 ############################################################################### parts_max = pp7data.groupby(['particle','mov_name','strain','CTDr']).mass_norm.max().reset_index() fig, ax = plt.subplots(figsize=(10, 8)) ax = plot.ecdfbystrain('mass_norm', parts_max, ax=ax, formal=True, line_kws={'alpha':1, 'rasterized':True}) ax.set(xlabel='Normalized Fluorescence', ylabel='ECDF', xlim=(5.5, 10.5)) ax.set_xticks(np.arange(6, 11)) plt.tight_layout() plt.savefig('./figures/output/Fig3_pp7movfluor.svg') ############################################################################### # Distribution of interburst times for strains yQC21, yQC22 and yQC23 ############################################################################### interpeak = pd.read_csv('./data/pp7_interpeaktime.csv') fig, ax = plt.subplots(figsize=(10, 8)) ax = plot.ecdfbystrain('time', interpeak, ax=ax, formal=True, line_kws={'alpha':1, 'rasterized':True}) ax.set(xlabel='Inter-burst time (s)', ylabel='ECDF', xlim=(-100, 2200)) plt.tight_layout() plt.savefig('./figures/output/Fig3_pp7interburst.svg')
plt.xticks(plt.xticks()[0], strain_labels) plt.tight_layout() plt.savefig('./figures/output/FigS4_Kwon2013_DropletBinding.svg') ############################################################################### # RPB3 nuclear fluorescence ############################################################################### rpb3fluor = pd.read_csv('./data/mScarRPB3_022020_mean.csv') rpb3fluor = rpb3fluor[~(rpb3fluor.strain.isin([6]))] colors, patches = plot.get_palette(['26', '10']) colors['10_TAF'] = '#823b3b' colors['10_FUS'] = '#da6363' patches = plot.get_patches(colors) fig, ax = plt.subplots(figsize=(15, 8)) ax = plot.ecdfbystrain('mean_intensity_nuc', rpb3fluor, ax=ax, formal=True, line_kws={ 'alpha': 0.8, 'rasterized': True }, colors=colors, patches=patches) ax.set(xlabel='RPB3 Nuclear Fluorescence (a.u.)', ylabel='ECDF', xlim=(120, 600)) plt.tight_layout() plt.savefig('./figures/output/FigS4_rpb3fluor.svg')
# mRNA molecules per cell ECDF from smFISH ############################################################################### parts = pd.read_csv( '/Users/porfirio/lab/yeastEP/figures_paper/data/smFISH_GAL10_GAL3_mRNAperCell.csv' ) parts = parts[parts.strain.isin(['TL47', 'yQC62', 'yQC15', 'yQC16'])] parts = parts[parts.date == 9132019] # only determined threshold for this exp order = ['TL47', 'yQC62', 'yQC16', 'yQC15'] colors = { s: c for s, c in zip(order, ['#326976', '#98b4ba', '#823b3b', '#da6363']) } for gene, _parts in parts.groupby(['gene', 'date']): fig, ax = plt.subplots(figsize=(9, 8)) ax = plot.ecdfbystrain('num_spots', _parts, groupby='strain', colors=colors, ax=ax, formal=True, line_kws={ 'alpha': 1, 'rasterized': True }) ax.set(xlabel='mRNA molecules per cell', ylabel='ECDF', title=gene[0].upper()) plt.tight_layout() plt.savefig('./figures/output/FigS5_ECDF_mRNAperCell_{}.svg'.format(gene))
ax.plot(prob_f1.prob_thresh, prob_f1.f1score_False, color=colors[False]) ax.plot(prob_f1.prob_thresh, prob_f1.f1score_True, color=colors[True]) ax.set(ylabel='F1 score', xlabel='GPC Probability threshold') ax.axvline(0.5, ls='--', c='k', alpha=0.5) plt.legend(handles=plot.get_patches(colors)) plt.tight_layout() plt.savefig('./figures/output/FigS2_f1score_prob.svg') ############################################################################### # Nuclear fluorescence by strain ############################################################################### fig, ax = plt.subplots(figsize=(10, 8)) plot.ecdfbystrain('nuc_fluor', pp7data[pp7data.laser_power==150].drop_duplicates(['roi','mov_name']), ax=ax, formal=True, line_kws={'alpha':1, 'rasterized':True}) ax.set(xlabel='Nuclear Fluorescence (a.u.)', ylabel='ECDF') plt.tight_layout() plt.savefig('./figures/output/FigS2_pp7Nucfluor.svg') ############################################################################### # Correlation between nuclear fluorescence and burst fluorescence ############################################################################### fluor_metrics = (('raw_mass','Raw Fluorescence (a.u.)'),('mass_norm','Normalized Fluorescence')) for fluor, fluor_name in fluor_metrics: fig, ax = plt.subplots(figsize=(10, 8)) pp7data.plot(x='nuc_fluor', y=fluor, kind='hexbin', colormap='viridis', ax=ax, rasterized=True) ax.set(ylabel=fluor_name, xlabel='Nuclear fluorescence (a.u.)', xticks=np.arange(150, 350, 50)) plt.tight_layout() plt.savefig('./figures/output/FigS2_pp7{}vNucfluor.svg'.format(fluor))