Skip to content

Commit 7f73b9a

Browse files
author
Anthony
authored
Merge pull request #12 from CellProfiling/norm
Normalization method update
2 parents 0654f0f + 8489c5a commit 7f73b9a

File tree

12 files changed

+197
-73
lines changed

12 files changed

+197
-73
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# IDE and Checkpoint Files
2+
.spyproject/
23
.vscode/
34
.ipynb_checkpoints
45
__pycache__/
56
.pybiomart.sqlite
67
~$*
78
*/~$*
89
cache/
9-
.DS_Store
10-
*/.DS_Store
10+
**/.DS_Store
1111

1212
# Output or Downloaded Folders
1313
input.zip
@@ -18,3 +18,6 @@ data/
1818

1919
# External Software
2020
iupred2a/
21+
22+
# Snakemake files
23+
**/.snakemake

3_RNAFucciPseudotime.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,38 @@
2727
wp_ensg = np.load("output/pickles/wp_ensg.npy", allow_pickle=True)
2828
ccd_comp = np.load("output/pickles/ccd_comp.npy", allow_pickle=True)
2929
nonccd_comp = np.load("output/pickles/nonccd_comp.npy", allow_pickle=True)
30+
u_plates = ["355","356","357"]
3031

3132
#%% Convert FACS intensities for FUCCI markers to pseudotime using the same polar coordinate methods as for protein
3233
# Idea: Use the polar coordinate pseudotime calculations to calculate the pseudotime for each cell
3334
# Execution: Adapt Devin's code for the cells sorted for RNA-Seq
3435
# Output: Make log-log fucci intensity plots for the cells analyzed by RNA-Seq; Plot of all fucci pseudotimes; table of pseudotimes for each cell
3536
adata, phases_filt = RNADataPreparation.read_counts_and_phases(
36-
"Counts", False, "protein_coding"
37-
) # no qc, yet
38-
FucciPseudotime.pseudotime_rna(adata, phases_filt)
37+
"Counts", False, "protein_coding", u_plates
38+
)
39+
adata = RNADataPreparation.zero_center_fucci(adata)
40+
FucciPseudotime.pseudotime_rna(adata)
3941

4042
#%% Single cell RNA-Seq data preparation and general analysis
41-
RNADataPreparation.general_plots()
42-
RNADataPreparation.analyze_noncycling_cells()
43+
RNADataPreparation.general_plots(u_plates)
44+
RNADataPreparation.analyze_noncycling_cells(u_plates)
4345
adata, phasesfilt = RNADataPreparation.qc_filtering(
4446
adata, do_log_normalize=True, do_remove_blob=False
4547
)
48+
adata = RNADataPreparation.zero_center_fucci(adata)
4649
RNADataPreparation.plot_pca_for_batch_effect_analysis(adata, "BeforeRemovingNoncycling")
4750

4851
#%% Idea: Similar to mock-bulk analysis for proteins, we can evaluate each gene bundled by phase across cells
4952
# Execution: Make boxplots of RNA expression by phase
5053
# Output: boxplots for each gene
5154
valuetype, use_spikeins, biotype_to_use = "Tpms", False, "protein_coding"
5255
adata, phases = RNADataPreparation.read_counts_and_phases(
53-
valuetype, use_spikeins, biotype_to_use
56+
valuetype, use_spikeins, biotype_to_use, u_plates
5457
)
5558
adata, phasesfilt = RNADataPreparation.qc_filtering(
5659
adata, do_log_normalize=True, do_remove_blob=True
5760
)
61+
adata = RNADataPreparation.zero_center_fucci(adata)
5862
RNADataPreparation.plot_markers_vs_reads(adata)
5963
RNADataPreparation.plot_pca_for_batch_effect_analysis(adata, "AfterRemovingNoncycling")
6064
g1 = adata.obs["phase"] == "G1"
@@ -93,10 +97,9 @@
9397

9498
# Log-log FUCCI plot with RNA expression overlayed
9599
RNACellCycleDependence.plot_expression_facs(
100+
adata,
96101
wp_ensg[np.isin(wp_ensg, adata.var_names)],
97102
normalized_exp_data,
98-
phasesfilt,
99-
adata.var_names,
100103
"figures/GeneExpressionFucci",
101104
)
102105

@@ -157,7 +160,7 @@
157160

