spacr 0.1.50__py3-none-any.whl → 0.1.55__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
spacr/sequencing.py CHANGED
@@ -37,22 +37,6 @@ def analyze_reads(settings):
37
37
  None
38
38
  """
39
39
 
40
- def save_chunk_to_hdf5_v1(output_file_path, data_chunk, chunk_counter):
41
- """
42
- Save a data chunk to an HDF5 file.
43
-
44
- Parameters:
45
- - output_file_path (str): The path to the output HDF5 file.
46
- - data_chunk (list): The data chunk to be saved.
47
- - chunk_counter (int): The counter for the current chunk.
48
-
49
- Returns:
50
- None
51
- """
52
- df = pd.DataFrame(data_chunk, columns=['combined_read', 'grna', 'plate_row', 'column', 'sample'])
53
- with pd.HDFStore(output_file_path, mode='a', complevel=5, complib='blosc') as store:
54
- store.put(f'reads/chunk_{chunk_counter}', df, format='table', append=True)
55
-
56
40
  def save_chunk_to_hdf5(output_file_path, data_chunk, chunk_counter):
57
41
  """
58
42
  Save a data chunk to an HDF5 file.
@@ -306,7 +290,7 @@ def analyze_reads(settings):
306
290
  qc_df = pd.DataFrame([qc])
307
291
  qc_df.to_csv(qc_file_path, index=False)
308
292
 
309
- from .utils import get_analyze_reads_default_settings
293
+ from .settings import get_analyze_reads_default_settings
310
294
 
311
295
  settings = get_analyze_reads_default_settings(settings)
312
296
 
spacr/settings.py CHANGED
@@ -1,4 +1,4 @@
1
- import os
1
+ import os, ast
2
2
 
3
3
  def set_default_plot_merge_settings():
4
4
  settings = {}
@@ -168,9 +168,9 @@ def _get_object_settings(object_type, settings):
168
168
  if settings['verbose']:
169
169
  print(object_settings)
170
170
 
171
- return object_settings
171
+ return object_settings
172
172
 
173
- def get_umap_image_settings(settings={}):
173
+ def set_default_umap_image_settings(settings={}):
174
174
  settings.setdefault('src', 'path')
175
175
  settings.setdefault('row_limit', 1000)
176
176
  settings.setdefault('tables', ['cell', 'cytoplasm', 'nucleus', 'pathogen'])
@@ -485,4 +485,427 @@ def get_identify_masks_finetune_default_settings(settings):
485
485
  settings.setdefault('rescale', False)
486
486
  settings.setdefault('resample', False)
487
487
  settings.setdefault('grayscale', True)
