-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnextflow.config
More file actions
102 lines (93 loc) · 4.78 KB
/
nextflow.config
File metadata and controls
102 lines (93 loc) · 4.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
includeConfig "config/utils.config"
// Defaults
// singularity_path is set in config/utils.config to ensure it exists before profiles are loaded
params.max_cpus = (params.max_cpus ?: 24) as Integer
params.max_memory = (params.max_memory ?: '64 GB')
params.max_time = (params.max_time ?: '48 h')
// Scalar-only clamps (avoid Map returns)
def clampCpu = { v -> Math.min((v as Integer), (params.max_cpus as Integer)) }
def clampMem = { v ->
def want = nextflow.util.MemoryUnit.of(v.toString())
def cap = nextflow.util.MemoryUnit.of(params.max_memory.toString())
want < cap ? want : cap
}
def clampTime = { v ->
def want = nextflow.util.Duration.of(v.toString())
def cap = nextflow.util.Duration.of(params.max_time.toString())
want < cap ? want : cap
}
params {
input_dir = "" // Base path to input images
output_dir = "" // Base path to output location
file_type = "moldev" // "moldev" or "zeiss" microscope?
use_2d = false // 2d image processing, instead of 3d
simulate = false // Simulate the microscopy data (note: use_2d will be set to true)
num_simulations = 2 // Number of samples to simulate
test_image_count = 0 // The number of random images to use for spot check. If 0, then all images used
test_image_names = null // Select >=1 image to assess via spot check (comma-delimited list of file base names, e.g., "2024_04_17_Baseline-01(1)")
llm = "gpt-4o-mini" // OpenAI LLM for log summarization ("gpt-4o-mini" or "gpt-4o")
decay_time = 0.5 // The average decay time of a transient
gSig = 6 // The expected half size of neurons (height, width)
rf = 40 // The size of patches for the correlation image
min_SNR = 3 // Adaptive threshold for transient size
r_values_min = 0.85 // Threshold for spatial consistency
tsub = 2 // Downsampling factor in time
ssub = 2 // Downsampling factor in space
p_th = 0.75 // Threshold percentile for image processing
min_corr = 0.8 // Min peak value from correlation image
min_pnr = 5 // Min peak to noise ration from PNR image
ring_size_factor = 1.4 // Radius of ring is gSig*ring_size_factor
f_baseline_perc = 8 // Percentile value for the filter when converting fluorescence data to delta F/F
win_sz = 500 // Window size for the percentile filter (calc_dff_f0 step)
min_clusters = 2 // Minimum number of clusters for the clustering step
max_clusters = 10 // Maximum number of clusters for the clustering step
size_threshold = 20000 // Size threshold for filtering out noise events.
percentage_threshold = 0.2 // Percentage threshold for FWHM calculation.
zscore_threshold = 3 // Z-score threshold for filtering out noise events.
min_object_size = 500 // Minimum size of objects in pixels for successful segmentation
max_segment_retries = 3 // Maximum number of retries for segmentation if objects are below the threshold
start_diameter = 300 // Starting diameter for mask segmentation step
diameter_step = 200 // Step to increase the diameter after each failed attempt
}
//-- Extra configs --//
includeConfig "config/process.config"
includeConfig "config/profiles.config"
// Add singularity configuration
singularity {
enabled = true
autoMounts = true
cacheDir = '/large_storage/multiomics/public/singularity/cache'
}
//-- Functions --//
// Remove trailing forward slashes in a string
def fmtPath(path_str) {
return path_str.replaceAll(/\/+$/, '')
}
// Limit to the max resources of the available machine
def check_max(obj, type){
if(type == 'memory'){
if(obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1){
return params.max_memory as nextflow.util.MemoryUnit
}
} else if(type == 'time'){
if (obj.compareTo(params.max_time as nextflow.util.Duration) == 1){
return params.max_time as nextflow.util.Duration
}
} else if(type == 'cpus'){
if (obj > params.max_cpus as int){
return params.max_cpus as int
}
}
return obj
}
def getWorkDir() {
def userGroup = "id -gn".execute().text.trim()
def userName = "whoami".execute().text.trim()
def workDir = "/scratch/$userGroup/$userName/nextflow-work/lizard-wizard"
return workDir
}
def getCondaCacheDir() {
def userName = "whoami".execute().text.trim()
cacheDir = "/home/$userName/nextflow/conda-cache/lizard-wizard"
return cacheDir
}