Skip to content

Conversation

@cfrick13
Copy link
Contributor

@cfrick13 cfrick13 commented Oct 4, 2024

General overview

  • this code performs new analysis with dxdt_48_volume (nuclear transient growth rate) across cell cycle for Figure 5 panel F, and suppFig9 and 10. The analysis is mostly simple and is captured in nuc_morph_analysis/analyses/volume/plot_help.py / plot_dxdt_over_time_by_cell_cycle.py

-this code also introduces a new workflow for identifying short-lived dramatic dips in nuclear volume (suppFigS10).

Volume dip detection and removal (new features and where they come from)

  • global_dataset_filtering functions

    add_volume_change_over_25_minute_window --> 'volume_change_over_25_minutes'
    
  • filter_out_dips.run_script(df_full) -->

    'volume_dip_peak_mask_at_region', # boolean array, true at all points within peak region(s)
    'volume_dip_peak_mask_at_center', # boolean array, true at all peak centers
    'volume_dip_has_peak', # boolean array, true at all points if there is a peak
    'volume_dip_volume_change_at_center', # magnitude value at each peak center (left_base - peak)
    'volume_dip_volume_change_at_region', # magnitude values at all points within peak region(s) (left_base - peak)
    'volume_dip_width_at_center', # width of the peak at the peak center index
    'volume_dip_width_at_region', # width of the peak at all indices in the peak region
    'volume_dip_max_volume_change', # maximum magnitude value (at all points in array)
    'volume_dip_peak_id_at_center', # peak id at the peak center index
    'volume_dip_peak_id_at_region', # peak id at all indices in the peak region
    'volume_dip_total_number', # total number of peaks
    "volume_dip_removed_um_unfilled", # dips or jumps removed (refilled with nans)
    
    'volume_dips_removed_um_unfilled' # volume trajectories with peak (volume dip) regions removed
    
  • then compute growth rate to get -->

    `dxdt_48_volume_dips_removed_um_unfilled`
    
  • and compute neighbors to get -->

    'neighbor_avg_dxdt_48_volume_dips_removed_um_unfilled_90um'
    'neighbor_avg_dxdt_48_volume_dips_removed_um_unfilled_whole_colony'
    

New/updated figures generated in this code

Figure 5 panel F, G, H

image * _note: only change to H was N value correction_

SuppFig S9 F,G,H

image * _note: only change to F was x-axis values corrected to be in µm/hr_ * _note: only change to H was N value

SuppFig S10 (all)

image

dataset="all_baseline",
remove_growth_outliers=True,
load_local=False,
load_local=True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
load_local=True,
load_local=False,

@cfrick13
Copy link
Contributor Author

cfrick13 commented Dec 5, 2024

updates

I made a few more edits to add clarity and then merged the dev branch.

tests

Reran write_data_for_colorizer.py successfully.
Rerunning run_all_manuscript_worfklows.py.

Copy link
Collaborator

@jcass11 jcass11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a look through all the files and it looks great! Did not re-test since it sounds like you're on top of that

@cfrick13
Copy link
Contributor Author

cfrick13 commented Dec 5, 2024

update:
====== Successes ======
figure_1_dataset (393.7s) (50.8GB)
figure_3_s4_height_density (317.3s) (44.6GB)
figure_4_s8_volume_trajectories (67.1s) (27.1GB)
figure_6_s11_compensation (77.9s) (27.1GB)
figure_7_s13_s14_lineage (259.2s) (27.1GB)
figure_s12_feeding_control (86.2s) (20.3GB)
figure_s15_linear_regression_model (1460.5s) (27.1GB)
figure_s19_transition_point (15.4s) (27.2GB)
figure_s1_cell_health (13.5s) (23.7GB)
figure_s20_precision_error (7.2s) (5.3GB)
figure_s2_s3_s18_segmentation_model_validation (155.9s) (8.4GB)
figure_s7_growth_outliers (78.3s) (27.9GB)
====== Failures ======
figure_5_s9_s10_local_growth (154.7s) (43.9GB). TypeError expected string or bytes-like object. See stack trace above.
figure_s6_s16_inhibitors (29.6s) (13.4GB). AssertionError . See stack trace above.
====== 12 succeeded 2 failed ======

@cfrick13
Copy link
Contributor Author

cfrick13 commented Dec 5, 2024

====== figure_5_s9_s10_local_growth ======
Traceback (most recent call last):
File "/allen/aics/assay-dev/users/Frick/PythonProjects/repos/nucmorph_dev/nuc-morph-analysis/nuc_morph_analysis/utilities/workflow_runner.py", line 38, in _runjob
job()
File "/allen/aics/assay-dev/users/Frick/PythonProjects/repos/nucmorph_dev/nuc-morph-analysis/run_all_manuscript_workflows.py", line 43, in figure_5_s9_s10_local_growth
import nuc_morph_analysis.analyses.volume.FigS10_workflow
File "/allen/aics/assay-dev/users/Frick/PythonProjects/repos/nucmorph_dev/nuc-morph-analysis/nuc_morph_analysis/analyses/volume/FigS10_workflow.py", line 123, in
axlist = type_axlist(axlist_untyped)
File "/allen/aics/assay-dev/users/Frick/PythonProjects/repos/nucmorph_dev/nuc-morph-analysis/nuc_morph_analysis/lib/visualization/matplotlib_to_axlist.py", line 21, in type_axlist
plt_axis_list = cast(List[Axes], cast(NDArray, plt_axis_np).tolist())
AttributeError: 'list' object has no attribute 'tolist'
====== Failures ======
figure_5_s9_s10_local_growth (161.4s) (39.6GB). AttributeError 'list' object has no attribute 'tolist'. See stack trace above.
====== 1 failed ======

@cfrick13
Copy link
Contributor Author

cfrick13 commented Dec 5, 2024

Got it working! Will merge now!
====== Successes ======
figure_5_s9_s10_local_growth (236.4s) (41.3GB)
====== 1 succeeded ======

@cfrick13 cfrick13 added this pull request to the merge queue Dec 5, 2024
Merged via the queue into dev with commit 62f811b Dec 5, 2024
1 check passed
@cfrick13 cfrick13 deleted the transient_growth_f5 branch December 5, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants