path to image files
suggest removing setwd() from all functions and replacing it with an alternative
@param img_path
(create the "crops" folder within the function, or have the user specify it? I think this one is probably ok in the function, but not 100% sure)
next e.g. list_files <- files.list(img_path) output_location <- paste0(img_path, "/","crops") OR get user to specify location
for-loop over "list_files" as per function currently (or lappy?) autocropping/counting_foci stuff output to output_location
hope this makes sense.
PS I also think that count_foci should work on any folder (e.g. the crops folder) and not be "hardwired" to have to be used on pachytene folders. This may be possible with settings already, but I haven't understood how.