Analyses - #3
Merged
Merged
Conversation
Owner
Author
|
Please do review these too and lmk if anything else is to be uploaded. Thanks and regards. |
There was a problem hiding this comment.
Pull request overview
Adds exploratory analysis outputs (CSV exports) for multiple simulation conditions (population/MMP variants) and includes a few helper Python scripts intended to post-process CC3D outputs and generate plots/statistics.
Changes:
- Added multiple CSV exports (
cell_count,mutation_effect,collective_invasion) for several experimental conditions (Normal, MORE/LESS_POPULATION, Half/Extra/Double_MMP, etc.). - Added analysis scripts under
Analysis/LESS_POPULATION/for peak-finding (comp.py), CC3D batch processing, and violin-plot statistical analysis.
Reviewed changes
Copilot reviewed 27 out of 49 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Analysis/Normal/mutation_effect.csv | Adds mutation-effect time series export for “Normal” condition. |
| Analysis/Normal/Half_MMP/mutation_effect.csv | Adds mutation-effect export for Normal/Half_MMP variant. |
| Analysis/Normal/Half_MMP/cell_count.csv | Adds cell-count export for Normal/Half_MMP variant. |
| Analysis/Normal/collective_invasion.csv | Adds collective-invasion area metrics export for “Normal” condition. |
| Analysis/Normal/cell_count.csv | Adds cell-count export for “Normal” condition. |
| Analysis/MORE_POPULATION/mutation_effect.csv | Adds mutation-effect export for MORE_POPULATION condition. |
| Analysis/MORE_POPULATION/collective_invasion.csv | Adds collective-invasion area metrics export for MORE_POPULATION condition. |
| Analysis/MORE_POPULATION/cell_count.csv | Adds cell-count export for MORE_POPULATION condition. |
| Analysis/LESS_POPULATION/process_cc3d_data.py | Adds a CC3D output processing template for extracting cluster metrics. |
| Analysis/LESS_POPULATION/mutation_effect.csv | Adds mutation-effect export for LESS_POPULATION condition. |
| Analysis/LESS_POPULATION/comp.py | Adds a plotting script correlating mutation-effect peaks with cell counts. |
| Analysis/LESS_POPULATION/collective_invasion.csv | Adds collective-invasion area metrics export for LESS_POPULATION condition. |
| Analysis/LESS_POPULATION/cell_count.csv | Adds cell-count export for LESS_POPULATION condition. |
| Analysis/LESS_POPULATION/cc3d_violin_analysis.py | Adds violin-plot + ANOVA/Tukey analysis script for adhesion-condition comparisons. |
| Analysis/Less pop and normal mmp/mutation_effect.csv | Adds mutation-effect export for “Less pop and normal mmp” condition. |
| Analysis/Less pop and normal mmp/collective_invasion.csv | Adds collective-invasion area metrics export for “Less pop and normal mmp” condition. |
| Analysis/Less pop and normal mmp/cell_count.csv | Adds cell-count export for “Less pop and normal mmp” condition. |
| Analysis/Half_MMP/mutation_effect.csv | Adds mutation-effect export for Half_MMP condition. |
| Analysis/Half_MMP/collective_invasion.csv | Adds collective-invasion area metrics export for Half_MMP condition. |
| Analysis/Half_MMP/cell_count.csv | Adds cell-count export for Half_MMP condition. |
| Analysis/EXTRA_MMP/mutation_effect.csv | Adds mutation-effect export for EXTRA_MMP condition. |
| Analysis/EXTRA_MMP/cell_count.csv | Adds cell-count export for EXTRA_MMP condition. |
| Analysis/Double_MMP/mutation_effect.csv | Adds mutation-effect export for Double_MMP condition. |
| Analysis/Double_MMP/collective_invasion.csv | Adds collective-invasion area metrics export for Double_MMP condition. |
| Analysis/Double_MMP/cell_count.csv | Adds cell-count export for Double_MMP condition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+12
to
+14
| cell_count_df.columns = ['MCS', 'CoI', 'Laminin', 'Cancer1', 'Cancer2', | ||
| 'C_Lysed', 'L_Lysed', 'NCoI', 'Immune', 'Apoptotic'] | ||
|
|
Comment on lines
+8
to
+9
| import warnings | ||
| warnings.filterwarnings('ignore') |
Comment on lines
+21
to
+39
| def load_simulation_data(self, data_path=None, simulation_data=None): | ||
| """ | ||
| Load CC3D simulation results | ||
|
|
||
| Parameters: | ||
| ----------- | ||
| data_path : str, optional | ||
| Path to CSV file containing simulation results | ||
| simulation_data : dict, optional | ||
| Dictionary containing simulation results | ||
| """ | ||
| if data_path: | ||
| self.data = pd.read_csv(data_path) | ||
| elif simulation_data: | ||
| self.data = pd.DataFrame(simulation_data) | ||
| else: | ||
| # Generate sample data for demonstration | ||
| self.data = self._generate_sample_data() | ||
|
|
Comment on lines
+263
to
+265
| # Load data (replace with your actual data loading) | ||
| analyzer.load_simulation_data() | ||
|
|
Comment on lines
+147
to
+162
| def create_violin_plot(self, adhesion_type, figsize=(12, 8)): | ||
| """ | ||
| Create violin plots for both metrics | ||
|
|
||
| Parameters: | ||
| ----------- | ||
| adhesion_type : str | ||
| 'cell-cell' or 'cell-ECM' | ||
| figsize : tuple | ||
| Figure size | ||
| """ | ||
| # Filter data | ||
| plot_data = self.data[self.data['adhesion_type'] == adhesion_type].copy() | ||
|
|
||
| # Create figure with subplots | ||
| fig, axes = plt.subplots(1, 2, figsize=figsize) |
Comment on lines
+94
to
+100
| def process_all_simulations(): | ||
| """ | ||
| Process all CC3D simulation results | ||
| """ | ||
| # Initialize processor | ||
| processor = CC3DDataProcessor("/path/to/your/cc3d/simulations") | ||
|
|
Comment on lines
+1
to
+3
| import pandas as pd | ||
| import matplotlib.pyplot as plt | ||
| from scipy.signal import find_peaks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the .CSVs for having conducted ExploratoryDataAnalysis and Data wrangling.