158161
#%% Moving average calculations and randomization analysis for the spike-in internal controls
159162
adata_spikeins, phases_spikeins = RNADataPreparation.read_counts_and_phases(
160-
valuetype, use_spike_ins=True, biotype_to_use=""
163+
valuetype, use_spike_ins=True, biotype_to_use="", u_plates=u_plates
161164
)
162165
sc.pp.filter_genes(adata_spikeins, min_cells=100)
163166
print(f"data shape after filtering: {adata_spikeins.X.shape}")
@@ -166,7 +169,7 @@
166169

167170
#%% Analyze isoforms
168171
adata_isoform, ccdtranscript_isoform = RNACellCycleDependence.analyze_isoforms(
169-
adata, ccdtranscript, wp_ensg, ccd_comp, nonccd_comp
172+
adata, ccdtranscript, wp_ensg, ccd_comp, nonccd_comp, u_plates
170173
)
171174
RNACellCycleDependence.compare_genes_to_isoforms(
172175
adata,

4_TemporalDelay.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,29 @@
8585

8686
#%% Create a heatmap of peak RNA expression
8787
highlight_names, highlight_ensg = [], []
88+
u_rna_plates = ["355","356","357"]
8889

8990
# Read in RNA-Seq data; use TPMs so that the gene-specific results scales match for cross-gene comparisons
9091
valuetype, use_spikeins, biotype_to_use = "Tpms", False, "protein_coding"
9192
adata, phases = RNADataPreparation.read_counts_and_phases(
92-
valuetype, use_spikeins, biotype_to_use
93+
valuetype, use_spikeins, biotype_to_use, u_rna_plates
9394
)
9495
adata, phasesfilt = RNADataPreparation.qc_filtering(
9596
adata, do_log_normalize=True, do_remove_blob=True
9697
)
98+
adata = RNADataPreparation.zero_center_fucci(adata)
9799
sorted_max_moving_avg_pol_ccd, norm_exp_sort, max_moving_avg_pol, sorted_rna_binned_norm = TemporalDelay.rna_heatmap(
98100
adata, highlight_names, highlight_ensg, ccdtranscript, xvals
99101
)
100102

101103
# Analyze isoforms
102104
adata_isoform, phases_isoform = RNADataPreparation.read_counts_and_phases(
103-
valuetype, use_spikeins, biotype_to_use, use_isoforms=True
105+
valuetype, use_spikeins, biotype_to_use, u_rna_plates, use_isoforms=True,
104106
)
105107
adata_isoform, phasesfilt_isoform = RNADataPreparation.qc_filtering(
106108
adata_isoform, do_log_normalize=True, do_remove_blob=True
107109
)
110+
adata_isoform = RNADataPreparation.zero_center_fucci(adata_isoform)
108111
sorted_max_moving_avg_pol_ccd_isoform, norm_exp_sort_isoform, max_moving_avg_pol_isoform, sorted_rna_binned_norm_isoform = TemporalDelay.rna_heatmap(
109112
adata_isoform,
110113
highlight_names,
@@ -114,7 +117,7 @@
114117
isIsoformData=True,
115118
)
116119
pearsonCorrelations = TemporalDelay.analyze_ccd_isoform_correlations(
117-
adata, adata_isoform, ccdtranscript, ccdtranscript_isoform, xvals
120+
adata, adata_isoform, ccdtranscript, ccdtranscript_isoform, xvals, u_rna_plates
118121
)
119122

120123
#%% Compare the variances and time of peak expression between protein and RNA

5_ProteinProperties.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@
1919
plt.rcParams["ps.fonttype"] = 42
2020
plt.rcParams["savefig.dpi"] = 300
2121
fucci = FucciCellCycle.FucciCellCycle()
22+
u_rna_plates = ["355","356","357"]
2223

2324
#%% Import the genes names we're analyzing
2425
# Read in RNA-Seq data again and the CCD gene lists
2526
valuetype, use_spikeins, biotype_to_use = "Tpms", False, "protein_coding"
2627
adata, phases = RNADataPreparation.read_counts_and_phases(
27-
valuetype, use_spikeins, biotype_to_use
28+
valuetype, use_spikeins, biotype_to_use, u_rna_plates
2829
)
2930
adata, phasesfilt = RNADataPreparation.qc_filtering(
3031
adata, do_log_normalize=True, do_remove_blob=True
3132
)
32-
33+
adata = RNADataPreparation.zero_center_fucci(adata)
3334
import_dict = Loaders.load_ptm_and_stability(adata)
3435
wp_ensg, ccd_comp, nonccd_comp, ccdtranscript, wp_max_pol = (
3536
import_dict["wp_ensg"],

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,31 @@
33
This repository contains the code used to perform the [single-cell proteogenomic analysis of the human cell cycle](https://www.nature.com/articles/s41586-021-03232-9). This study was based on immunofluorescence staining of ~200k cells for single-cell analysis of proteomic heterogeneity and ~1k cells for analysis of single-cell RNA variability. These analyses were integrated with other proteomic studies and databases to investigate the functional importance of transcript-regulated and non-transcript regulated variability.
44

55
## Structure of repository
6-
The code is listed in order of execution, e.g. "1_", "2_" etc. The output of each script is used in the subsequent script.
6+
The code is listed in order of execution, e.g. "1_", "2_" etc. The output of each script is used in the subsequent script. This workflow can also be run using snakemake (see below).
77

88
The logic for these analyses is contained in the `SingleCellProteogenomics` folder.
99

10-
The input files are contained in the "input" folder. This folder is linked [here](https://drive.google.com/file/d/1mdQbYcDPqiTOHeiYbv_4RtrxrmlhYMNl/view?usp=sharing) as a zip file, `input.zip`. Expand this folder within the base directory of this repository. If you are looking for the raw imaging proteomic dataset produced after filtering artifacts and such, that is located [here](https://drive.google.com/file/d/11vjsZV-nmzPpFmA7ShbfHzmbrk057b1V/view?usp=sharing).
10+
The input files are contained in the "input" folder. This folder is linked [here](https://drive.google.com/file/d/1G4i115FCH8XNyiEHCkBXMSO_9pwGflTq/view?usp=sharing) as a zip file, `input.zip`. Expand this folder within the base directory of this repository. If you are looking for the raw imaging proteomic dataset produced after filtering artifacts and such, that is located [here](https://drive.google.com/file/d/11vjsZV-nmzPpFmA7ShbfHzmbrk057b1V/view?usp=sharing).
1111

1212
The output files are added to a folder "output" during the analysis, and figures are added to a folder "figures."
1313

1414
An R-script used to analyze skewness and kurtosis (noted in the Methods of the manuscript) is contained in the other_scripts folder. The `other_scripts/ProteinDisorder.py` script utilizes [IUPRED2A](https://iupred2a.elte.hu/) and a [human UniProt](https://www.uniprot.org/proteomes/UP000005640) database.
1515

16-
## Prerequisites
16+
## Running the workflow using snakemake
1717

18-
Prerequisites are listed in `enviro.yaml` file. They can be installed using `conda`:
18+
This workflow can be run using `snakemake`:
1919

20-
1. Install Miniconda from https://docs.conda.io/en/latest/miniconda.html
20+
1. Install Miniconda from https://docs.conda.io/en/latest/miniconda.html.
2121

22-
2. From this directory run `conda env create -n fucci -f enviro.yaml; conda activate fucci` to install and activate these prerequisites.
22+
2. Install snakemake using `conda install -c conda-forge snakemake-minimal`.
23+
24+
3. Within this directory, run `snakemake -j 1 --use-conda --snakefile workflow/Snakefile`.
2325

2426
## Single-cell RNA-Seq analysis
2527

26-
The single-cell RNA-Seq data is available at GEO SRA under project number [GSE146773](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE146773).
28+
The single-cell RNA-Seq data is available at GEO SRA under project number [GSE146773](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE146773).
2729

28-
The cell cycle phase and FACS intensity data for these ~1,000 cells are contained in the [input folder](https://drive.google.com/file/d/1mdQbYcDPqiTOHeiYbv_4RtrxrmlhYMNl/view?usp=sharing) within the file `ProteinData/WellPlatePhasesLogNormIntensities.csv`:
29-
* The column "Well_Plate" (e.g., A10_355) corresponds to the sample title within GEO SRA (e.g., "Single U2OS cell A10_355").
30-
* The column "Stage" corresponds to the phase assigned by FACS gating.
31-
* The "Green530" and "Red585" columns correspond to the log-intensities for the red (CDT1) and green (GMNN) FUCCI markers for the individual cells.
30+
The cell cycle phase and FACS intensity information for these ~1,000 cells are contained in the [input folder](https://drive.google.com/file/d/1G4i115FCH8XNyiEHCkBXMSO_9pwGflTq/view?usp=sharing) within three files, one per plate, starting with `RNAData/180911_Fucci_single cell seq_ss2-18-*.csv`.
3231

3332
The `snakemake` workflow used to analyze the scRNA-Seq dataset, including RNA velocity calculations and louvain unsupervised clustering, can be found in this repository: https://github.com/CellProfiling/FucciSingleCellSeqPipeline.
3433

SingleCellProteogenomics/FucciPseudotime.py

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def plot_annotate_time(R_2, start_phi, fraction):
5252
pt = pol2cart(R_2,start_phi + (1 - fraction) * 2 * np.pi)
5353
plt.scatter(pt[0],pt[1],c='c',linewidths=4)
5454
plt.annotate(f" {round(fraction * fucci.TOT_LEN, 2)} hrs", (pt[0], pt[1]))
55+
5556
def drange(x, y, jump):
5657
'''Increment `x` by a decimal `jump` until greater than `y`'''
5758
while x < y:
@@ -181,6 +182,7 @@ def fucci_polar_coords(x, y, analysis_title):
181182
plt.tight_layout()
182183
plt.savefig(f"figures/FucciAllPseudotimeHist_{analysis_title}.png")
183184
# plt.show()
185+
plt.close()
184186

185187
# visualize that result
186188
start_pt = pol2cart(R_2,start_phi)
@@ -189,15 +191,15 @@ def fucci_polar_coords(x, y, analysis_title):
189191
cart_data_ur = pol2cart(np.repeat(R_2,len(centered_data)), pol_data[1])
190192
fucci_hist2d(centered_data, cart_data_ur, start_pt, g1_end_pt, g1s_end_pt, analysis_title, R_2, start_phi)
191193

192-
return (pol_sort_norm_rev, centered_data, pol_sort_centered_data0, pol_sort_centered_data1, pol_sort_inds, pol_sort_inds_reorder,
194+
return (pol_sort_norm_rev, centered_data, pol_sort_centered_data0, pol_sort_centered_data1, pol_sort_phi, pol_sort_inds, pol_sort_inds_reorder, pol_sort_phi_reorder,
193195
more_than_start, less_than_start, start_pt, g1_end_pt, g1s_end_pt, cart_data_ur, R_2, start_phi)
194196

195197
def pseudotime_protein(fucci_data, ab_nuc, ab_cyto, ab_cell, mt_cell, area_cell, area_nuc, well_plate, well_plate_imgnb, well_plate_imgnb_objnb,
196198
log_red_fucci_zeroc_rescale, log_green_fucci_zeroc_rescale, mockbulk_phases):
197199
'''Generate a polar coordinate model of cell cycle progression based on the FUCCI intensities'''
198200
# Generate model
199201
polar_coord_results = fucci_polar_coords(fucci_data[:,0], fucci_data[:,1], "Protein")
200-
pol_sort_norm_rev, centered_data, pol_sort_centered_data0, pol_sort_centered_data1, pol_sort_inds, pol_sort_inds_reorder, more_than_start, less_than_start, start_pt, g1_end_pt, g1s_end_pt, cart_data_ur, R_2, start_phi = polar_coord_results
202+
pol_sort_norm_rev, centered_data, pol_sort_centered_data0, pol_sort_centered_data1, pol_sort_phi, pol_sort_inds, pol_sort_inds_reorder, pol_sort_phi_reorder, more_than_start, less_than_start, start_pt, g1_end_pt, g1s_end_pt, cart_data_ur, R_2, start_phi = polar_coord_results
201203

202204
# Sort results by pseudotime
203205
sort_results = pol_sort(pol_sort_inds, more_than_start, less_than_start, well_plate, well_plate_imgnb, well_plate_imgnb_objnb, ab_nuc, ab_cyto, ab_cell, mt_cell, area_cell, area_nuc, log_red_fucci_zeroc_rescale, log_green_fucci_zeroc_rescale, mockbulk_phases)
@@ -239,29 +241,27 @@ def defined_phases_scatter(phases_filtered, outfile):
239241
plt.savefig(outfile)
240242
plt.close()
241243

242-
def pseudotime_rna(adata, phases_filt):
244+
def pseudotime_rna(adata):
243245
'''
244246
Model the pseudotime of FUCCI markers measured by FACS for cell analyzed with single-cell RNA sequencing
245247
Input: RNA-Seq data; cell cycle phase for each cell
246248
Output: Cell cycle pseudotime for each cell; plots illustrating FUCCI intensities over pseudotime
247249
'''
248-
phases_validIntPhase = phases_filt[pd.notnull(phases_filt.Green530) & pd.notnull(phases_filt.Red585) & pd.notnull(phases_filt.Stage)]
249-
utils.general_scatter_color(phases_validIntPhase["Green530"], phases_validIntPhase["Red585"], "log(Green530)", "log(Red585)",
250-
phases_validIntPhase["Stage"].apply(lambda x: get_phase_colormap()[x]), "Cell Cycle Phase", False, "", "figures/FucciPlotByPhase_RNA.png",
250+
adataValidPhase = adata.obs["phase"] != "N/A"
251+
utils.general_scatter_color(adata.obs["Green530"][adataValidPhase], adata.obs["Red585"][adataValidPhase], "log(Green530)", "log(Red585)",
252+
adata.obs["phase"][adataValidPhase].apply(lambda x: get_phase_colormap()[x]), "Cell Cycle Phase", False, "", "figures/FucciPlotByPhase_RNA.png",
251253
get_phase_colormap())
252254

253-
phases_validInt = phases_filt[pd.notnull(phases_filt.Green530) & pd.notnull(phases_filt.Red585)] # stage may be null
254-
polar_coord_results = fucci_polar_coords(phases_validInt["Green530"], phases_validInt["Red585"], "RNA")
255-
pol_sort_norm_rev, centered_data, pol_sort_centered_data0, pol_sort_centered_data1, pol_sort_inds, pol_sort_inds_reorder, more_than_start, less_than_start, start_pt, g1_end_pt, g1s_end_pt, cart_data_ur, R_2, start_phi = polar_coord_results
255+
polar_coord_results = fucci_polar_coords(adata.obs["Green530"], adata.obs["Red585"], "RNA")
256+
pol_sort_norm_rev, centered_data, pol_sort_centered_data0, pol_sort_centered_data1, pol_sort_phi, pol_sort_inds, pol_sort_inds_reorder, pol_sort_phi_reorder, more_than_start, less_than_start, start_pt, g1_end_pt, g1s_end_pt, cart_data_ur, R_2, start_phi = polar_coord_results
256257

257258
# Assign cells a pseudotime and visualize in fucci plot
258259
pol_unsort = np.argsort(pol_sort_inds_reorder)
259260
fucci_time = pol_sort_norm_rev[pol_unsort]
260261
adata.obs["fucci_time"] = fucci_time
261-
phases_validInt["fucci_time"] = fucci_time
262262

263263
plt.figure(figsize=(6,5))
264-
plt.scatter(phases_validInt["Green530"], phases_validInt["Red585"], c = phases_validInt["fucci_time"], cmap="RdYlGn")
264+
plt.scatter(adata.obs["Green530"], adata.obs["Red585"], c = adata.obs["fucci_time"], cmap="RdYlGn")
265265
cbar = plt.colorbar()
266266
cbar.set_label('Pseudotime',size=20)
267267
cbar.ax.tick_params(labelsize=18)
@@ -275,9 +275,21 @@ def pseudotime_rna(adata, phases_filt):
275275
# Save fucci times, so they can be used in other workbooks
276276
fucci_time_inds = np.argsort(adata.obs["fucci_time"])
277277
fucci_time_sort = np.take(np.array(adata.obs["fucci_time"]), fucci_time_inds)
278-
cell_time_sort = pd.DataFrame({"fucci_time" : fucci_time_sort, "cell" : np.take(adata.obs_names, fucci_time_inds)})
279-
cell_time_sort.to_csv("output/CellPseudotimes.csv")
280-
pd.DataFrame({"fucci_time": fucci_time}).to_csv("output/fucci_time.csv")
278+
cell_time_sort = pd.DataFrame({
279+
"fucci_time" : fucci_time_sort,
280+
"cell" : np.take(adata.obs["Well_Plate"], fucci_time_inds)})
281+
cell_time_sort.to_csv("output/CellPseudotimes.csv", index=False)
282+
cell_polar_coords = pd.DataFrame({
283+
"cell" : np.take(adata.obs["Well_Plate"], fucci_time_inds),
284+
"phase_by_facs_gating" : adata.obs["phase"][fucci_time_inds],
285+
"raw_green530" : adata.obs["MeanGreen530"][fucci_time_inds],
286+
"raw_red585" : adata.obs["MeanRed585"][fucci_time_inds],
287+
"green530_lognorm_rescale" : adata.obs["Green530"][fucci_time_inds],
288+
"red585_lognorm_rescale" : adata.obs["Red585"][fucci_time_inds],
289+
"polar_coord_phi" : pol_sort_phi[pol_unsort][fucci_time_inds],
290+
"fucci_time_hrs" : fucci_time_sort * fucci.TOT_LEN})
291+
cell_polar_coords.to_csv("output/fucci_coords.csv", index=False)
292+
pd.DataFrame({"fucci_time": fucci_time}).to_csv("output/fucci_time.csv", index=False)
281293

282294
def pseudotime_umap(adata, isIsoform=False):
283295
'''

SingleCellProteogenomics/RNACellCycleDependence.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ def plot_expression_umap(adata, genelist, outfolder):
5353
plt.close()
5454
adata.obs.drop(gene, 1)
5555

56-
def plot_expression_facs(genelist, normalized_exp_data, phases, var_names, outfolder):
56+
def plot_expression_facs(adata, genelist, normalized_exp_data, outfolder):
5757
'''
5858
Displaying relative expression on the FUCCI plot (log-log intensity of FUCCI markers)
5959
Output: a folder of FUCCI plots for each gene in a list
6060
'''
61-
phases_validInt = phases[pd.notnull(phases.Green530) & pd.notnull(phases.Red585)]
6261
if not os.path.exists(outfolder): os.mkdir(outfolder)
62+
var_name_list= list(adata.var_names)
6363
for gene in genelist:
64-
nexp = normalized_exp_data[:,list(var_names).index(gene)]
65-
plt.scatter(phases_validInt["Green530"], phases_validInt["Red585"], c=nexp)
64+
nexp = normalized_exp_data[:,var_name_list.index(gene)]
65+
plt.scatter(adata.obs["Green530"], adata.obs["Red585"], c=nexp)
6666
plt.tight_layout()
6767
cbar = plt.colorbar()
6868
cbar.ax.get_yaxis().labelpad = 15
@@ -286,13 +286,14 @@ def compare_genes_to_isoforms(adata, ccdprotein, ccdtranscript, adata_nonccdprot
286286
print(f"{sum(ccdIsoformsPerCcdProtein > 0) / sum(ccdprotein)}% of CCD proteins had at least one CCD transcript isoform")
287287
print(f"{sum(ccdIsoformsPerNonCcdProtein > 0) / sum(adata_nonccdprotein)}% of non-CCD proteins had at least one CCD transcript isoform")
288288

289-
def analyze_isoforms(adata, ccdtranscript, wp_ensg, ccd_comp, nonccd_comp):
289+
def analyze_isoforms(adata, ccdtranscript, wp_ensg, ccd_comp, nonccd_comp, u_plates):
290290
'''Analyze the isoform-level results over the cell cycle'''
291291
# Read in the data & QC analysis
292292
valuetype, use_spikeins, biotype_to_use = "Tpms", False, "protein_coding"
293-
adata_isoform, phases_isoform = RNADataPreparation.read_counts_and_phases(valuetype, use_spikeins, biotype_to_use, use_isoforms=True)
293+
adata_isoform, phases_isoform = RNADataPreparation.read_counts_and_phases(valuetype, use_spikeins, biotype_to_use, u_plates, use_isoforms=True)
294294
# RNADataPreparation.plot_pca_for_batch_effect_analysis(adata_isoform, "BeforeRemovingNoncycling_Isoform")
295295
adata_isoform, phasesfilt_isoform = RNADataPreparation.qc_filtering(adata_isoform, do_log_normalize=True, do_remove_blob=True)
296+
adata_isoform = RNADataPreparation.zero_center_fucci(adata_isoform)
296297
# RNADataPreparation.plot_pca_for_batch_effect_analysis(adata_isoform, "AfterRemovingNoncycling_Isoform")
297298
# FucciPseudotime.pseudotime_umap(adata_isoform, isIsoform=True)
298299

0 commit comments

Comments
 (0)