488
- return settings
488
+ return settings
489
+
490
+ q = None
491
+
492
+ def check_settings(vars_dict):
493
+ global q
494
+ from .gui_utils import parse_list
495
+ settings = {}
496
+ # Define the expected types for each key, including None where applicable
497
+ expected_types = {
498
+ "src": str,
499
+ "metadata_type": str,
500
+ "custom_regex": (str, type(None)),
501
+ "experiment": str,
502
+ "channels": list,
503
+ "magnification": int,
504
+ "nucleus_channel": (int, type(None)),
505
+ "nucleus_background": int,
506
+ "nucleus_Signal_to_noise": float,
507
+ "nucleus_CP_prob": float,
508
+ "nucleus_FT": float,
509
+ "cell_channel": (int, type(None)),
510
+ "cell_background": (int, float),
511
+ "cell_Signal_to_noise": (int, float),
512
+ "cell_CP_prob": (int, float),
513
+ "cell_FT": (int, float),
514
+ "pathogen_channel": (int, type(None)),
515
+ "pathogen_background": (int, float),
516
+ "pathogen_Signal_to_noise": (int, float),
517
+ "pathogen_CP_prob": (int, float),
518
+ "pathogen_FT": (int, float),
519
+ "preprocess": bool,
520
+ "masks": bool,
521
+ "examples_to_plot": int,
522
+ "randomize": bool,
523
+ "batch_size": int,
524
+ "timelapse": bool,
525
+ "timelapse_displacement": int,
526
+ "timelapse_memory": int,
527
+ "timelapse_frame_limits": list, # This can be a list of lists
528
+ "timelapse_remove_transient": bool,
529
+ "timelapse_mode": str,
530
+ "timelapse_objects": list,
531
+ "fps": int,
532
+ "remove_background": bool,
533
+ "lower_percentile": (int, float),
534
+ "merge_pathogens": bool,
535
+ "normalize_plots": bool,
536
+ "all_to_mip": bool,
537
+ "pick_slice": bool,
538
+ "skip_mode": str,
539
+ "save": bool,
540
+ "plot": bool,
541
+ "workers": int,
542
+ "verbose": bool,
543
+ "input_folder": str,
544
+ "cell_mask_dim": int,
545
+ "cell_min_size": int,
546
+ "cytoplasm_min_size": int,
547
+ "nucleus_mask_dim": int,
548
+ "nucleus_min_size": int,
549
+ "pathogen_mask_dim": int,
550
+ "pathogen_min_size": int,
551
+ "save_png": bool,
552
+ "crop_mode": list,
553
+ "use_bounding_box": bool,
554
+ "png_size": list, # This can be a list of lists
555
+ "normalize": bool,
556
+ "png_dims": list,
557
+ "normalize_by": str,
558
+ "save_measurements": bool,
559
+ "representative_images": bool,
560
+ "plot_filtration": bool,
561
+ "include_uninfected": bool,
562
+ "dialate_pngs": bool,
563
+ "dialate_png_ratios": list,
564
+ "max_workers": int,
565
+ "cells": list,
566
+ "cell_loc": list,
567
+ "pathogens": list,
568
+ "pathogen_loc": (list, list), # This can be a list of lists
569
+ "treatments": list,
570
+ "treatment_loc": (list, list), # This can be a list of lists
571
+ "channel_of_interest": int,
572
+ "compartments": list,
573
+ "measurement": str,
574
+ "nr_imgs": int,
575
+ "um_per_pixel": (int, float),
576
+ # Additional settings based on provided defaults
577
+ "include_noninfected": bool,
578
+ "include_multiinfected": bool,
579
+ "include_multinucleated": bool,
580
+ "filter_min_max": (list, type(None)),
581
+ "channel_dims": list,
582
+ "backgrounds": list,
583
+ "outline_thickness": int,
584
+ "outline_color": str,
585
+ "overlay_chans": list,
586
+ "overlay": bool,
587
+ "normalization_percentiles": list,
588
+ "print_object_number": bool,
589
+ "nr": int,
590
+ "figuresize": int,
591
+ "cmap": str,
592
+ "test_mode": bool,
593
+ "test_images": int,
594
+ "remove_background_cell": bool,
595
+ "remove_background_nucleus": bool,
596
+ "remove_background_pathogen": bool,
597
+ "pathogen_model": (str, type(None)),
598
+ "filter": bool,
599
+ "upscale": bool,
600
+ "upscale_factor": float,
601
+ "adjust_cells": bool,
602
+ "row_limit": int,
603
+ "tables": list,
604
+ "visualize": str,
605
+ "image_nr": int,
606
+ "dot_size": int,
607
+ "n_neighbors": int,
608
+ "min_dist": float,
609
+ "metric": str,
610
+ "eps": float,
611
+ "min_samples": int,
612
+ "filter_by": str,
613
+ "img_zoom": float,
614
+ "plot_by_cluster": bool,
615
+ "plot_cluster_grids": bool,
616
+ "remove_cluster_noise": bool,
617
+ "remove_highly_correlated": bool,
618
+ "log_data": bool,
619
+ "black_background": bool,
620
+ "remove_image_canvas": bool,
621
+ "plot_outlines": bool,
622
+ "plot_points": bool,
623
+ "smooth_lines": bool,
624
+ "clustering": str,
625
+ "exclude": (str, type(None)),
626
+ "col_to_compare": str,
627
+ "pos": str,
628
+ "neg": str,
629
+ "embedding_by_controls": bool,
630
+ "plot_images": bool,
631
+ "reduction_method": str,
632
+ "save_figure": bool,
633
+ "color_by": (str, type(None)),
634
+ "analyze_clusters": bool,
635
+ "resnet_features": bool,
636
+ "test_nr": int,
637
+ "radial_dist": bool,
638
+ "calculate_correlation": bool,
639
+ "manders_thresholds": list,
640
+ "homogeneity": bool,
641
+ "homogeneity_distances": list,
642
+ "save_arrays": bool,
643
+ "cytoplasm": bool,
644
+ "merge_edge_pathogen_cells": bool,
645
+ "cells_per_well": int,
646
+ "pathogen_size_range": list,
647
+ "nucleus_size_range": list,
648
+ "cell_size_range": list,
649
+ "pathogen_intensity_range": list,
650
+ "nucleus_intensity_range": list,
651
+ "cell_intensity_range": list,
652
+ "target_intensity_min": int,
653
+ "model_type": str,
654
+ "heatmap_feature": str,
655
+ "grouping": str,
656
+ "min_max": str,
657
+ "minimum_cell_count": int,
658
+ "n_estimators": int,
659
+ "test_size": float,
660
+ "location_column": str,
661
+ "positive_control": str,
662
+ "negative_control": str,
663
+ "n_repeats": int,
664
+ "top_features": int,
665
+ "remove_low_variance_features": bool,
666
+ "n_jobs": int,
667
+ "classes": list,
668
+ "schedule": str,
669
+ "loss_type": str,
670
+ "image_size": int,
671
+ "epochs": int,
672
+ "val_split": float,
673
+ "train_mode": str,
674
+ "learning_rate": float,
675
+ "weight_decay": float,
676
+ "dropout_rate": float,
677
+ "init_weights": bool,
678
+ "amsgrad": bool,
679
+ "use_checkpoint": bool,
680
+ "gradient_accumulation": bool,
681
+ "gradient_accumulation_steps": int,
682
+ "intermedeate_save": bool,
683
+ "pin_memory": bool,
684
+ "num_workers": int,
685
+ "augment": bool,
686
+ "target": str,
687
+ "cell_types": list,
688
+ "cell_plate_metadata": (list, type(None)),
689
+ "pathogen_types": list,
690
+ "pathogen_plate_metadata": (list, list), # This can be a list of lists
691
+ "treatment_plate_metadata": (list, list), # This can be a list of lists
692
+ "metadata_types": list,
693
+ "cell_chann_dim": int,
694
+ "nucleus_chann_dim": int,
695
+ "pathogen_chann_dim": int,
696
+ "plot_nr": int,
697
+ "plot_control": bool,
698
+ "remove_background": bool,
699
+ "target": str,
700
+ "upstream": str,
701
+ "downstream": str,
702
+ "barecode_length_1": int,
703
+ "barecode_length_2": int,
704
+ "chunk_size": int,
705
+ "grna": str,
706
+ "barcodes": str,
707
+ "plate_dict": dict,
708
+ "pc": str,
709
+ "pc_loc": str,
710
+ "nc": str,
711
+ "nc_loc": str,
712
+ "dependent_variable": str,
713
+ "transform": (str, type(None)),
714
+ "agg_type": str,
715
+ "min_cell_count": int,
716
+ "regression_type": str,
717
+ "remove_row_column_effect": bool,
718
+ "alpha": float,
719
+ "fraction_threshold": float,
720
+ "class_1_threshold": (float, type(None)),
721
+ "batch_size": int,
722
+ "CP_prob": float,
723
+ "flow_threshold": float,
724
+ "percentiles": (list, type(None)),
725
+ "circular": bool,
726
+ "invert": bool,
727
+ "diameter": int,
728
+ "grayscale": bool,
729
+ "resize": bool,
730
+ "target_height": (int, type(None)),
731
+ "target_width": (int, type(None)),
732
+ "rescale": bool,
733
+ "resample": bool,
734
+ "model_name": str,
735
+ "Signal_to_noise": int,
736
+ "learning_rate": float,
737
+ "weight_decay": float,
738
+ "batch_size": int,
739
+ "n_epochs": int,
740
+ "from_scratch": bool,
741
+ "width_height": list,
742
+ "resize": bool,
743
+ "gene_weights_csv": str,
744
+ "fraction_threshold": float,
745
+ }
746
+
747
+ for key, (label, widget, var) in vars_dict.items():
748
+ if key not in expected_types:
749
+ if key not in ["General","Nucleus","Cell","Pathogen","Timelapse","Plot","Object Image","Annotate Data","Measurements","Advanced","Miscellaneous","Test"]:
750
+
751
+ q.put(f"Key {key} not found in expected types.")
752
+ continue
753
+
754
+ value = var.get()
755
+ expected_type = expected_types.get(key, str)
756
+
757
+ try:
758
+ if key in ["png_size", "pathogen_plate_metadata", "treatment_plate_metadata"]:
759
+ parsed_value = ast.literal_eval(value) if value else None
760
+ if isinstance(parsed_value, list):
761
+ if all(isinstance(i, list) for i in parsed_value) or all(not isinstance(i, list) for i in parsed_value):
762
+ settings[key] = parsed_value
763
+ else:
764
+ raise ValueError("Invalid format: Mixed list and list of lists")
765
+ else:
766
+ raise ValueError("Invalid format for list or list of lists")
767
+ elif expected_type == list:
768
+ settings[key] = parse_list(value) if value else None
769
+ elif expected_type == bool:
770
+ settings[key] = value if isinstance(value, bool) else value.lower() in ['true', '1', 't', 'y', 'yes']
771
+ elif expected_type == (int, type(None)):
772
+ settings[key] = int(value) if value else None
773
+ elif expected_type == (float, type(None)):
774
+ settings[key] = float(value) if value else None
775
+ elif expected_type == (int, float):
776
+ settings[key] = float(value) if '.' in value else int(value)
777
+ elif expected_type == (str, type(None)):
778
+ settings[key] = str(value) if value else None
779
+ elif isinstance(expected_type, tuple):
780
+ for typ in expected_type:
781
+ try:
782
+ settings[key] = typ(value) if value else None
783
+ break
784
+ except (ValueError, TypeError):
785
+ continue
786
+ else:
787
+ raise ValueError
788
+ else:
789
+ settings[key] = expected_type(value) if value else None
790
+ except (ValueError, SyntaxError):
791
+ expected_type_name = ' or '.join([t.__name__ for t in expected_type]) if isinstance(expected_type, tuple) else expected_type.__name__
792
+ q.put(f"Error: Invalid format for {key}. Expected type: {expected_type_name}.")
793
+ return
794
+
795
+ return settings
796
+
797
+ def generate_fields(variables, scrollable_frame):
798
+ from .gui_utils import create_input_field, spacrToolTip
799
+ row = 1
800
+ vars_dict = {}
801
+ tooltips = {
802
+ "src": "Path to the folder containing the images.",
803
+ "metadata_type": "Type of metadata to expect in the images. This will determine how the images are processed. If 'custom' is selected, you can provide a custom regex pattern to extract metadata from the image names.",
804
+ "custom_regex": "Custom regex pattern to extract metadata from the image names. This will only be used if 'custom' is selected for 'metadata_type'.",
805
+ "experiment": "Name of the experiment. This will be used to name the output files.",
806
+ "channels": "List of channels to use for the analysis. The first channel is 0, the second is 1, and so on. For example, [0,1,2] will use channels 0, 1, and 2.",
807
+ "magnification": "At what magnification the images were taken. This will be used to determine the size of the objects in the images.",
808
+ "nucleus_channel": "The channel to use for the nucleus. If None, the nucleus will not be segmented.",
809
+ "nucleus_background": "The background intensity for the nucleus channel. This will be used to remove background noise.",
810
+ "nucleus_Signal_to_noise": "The signal-to-noise ratio for the nucleus channel. This will be used to determine the range of intensities to normalize images to for nucleus segmentation.",
811
+ "nucleus_CP_prob": "The cellpose probability threshold for the nucleus channel. This will be used to segment the nucleus.",
812
+ "nucleus_FT": "The flow threshold for nucleus objects. This will be used in nuclues segmentation.",
813
+ "cell_channel": "The channel to use for the cell. If None, the cell will not be segmented.",
814
+ "cell_background": "The background intensity for the cell channel. This will be used to remove background noise.",
815
+ "cell_Signal_to_noise": "The signal-to-noise ratio for the cell channel. This will be used to determine the range of intensities to normalize images to for cell segmentation.",
816
+ "cell_CP_prob": "The cellpose probability threshold for the cell channel. This will be used in cell segmentation.",
817
+ "cell_FT": "The flow threshold for cell objects. This will be used to segment the cells.",
818
+ "pathogen_channel": "The channel to use for the pathogen. If None, the pathogen will not be segmented.",
819
+ "pathogen_background": "The background intensity for the pathogen channel. This will be used to remove background noise.",
820
+ "pathogen_Signal_to_noise": "The signal-to-noise ratio for the pathogen channel. This will be used to determine the range of intensities to normalize images to for pathogen segmentation.",
821
+ "pathogen_CP_prob": "The cellpose probability threshold for the pathogen channel. This will be used to segment the pathogen.",
822
+ "pathogen_FT": "The flow threshold for pathogen objects. This will be used in pathogen segmentation.",
823
+ "preprocess": "Whether to preprocess the images before segmentation. This includes background removal and normalization. Set to False only if this step has already been done.",
824
+ "masks": "Whether to generate masks for the segmented objects. If True, masks will be generated for the nucleus, cell, and pathogen.",
825
+ "examples_to_plot": "The number of images to plot for each segmented object. This will be used to visually inspect the segmentation results and normalization.",
826
+ "randomize": "Whether to randomize the order of the images before processing. Recommended to avoid bias in the segmentation.",
827
+ "batch_size": "The batch size to use for processing the images. This will determine how many images are processed at once. Images are normalized and segmented in batches. Lower if application runs out of RAM or VRAM.",
828
+ "timelapse": "Whether to process the images as a timelapse.",
829
+ "timelapse_displacement": "The displacement between frames in the timelapse. This will be used to align the frames before processing.",
830
+ "timelapse_memory": "The number of frames to in tandem objects must be present in to be considered the same object in the timelapse.",
831
+ "timelapse_frame_limits": "The frame limits to use for the timelapse. This will determine which frames are processed. For example, [5,20] will process frames 5 to 20.",
832
+ "timelapse_remove_transient": "Whether to remove transient objects in the timelapse. Transient objects are present in fewer than all frames.",
833
+ "timelapse_mode": "The mode to use for processing the timelapse. 'trackpy' uses the trackpy library for tracking objects, while 'btrack' uses the btrack library.",
834
+ "timelapse_objects": "The objects to track in the timelapse (cell, nucleus or pathogen). This will determine which objects are tracked over time. If None, all objects will be tracked.",
835
+ "fps": "Frames per second of the automatically generated timelapse movies.",
836
+ "remove_background": "Whether to remove background noise from the images. This will help improve the quality of the segmentation.",
837
+ "lower_percentile": "The lower quantile to use for normalizing the images. This will be used to determine the range of intensities to normalize images to.",
838
+ "merge_pathogens": "Whether to merge pathogen objects that share more than 75% of their perimeter.",
839
+ "normalize_plots": "Whether to normalize the plots.",
840
+ "all_to_mip": "Whether to convert all images to maximum intensity projections before processing.",
841
+ "pick_slice": "Whether to pick a single slice from the z-stack images. If False, the maximum intensity projection will be used.",
842
+ "skip_mode": "The mode to use for skipping images. This will determine how to handle images that cannot be processed.",
843
+ "save": "Whether to save the results to disk.",
844
+ "merge_edge_pathogen_cells": "Whether to merge cells that share pathogen objects.",
845
+ "plot": "Whether to plot the results.",
846
+ "workers": "The number of workers to use for processing the images. This will determine how many images are processed in parallel. Increase to speed up processing.",
847
+ "verbose": "Whether to print verbose output during processing.",
848
+ "input_folder": "Path to the folder containing the images.",
849
+ "cell_mask_dim": "The dimension of the array the cell mask is saved in.",
850
+ "cell_min_size": "The minimum size of cell objects in pixels^2.",
851
+ "cytoplasm": "Whether to segment the cytoplasm (Cell - Nucleus + Pathogen).",
852
+ "cytoplasm_min_size": "The minimum size of cytoplasm objects in pixels^2.",
853
+ "nucleus_mask_dim": "The dimension of the array the nucleus mask is saved in.",
854
+ "nucleus_min_size": "The minimum size of nucleus objects in pixels^2.",
855
+ "pathogen_mask_dim": "The dimension of the array the pathogen mask is saved in.",
856
+ "pathogen_min_size": "The minimum size of pathogen objects in pixels^2.",
857
+ "save_png": "Whether to save the segmented objects as PNG images.",
858
+ "crop_mode": "The mode to use for cropping the images. This will determine which objects are cropped from the images (cell, nucleus, pathogen, cytoplasm).",
859
+ "use_bounding_box": "Whether to use the bounding box of the objects for cropping. If False, only the object itself will be cropped.",
860
+ "png_size": "The size of the PNG images to save. This will determine the size of the saved images.",
861
+ "normalize": "The percentiles to use for normalizing the images. This will be used to determine the range of intensities to normalize images to. If None, no normalization is done.",
862
+ "png_dims": "The dimensions of the PNG images to save. This will determine the dimensions of the saved images. Maximum of 3 dimensions e.g. [1,2,3].",
863
+ "normalize_by": "Whether to normalize the images by field of view (fov) or by PNG image (png).",
864
+ "save_measurements": "Whether to save the measurements to disk.",
865
+ "representative_images": "Whether to save representative images of the segmented objects (Not working yet).",
866
+ "plot_filtration": "Whether to plot the filtration steps.",
867
+ "include_uninfected": "Whether to include uninfected cells in the analysis.",
868
+ "dialate_pngs": "Whether to dilate the PNG images before saving.",
869
+ "dialate_png_ratios": "The ratios to use for dilating the PNG images. This will determine the amount of dilation applied to the images before cropping.",
870
+ "max_workers": "The number of workers to use for processing the images. This will determine how many images are processed in parallel. Increase to speed up processing.",
871
+ "cells": "The cell types to include in the analysis.",
872
+ "cell_loc": "The locations of the cell types in the images.",
873
+ "pathogens": "The pathogen types to include in the analysis.",
874
+ "pathogen_loc": "The locations of the pathogen types in the images.",
875
+ "treatments": "The treatments to include in the analysis.",
876
+ "treatment_loc": "The locations of the treatments in the images.",
877
+ "channel_of_interest": "The channel of interest to use for the analysis.",
878
+ "compartments": "The compartments to measure in the images.",
879
+ "measurement": "The measurement to use for the analysis.",
880
+ "nr_imgs": "The number of images to plot.",
881
+ "um_per_pixel": "The micrometers per pixel for the images."
882
+ }
883
+
884
+ for key, (var_type, options, default_value) in variables.items():
885
+ label, widget, var = create_input_field(scrollable_frame.scrollable_frame, key, row, var_type, options, default_value)
886
+ vars_dict[key] = (label, widget, var) # Store the label, widget, and variable
887
+
888
+ # Add tooltip to the label if it exists in the tooltips dictionary
889
+ if key in tooltips:
890
+ spacrToolTip(label, tooltips[key])
891
+ row += 1
892
+ return vars_dict
893
+
894
+ categories = {
895
+ "General": ["src", "input_folder", "metadata_type", "custom_regex", "experiment", "channels", "magnification"],
896
+ "Nucleus": ["nucleus_channel", "nucleus_background", "nucleus_Signal_to_noise", "nucleus_CP_prob", "nucleus_FT", "remove_background_nucleus", "nucleus_min_size", "nucleus_mask_dim", "nucleus_loc"],
897
+ "Cell": ["cell_channel", "cell_background", "cell_Signal_to_noise", "cell_CP_prob", "cell_FT", "remove_background_cell", "cell_min_size", "cell_mask_dim", "cytoplasm", "cytoplasm_min_size", "include_uninfected", "merge_edge_pathogen_cells", "adjust_cells"],
898
+ "Pathogen": ["pathogen_channel", "pathogen_background", "pathogen_Signal_to_noise", "pathogen_CP_prob", "pathogen_FT", "pathogen_model", "remove_background_pathogen", "pathogen_min_size", "pathogen_mask_dim"],
899
+ "Timelapse": ["timelapse", "fps", "timelapse_displacement", "timelapse_memory", "timelapse_frame_limits", "timelapse_remove_transient", "timelapse_mode", "timelapse_objects", "compartments"],
900
+ "Plot": ["plot_filtration", "examples_to_plot", "normalize_plots", "normalize", "cmap", "figuresize", "plot", "plot_cluster_grids", "img_zoom", "row_limit", "color_by", "plot_images", "smooth_lines", "plot_points", "plot_outlines", "black_background", "plot_by_cluster", "heatmap_feature","grouping","min_max","cmap","save_figure"],
901
+ "Object Image": ["save_png", "dialate_pngs", "dialate_png_ratios", "png_size", "png_dims", "save_arrays", "normalize_by", "dialate_png_ratios", "crop_mode", "dialate_pngs", "normalize", "use_bounding_box"],
902
+ "Annotate Data": ["positive_control","negative_control", "location_column", "treatment_loc", "cells", "cell_loc", "pathogens", "pathogen_loc", "channel_of_interest", "measurement", "treatments", "representative_images", "um_per_pixel", "nr_imgs", "exclude", "exclude_conditions", "mix", "pos", "neg"],
903
+ "Measurements": ["remove_image_canvas", "remove_highly_correlated", "homogeneity", "homogeneity_distances", "radial_dist", "calculate_correlation", "manders_thresholds", "save_measurements", "tables", "image_nr", "dot_size", "filter_by", "remove_highly_correlated_features", "remove_low_variance_features", "channel_of_interest"],
904
+ "Advanced": ["schedule", "test_size","exclude","n_repeats","top_features","n_jobs", "model_type","minimum_cell_count","n_estimators","preprocess", "remove_background", "normalize", "lower_percentile", "merge_pathogens", "batch_size", "filter", "save", "masks", "verbose", "randomize", "max_workers", "workers", "train_mode","amsgrad","use_checkpoint","gradient_accumulation","gradient_accumulation_steps","intermedeate_save","pin_memory","num_workers","channels","augment"],
905
+ "Clustering": ["eps","min_samples","analyze_clusters","clustering","remove_cluster_noise"],
906
+ "Embedding": ["visualize","n_neighbors","min_dist","metric","resnet_features","reduction_method","embedding_by_controls","col_to_compare","log_data"],
907
+ "Train DL Model": ["epochs", "loss_type", "optimizer_type","image_size","val_split","learning_rate","weight_decay","dropout_rate","init_weights", "train", "classes"],
908
+ "Miscellaneous": ["all_to_mip", "pick_slice", "skip_mode", "upscale", "upscale_factor"],
909
+ "Test": ["test_mode", "test_images", "random_test", "test_nr"],
910
+ "Sequencing": ["upstream", "downstream", "barecode_length_1", "barecode_length_2", "chunk_size", "test"]
911
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spacr
3
- Version: 0.1.50
3
+ Version: 0.1.55
4
4
  Summary: Spatial phenotype analysis of crisp screens (SpaCr)
5
5
  Home-page: https://github.com/EinarOlafsson/spacr
6
6
  Author: Einar Birnir Olafsson
@@ -1,23 +1,25 @@
1
- spacr/__init__.py,sha256=xu2zNv8A523YvDACynkThH2CYqN5mafsu9lfKGjMmIM,1278
1
+ spacr/__init__.py,sha256=cHMZ6CcoOfm_3igLgndH3hxDbW8kBx5pqM04zEtlg3w,1339
2
2
  spacr/__main__.py,sha256=bkAJJD2kjIqOP-u1kLvct9jQQCeUXzlEjdgitwi1Lm8,75
3
3
  spacr/alpha.py,sha256=Y95sLEfpK2OSYKRn3M8eUOU33JJeXfV8zhrC4KnwSTY,35244
4
4
  spacr/annotate_app.py,sha256=imQ7ZEXDyM6ce1dxZ1xUS1-KequuF_NCI4xCaPLjvco,29275
5
5
  spacr/annotate_app_v2.py,sha256=imQ7ZEXDyM6ce1dxZ1xUS1-KequuF_NCI4xCaPLjvco,29275
6
- spacr/app_annotate.py,sha256=vL4u_54bOZ2BO-azEgMG9HlNBXBLCzhIs10QggS6Adk,23572
6
+ spacr/app_annotate.py,sha256=lnjVLwzwpZ9-5cHuEgCmAC-pAnGQmmWyjTXDF0NV2Ps,23560
7
7
  spacr/app_classify.py,sha256=urTP_wlZ58hSyM5a19slYlBxN0PdC-9-ga0hvq8CGWc,165
8
- spacr/app_make_masks.py,sha256=rV2zoxYsJ8-uR39mXjDMkbNcxv-6vq2POw4QUTDD8_U,45072
9
- spacr/app_make_masks_v2.py,sha256=jmLYKJSPhI3Zf5MnbHqLNO2asI49a0BBOo2Y4p2uz4o,30528
8
+ spacr/app_make_masks.py,sha256=0qbZhCnWzqJAhRGCI4j7GdJx8mEBA8j7LxGjWlQHyss,45060
9
+ spacr/app_make_masks_v2.py,sha256=OkNeskNbgep8wQa4ES3jpJjZLfn4yIkGwQOd9r0spfA,30497
10
10
  spacr/app_mask.py,sha256=l-dBY8ftzCMdDe6-pXc2Nh_u-idNL9G7UOARiLJBtds,153
11
11
  spacr/app_measure.py,sha256=_K7APYIeOKpV6e_LcqabBjvEi7mfq9Fch8175x1x0k8,162
12
+ spacr/app_sequencing.py,sha256=DjG26jy4cpddnV8WOOAIiExtOe9MleVMY4MFa5uTo5w,157
13
+ spacr/app_umap.py,sha256=ZWAmf_OsIKbYvolYuWPMYhdlVe-n2CADoJulAizMiEo,153
12
14
  spacr/chris.py,sha256=YlBjSgeZaY8HPy6jkrT_ISAnCMAKVfvCxF0I9eAZLFM,2418
13
15
  spacr/classify_app.py,sha256=Zi15ryc1ocYitRF4kyxlC27XxGyzfSPdvj2d6ZrSh7E,8446
14
16
  spacr/cli.py,sha256=507jfOOEV8BoL4eeUcblvH-iiDHdBrEVJLu1ghAAPSc,1800
15
- spacr/core.py,sha256=m9fsk-qDPow4AzOYpTIsd4jT7PF_L_4y5xillR5eRdk,160253
17
+ spacr/core.py,sha256=S44olGF8qveg6uBCRDuCP4FZ5dXXVwSfeImolTpQIAs,160372
16
18
  spacr/deep_spacr.py,sha256=rvqOoY9dadcTcKiABf61Nb8HEMVp1NouFmtAE2ee1T4,37056
17
19
  spacr/foldseek.py,sha256=YIP1d4Ci6CeA9jSyiv-HTDbNmAmcSM9Y_DaOs7wYzLY,33546
18
20
  spacr/get_alfafold_structures.py,sha256=ehx_MQgb12k3hFecP6cYVlm5TLO8iWjgevy8ESyS3cw,3544
19
21
  spacr/graph_learning.py,sha256=1tR-ZxvXE3dBz1Saw7BeVFcrsUFu9OlUZeZVifih9eo,13070
20
- spacr/gui.py,sha256=1pumw2O0dfDZ4Hw4V8-pMlvODegDNulXsLNEFAnIB7c,7297
22
+ spacr/gui.py,sha256=awunZePAu-LH-rPEUhxVTAXXkG5L8oyHz-qHcEX6Im4,7765
21
23
  spacr/gui_2.py,sha256=ZAI5quQYbhQJ40vK0NCqU_UMSPLkpfeQpomBWUSM0fc,6946
22
24
  spacr/gui_annotate.py,sha256=ugBksLGOHdtOLlEuRyyc59TrkYKu3rDf8JxEgiBSVao,6536
23
25
  spacr/gui_classify_app.py,sha256=Zi15ryc1ocYitRF4kyxlC27XxGyzfSPdvj2d6ZrSh7E,8446
@@ -26,7 +28,7 @@ spacr/gui_make_masks_app_v2.py,sha256=X3izTBXdCZDlkVe-fbG-jmCQtcAbmK0OIivjyWaLhu
26
28
  spacr/gui_mask_app.py,sha256=mhTl_XzXLFl8Tx3WYEMpdYB_qw9u5JJa0EdkvlcIzAE,10706
27
29
  spacr/gui_measure_app.py,sha256=_C1-XFL5HSquUEEbM_NcxdvHx-socPFCx85MBG4d6xo,10598
28
30
  spacr/gui_sim_app.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
- spacr/gui_utils.py,sha256=jnbvfovPGcwY_hmHudEryhSBG3hFOUsV_iNQSokGHpM,70160
31
+ spacr/gui_utils.py,sha256=8joqzUdN_26VeI2Gsd0Tjh_ArAFzjE323VGSHDJnev4,51624
30
32
  spacr/io.py,sha256=IoERqSwoxJrInYl-E0WfwFOEDZXFdJofk5DmpbyLGWM,112077
31
33
  spacr/logger.py,sha256=7Zqr3TuuOQLWT32gYr2q1qvv7x0a2JhLANmZcnBXAW8,670
32
34
  spacr/make_masks_app.py,sha256=iGaTwhowoe2JMOSOf8bJwQZTooRhLQx7KO0ewnAmqDY,45138
@@ -36,8 +38,8 @@ spacr/measure.py,sha256=r5nxxULUyka2L5IVdnmEmnMywChY3a4DWGse3ygIh4Q,56000
36
38
  spacr/measure_app.py,sha256=_C1-XFL5HSquUEEbM_NcxdvHx-socPFCx85MBG4d6xo,10598
37
39
  spacr/old_code.py,sha256=jw67DAGoLBd7mWofVzRJSEmCI1Qrff26zIo65SEkV00,13817
38
40
  spacr/plot.py,sha256=lrwU51OTWfby1wx73XGyjYmTjLVia7WOmGH5LZZ-4jM,67145
39
- spacr/sequencing.py,sha256=U_TBJGNfOBfokGegUe950W_KPfm51VOgpfibXoZ8RMQ,83974
40
- spacr/settings.py,sha256=ElHlNBNqvjtHFD7WC-QqKqXjMeosKXqJKnjeRX0mHVo,21456
41
+ spacr/sequencing.py,sha256=fHZRnoMSxmhMdadkei3lUeBdckqFyptWdQyWsDW3aaU,83304
42
+ spacr/settings.py,sha256=1tcgdn4RWbX7_Qto0nHDP_f202sT7d_9-UU_W-q8cPc,45639
41
43
  spacr/sim.py,sha256=FveaVgBi3eypO2oVB5Dx-v0CC1Ny7UPfXkJiiRRodAk,71212
42
44
  spacr/sim_app.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
45
  spacr/timelapse.py,sha256=KMYCgHzf9LTZe-lWl5mvH2EjbKRE6OhpwdY13wEumGc,39504
@@ -46,9 +48,9 @@ spacr/version.py,sha256=axH5tnGwtgSnJHb5IDhiu4Zjk5GhLyAEDRe-rnaoFOA,409
46
48
  spacr/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model,sha256=z8BbHWZPRnE9D_BHO0fBREE85c1vkltDs-incs2ytXQ,26566572
47
49
  spacr/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model_settings.csv,sha256=fBAGuL_B8ERVdVizO3BHozTDSbZUh1yFzsYK3wkQN68,420
48
50
  spacr/models/cp/toxo_pv_lumen.CP_model,sha256=2y_CindYhmTvVwBH39SNILF3rI3x9SsRn6qrMxHy3l0,26562451
49
- spacr-0.1.50.dist-info/LICENSE,sha256=SR-2MeGc6SCM1UORJYyarSWY_A-JaOMFDj7ReSs9tRM,1083
50
- spacr-0.1.50.dist-info/METADATA,sha256=5AUx1Qr2W-JmYcI3gGVkgO96mPAG01o8qj8_Mjlh6ho,5050
51
- spacr-0.1.50.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
52
- spacr-0.1.50.dist-info/entry_points.txt,sha256=BMC0ql9aNNpv8lUZ8sgDLQMsqaVnX5L535gEhKUP5ho,296
53
- spacr-0.1.50.dist-info/top_level.txt,sha256=GJPU8FgwRXGzKeut6JopsSRY2R8T3i9lDgya42tLInY,6
54
- spacr-0.1.50.dist-info/RECORD,,
51
+ spacr-0.1.55.dist-info/LICENSE,sha256=SR-2MeGc6SCM1UORJYyarSWY_A-JaOMFDj7ReSs9tRM,1083
52
+ spacr-0.1.55.dist-info/METADATA,sha256=uTrkXO1JPmHgXWuuZJzsd8LQCWkoY0qrIBfkMGymzQE,5050
53
+ spacr-0.1.55.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
54
+ spacr-0.1.55.dist-info/entry_points.txt,sha256=BMC0ql9aNNpv8lUZ8sgDLQMsqaVnX5L535gEhKUP5ho,296
55
+ spacr-0.1.55.dist-info/top_level.txt,sha256=GJPU8FgwRXGzKeut6JopsSRY2R8T3i9lDgya42tLInY,6
56
+ spacr-0.1.55.dist-info/RECORD,,
File without changes