carpentries-incubator / workflows-nextflow

Workflow management with Nextflow and nf-core
https://carpentries-incubator.github.io/workflows-nextflow/
Other
19 stars 29 forks source link

Filter exercise tries to divide a string by an integer #15

Closed tomsing1 closed 3 years ago

tomsing1 commented 3 years ago

Executing the solution for the "Filter a channel exercise" raises an error because the strings X and Y cannot be used for division.

chr_ch = channel
 .of( 1..22, 'X', 'Y' )
 .filter({ it %2 == 0 })
 .view()

returns

2
4
6
8
10
12
14
16
18
20
22
Unknown method invocation `mod` on String type