Skip to content

extract few files from output channel which names match a string #2010

@zillurbmb51

Description

@zillurbmb51

Hi, I have a process that generates multiple output. I need few files in one of the subsequent processes.

output:
tuple val(chrom), path("chr${chrom}*.{bed,bim,fam}") into qc1_chr

from qc1_chr I need some files which names match a string (say, qc1_chr has 200 files, and only 22 file names have a string 'step10').
I tried with 'filter' operator but failed.
qc1_chr.filter(~/*step10*/) into qc2 But it does not work.
How could I extract those files into a new channel? Thanks in advance. Best, Zillur

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions