Skip to content

Instantly share code, notes, and snippets.

@lindenb
Last active April 18, 2019 15:28
Show Gist options
  • Save lindenb/8213684e5a90a3c7589de0b7ea057b90 to your computer and use it in GitHub Desktop.
Save lindenb/8213684e5a90a3c7589de0b7ea057b90 to your computer and use it in GitHub Desktop.
biostar 375624 https://www.biostars.org/p/375624/ "How to merge multiple fastq file using table?" nextflow fastq
process mergeFastq {
tag "merging ${sample}"
input:
set sample,fastqs from Channel.fromPath(params.input).splitCsv(header:false,sep:'\t',skip:1).groupTuple(by:0)
output:
file("${sample}.fastq")
script:
"""
cat ${fastqs.collect{ params.basedir+"/"+it+".fastq "}.join(" ")} > ${sample}.fastq
"""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment