Skip to content

How to create an "output table" when batch processing multiple images #11

@tischi

Description

@tischi

Hi,

Let's say I have a folder with images:

images
  A.tif
  B.tif
  C.tif

And I use Nextflow to batch run CellPose on it and it creates a new folder with segmentations such that I now have

images
  A.tif
  B.tif
  C.tif
segmentations
  A_seg.tif
  B_seg.tif
  C_seg.tif

What I would like to have as an additional output is the following mobie-collection.csv table (specifically for convenient visualisation of the results as a MoBIE collection table but I think something like this is also useful in general):

datasetID uri type
A images/A.tif intensities
B images/B.tif intensities
C images/C.tif intensities
A segmentations/A.tif labels
B segmentations/B.tif labels
C segmentations/C.tif labels

Such that in total I would have:

mobie-collection.csv
images
  A.tif
  B.tif
  C.tif
segmentations
  A_seg.tif
  B_seg.tif
  C_seg.tif

Do you have suggestions regarding the best (most generic way) to achieve this?

I guess one could add another CREATE_OUTPUT_TABLE module at the end of the workflow?

Do you think there are better practices of achieving something similar?

Related to this I am also wondering whether the input could / should already by a table?

| datasetID | uri  | type |
| -------- | ------- | -------- |
| A | images/A.tif  | intensities |
| B | images/B.tif  | intensities |
| C | images/C.tif | intensities |

If so, how to create this input table? I guess that would be a step outside / prior to the actual Nextflow workflow?

ping @krokicki @BioinfoTongLI @jluethi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions