Skip to content

Instantly share code, notes, and snippets.

@k-hench
Created August 29, 2018 15:44
Show Gist options
  • Save k-hench/e845cee8dc9a8e9fdd0d11c840abb9d7 to your computer and use it in GitHub Desktop.
Save k-hench/e845cee8dc9a8e9fdd0d11c840abb9d7 to your computer and use it in GitHub Desktop.
params.index = 'testfile2.txt'
Channel
.fromPath(params.index)
.splitCsv(header:true, sep:"\t")
.map{ row-> tuple(row.head1, row.head2, row.head4) }
.into { samples_ch }
process transform {
input:
set head1, head2 from samples_ch
output:
set val { head1 - ~/\.(\d+)/ }, val( head1 ) into transformed
script:
"""
"""
}
transformed
.groupTuple()
.set {tubbled}
process receive_tuple {
echo true
input:
set trans, org from tubbled
script:
"""
echo " ------------ "
echo ${trans}
echo ${org} | sed 's/\\[/-I /g; s/\\]//g; s/,/ -I/g'
"""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment