Output file names are not known beforehand I have a folder where the hdf5 files inputs are (matrices of scRNAseq raw UMI counts). There is a python script that loads them, splits them into multiple matrices, normalizes them, and saves as csv files. When the name pattern of the output files is known, things are easy, I know how to do that, but when one input (hdf5 file) can produce various number of outputs (csv files) I am not sure how to approach the issue. Currently my Snakemake file relevant part looks the following way:

hdf5_files,=glob_wildcards('/main/{hdf5_file}.hdf5') 

rule all:
  input:
---&gt;  expand('data_files/normalized/{hdf5_file}.csv', hdf5_file=hdf5_files)
    ...

rule normalization:
  input:
     script = 'python/normalize.py',
     path = '/main/{hdf5_file}.hdf5'
  output:
---&gt;  path = 'data_files/normalized/{hdf5_file}.csv'
  shell:
     "python {input.script} -data {input.path} -path {output.path}"


Above I highlighted the 2 lines that I am not sure now how I should write. Any suggestions would be greatly appreciated.
Could you give an example of names of input files and output files of normalize.py ?

It seems to me that your case could be similar to the one described about the dynamic output:

https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#dynamic-files

Here you would probably use it for the output of normalization and for the input of all (with a wildcard different from hdf5_file).

Disclaimer: I haven't had the opportunity to use this feature so far.