dear microscopy people, I've made a nf-core compat...
# microscopy
t
dear microscopy people, I've made a nf-core compatible
subworkflow
which uses several modules for tiled segmentation. which can be found here: https://github.com/BioinfoTongLI/modules/blob/develop/subworkflows/sanger/tiled_segmentation/main.nf I wonder what is best practice to built the subworkflow from
nextflow
perspective. Is it better to
include all modules into one subworkflow
as it currently is OR construct
one subworkflow per method
? i.e. 4 subworkflows in total in my case? PS:Please ignore the module names etc. I will push them to the main stream soon to make sure all is in
nf-core
f
Hey @Tong LI , That's a really good question. I think both are valid approaches but personally I prefer the one that you have in your repo right now. The approach of having these different segmentation methods within that one subworkflow group them thematically in the "tiled segmentation" way of segmentation. Putting each in their own subworkflow in my opinion would just create more complexity that is easily solved via
if ... else
statements in your subworkflow.
t
Hi @Florian Wuennemann, thanks for the comments! I will try to push this version to the main stream then. I've actually got another questions regarding test data. For the segmentation modules, they are using the one in
test-datasets
repo. But for merging the polygons. I don't think there are any
wkt
or
geojson
files yet. Am I right?
f
If they aren't in this folder, i highly doubt these file types exist yet in test-datasets. Feel free to make a PR to add them! https://github.com/nf-core/test-datasets/tree/modules/data/imaging
👍 1
t
also a small technical detail. I heard that nextlfow now support
switch ... case
. is that preferred compared to
if ... else
?
b
The strict syntax doesn't support switch/case, so you should use if/else for now. I might try to add pattern matching later on
🙏 2
p
I'd recommend checking out the latest podcast, this is one of the things we discussed 🙂 (can find it in the transcript if you like)
👀 1
t
thanks!