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

Number workflows #37

Merged
merged 15 commits into from
Nov 20, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ def run_inhibitor_work():
_ = global_dataset_filtering.load_dataset_with_features("all_drug_perturbation", save_local=True)

run_inhibitor_work()

# %%
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
df_full = filter_data.all_timepoints_full_tracks(df)
df_track_level_features = filter_data.track_level_features(df_full)

# %% MAIN FIGURE PANELS

# %%
# Plot all tracks all datasets synchronized in real or normalized time
for time in ["sync_time_Ff", "normalized_time"]:
plot_tracks.plot_all_tracks_synchronized(df_full, figdir, "volume", time)

# %% MAIN FIGURE PANELS

# %%
# Plot single sample track from same nucleus as in formation/breakdown figure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,5 @@
add_unity_line=True,
remove_all_points_in_pdf=pngflag,
)

# %%
1 change: 1 addition & 0 deletions nuc_morph_analysis/lib/preprocessing/filter_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ def all_timepoints_full_tracks(df):
"""
df = all_timepoints_minimal_filtering(df)
df = df.loc[df["is_full_track"] == True]
df = df.sort_values('index_sequence')
chantelleleveille marked this conversation as resolved.
Show resolved Hide resolved
return df


Expand Down
98 changes: 48 additions & 50 deletions run_all_manuscript_workflows.py
Original file line number Diff line number Diff line change
@@ -1,68 +1,66 @@
import argparse
from nuc_morph_analysis.utilities.workflow_runner import get_jobs, execute
from nuc_morph_analysis.analyses.colony_area import colony_area_workflow
from nuc_morph_analysis.analyses.segmentation_model_validation import seg_model_validation_figure_workflow


class Workflows:
def figure1_dataset():
import nuc_morph_analysis.analyses.dataset_images_for_figures.run_all_figure_1_code

def figure_1_dataset():
import nuc_morph_analysis.analyses.dataset_images_for_figures.figure_1_workflow
# panel E items are generated in segmentation_model_validation

def figure1_main_text():
colony_area_workflow.baseline_colony_starting_area()

def figure3_figureS2_height():
import nuc_morph_analysis.analyses.height.height_workflow

def figure4_figureS5_volume_trajectories():
# excludes aphidicolin panel S5C
import nuc_morph_analysis.analyses.volume.trajectories_workflow

def figure5_figureS6_local_growth():
import nuc_morph_analysis.analyses.volume.local_growth_workflow

def figure6_figureS7_compensation():
import nuc_morph_analysis.analyses.volume_variation.compensation_workflow

def figure7_lineage():
import nuc_morph_analysis.analyses.lineage.lineage_manuscript_workflow

def figure_inhibitors():
import nuc_morph_analysis.analyses.inhibitors.run_all_inhibitor_analysis_workflow


def figure_s1_cell_health():
import nuc_morph_analysis.analyses.cell_health.figure_s1_workflow

def figure_s2_s3_s18_segmentation_model_validation():
seg_model_validation_figure_workflow.save_out_specified_image_pairs_with_overlays()
import nuc_morph_analysis.analyses.segmentation_model_validation.quantitative_validation_workflow

# figure 2 images generated using timelapse feature exploroer

def figure_3_s4_height_density():
# figure 3 images generated using timelapse feauture explorer
import nuc_morph_analysis.analyses.height.figure_3_s4_workflow

# figure s5 image data can be found on quilt

def figure_s6_s16_inhibitors():
import nuc_morph_analysis.analyses.inhibitors.figure_s6_s16_workflow
colony_area_workflow.aphidicolin_control_starting_area()
colony_area_workflow.importazole_control_starting_area()

def figure_s7_growth_outliers():
import nuc_morph_analysis.analyses.evaluate_filters_and_outliers.figure_s7_workflow

def figure_4_s8_volume_trajectories():
import nuc_morph_analysis.analyses.volume.figure_4_s8_workflow

def figure_5_s9_local_growth():
import nuc_morph_analysis.analyses.volume.figure_5_s9_workflow
#s10 coming soon

def transition_point():
import nuc_morph_analysis.analyses.volume.supplement_vis_transition_point_calculation_workflow

def growth_outliers():
import nuc_morph_analysis.analyses.evaluate_filters_and_outliers.growth_feature_outliers_workflow

def error():
import nuc_morph_analysis.analyses.error_morflowgenesis.workflows.fixed_control_analysis_manuscript_workflow

def feeding_control():
import nuc_morph_analysis.analyses.feeding_control.feeding_control_manuscript_workflow

def figure_6_s11_compensation():
import nuc_morph_analysis.analyses.volume_variation.figure_6_s11_workflow

def figure_s12_feeding_control():
import nuc_morph_analysis.analyses.feeding_control.figure_s12_workflow
colony_area_workflow.feeding_control_starting_area()

def figureS1_segmentation_model_validation():
from nuc_morph_analysis.analyses.segmentation_model_validation import (
seg_model_validation_figure_workflow,
)
def figure_7_s13_s14_lineage():
import nuc_morph_analysis.analyses.lineage.figure_7_s13_s14_workflow

seg_model_validation_figure_workflow.save_out_specified_image_pairs_with_overlays()
import nuc_morph_analysis.analyses.segmentation_model_validation.quantitative_validation_workflow
def figure_s15_linear_regression_model():
import nuc_morph_analysis.analyses.linear_regression.figure_s15_workflow

# figure s17 image data can be found on quilt

def figure_s19_transition_point():
import nuc_morph_analysis.analyses.volume.figure_s19_workflow

def supplemental_figure_cell_health():
import nuc_morph_analysis.analyses.cell_health.cell_health_workflow

def supplemental_figure_linear_regression_model():
import nuc_morph_analysis.analyses.linear_regression.supplemental_lrm_figure_workflow


def figure_s20_precision_error():
import nuc_morph_analysis.analyses.error_morflowgenesis.workflows.figure_s20_workflow

ALL_WORKFLOWS = get_jobs(Workflows)

parser = argparse.ArgumentParser(description="Run all manuscript workflows")
Expand Down