Skip to content

Use a group of multiple paired files as input #5592

Answered by bentsherman
zihhuafang asked this question in Q&A
Discussion options

You must be logged in to vote

When you do the groupTuple, it is creating a list of lists for the reads. So you need to flatten the reads after the groupTuple:

    Channel.fromPath(params.sample_csv)
        .splitCsv(header: true, sep: ',')
        .map { row ->
            def meta = [id: row.sample_id]
            [meta, [file(row.fq1), file(row.fq2)]]
        }
        .groupTuple()
        .map { meta, reads -> [ meta, reads.flatten() ] }
        .view()

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zihhuafang
Comment options

Answer selected by zihhuafang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants