Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save atarkowska/634cf6b0f34e3ab8c115a2233ce740a1 to your computer and use it in GitHub Desktop.
Save atarkowska/634cf6b0f34e3ab8c115a2233ce740a1 to your computer and use it in GitHub Desktop.
/*
* stitching
*/
process coordinates {
input:
file input_dir
val row from ch_non_clusters.mix(ch_clusters).splitCsv(header: true, sep:'\t' )
output:
tuple val(cluster), base_name, coordinates_dir into ch_stitching_dataset
shell:
cluster = sections > 1 ? ${row.cluster} : 0
file coordinates_dir = sections > 1 ? "${base_name}/${row.cluster}/params" : "${base_name}/params"
'''
some script goes here
'''
}
process image_stitching {
input:
file input_dir
tuple val(cluster), base_name, file(coordinates_dir) from ch_stitching_dataset
output:
file stitched_tif into ch_stitched_tif
shell:
tifname = sections > 1 ? "${base_name}_${row.cluster}.tif" : "${base_name}.tif"
stitched_tif = "$base_name/$tifname"
fovs = sections > 1 ? "--fovs \"${row.fov}\" " : ""
'''
!{baseDir}/bin/scripts/convert2opencv.py -i !{coordinates_dir}/FieldTables.json -o !{coordinates_dir}
opencv-stitcher --input !{input_dir} ...
'''
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment