Created
March 6, 2020 11:06
-
-
Save atarkowska/634cf6b0f34e3ab8c115a2233ce740a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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