snakemake: передача списка всех файлов директории в input

Сразу прошу прощения за уровень вопроса, я новичок. Пытаюсь освоить snakemake и, заодно, click. Подскажите, пожалуйста, на данном примере, как можно передать в импорт все файлы в директории и направить этот список в python скрипт?

Snakemake:

path_1 = 'data/raw/data2process/'
path_2 = 'data/raw/table.xlsx'
    rule:
        input:
             list_of_pathes = "list of all pathes to .xlsx/.csv/.xls files from path_1"
             other_table = path_2
        output:
             {some .xlsx file}
        shell:
             "script_1.py {input.list_of_pathes} {output}"
             "script_2.py {input.other_table} {output}"

script_1.py:

@click.command()
@click.argument(input_list_of_pathes, type=*??*)
@click.argument("out_path",  type=click.Path())
def foo(input_list_of_pathes: list, out_path: str):
    df = pd.DataFrame()
    for path in input_list_of_pathes:
        table = pd.read_excel(path)
        **do smthng**
        df = pd.concat([df, table])
    df.to_excel(out_path)

script_2.py:

@click.command()
@click.argument("input_path", type=type=click.Path(exist=True))
@click.argument("output_path",  type=click.Path())
def foo_1(input_path: str, output_path: str):
    table = pd.read_excel(input_path)
    **do smthng**
    table.to_excel(output_path)

Ответы (0 шт):