@@ -28,25 +28,31 @@ workflow {
2828 counts = sample_metadata. counts. toSortedList(). flatten(). view()
2929
3030 // Gap Filling with MindaGap
31- gap_filling(samples, dapi)
32-
33- filled_images = gap_filling. out. gap_filled_image
34- .toSortedList(compare_file_names). flatten(). view()
31+ if (params. fill_gaps == true ){
32+ gap_filling(samples, dapi)
33+ images = gap_filling. out. gap_filled_image
34+ .toSortedList(compare_file_names). flatten(). view()
35+ } else {
36+ images = dapi
37+ }
3538
3639 // Deduplicate transcripts with MindaGap
37- deduplicating(samples, counts, params. tile_size, params. window_size, \
38- params. max_freq, params. min_mode)
39-
40- clean_transcripts = deduplicating. out. deduplicated_transcripts
41- .toSortedList(compare_file_names). flatten(). view()
40+ if (params. deduplicate == true ){
41+ deduplicating(samples, counts, params. tile_size, params. window_size, \
42+ params. max_freq, params. min_mode)
43+ transcripts = deduplicating. out. deduplicated_transcripts
44+ .toSortedList(compare_file_names). flatten(). view()
45+ } else {
46+ transcripts = counts
47+ }
4248
4349 // Cell Segmentation
4450 if (params. segmentation_tool == " cellpose" ){
4551 segmentation = cellpose_segmentation(sample_metadata. sample, \
4652 params. model_name, params. probability_threshold, \
47- params. cell_diameter, filled_images )
53+ params. cell_diameter, images )
4854 }else if (params. segmentation_tool == " mesmer" ) {
49- segmentation = mesmer_segmentation(sample_metadata. sample, filled_images , \
55+ segmentation = mesmer_segmentation(sample_metadata. sample, images , \
5056 params. maxima_threshold, params. maxima_smooth, params. interior_threshold, \
5157 params. interior_smooth, params. small_objects_threshold, \
5258 params. fill_holes_threshold, params. radius)
@@ -64,7 +70,7 @@ workflow {
6470 }
6571
6672 // Single Cell Data Extraction
67- sc_data_extraction(samples, cell_masks, clean_transcripts )
73+ sc_data_extraction(samples, cell_masks, transcripts )
6874 single_cell_data = sc_data_extraction. out. sc_data
6975 .toSortedList(compare_file_names). flatten(). view()
7076}
0 commit comments