Nextflow community chat moved to Slack! https://www.nextflow.io/blog/2022/nextflow-is-moving-to-slack.html
pditommaso on master
Add requirements for container … (compare)
jordeu on fusion-no-entry
Fix Spack failing test Signed-… Fix GH action tests step [ci fa… Fusion config improvement [ci f… and 4 more (compare)
jordeu on fusion-no-entry
Change fusion path to /usr/bin/… (compare)
pditommaso on master
Bump Fusion 0.7.1 [ci fast] Si… (compare)
*.fastq
expected by process merge_nextseq_lanes
when calling a script that renames files in place. There are many .fastq files in the working directory but it cannot find any?
into
.
I found the need to introduce extra channel names a little bit annoying
fastq_pairs = Channel
.fromFilePairs('/cb/boostershot-basic/Data/Intensities/BaseCalls/CBTEST_Project_0091/*_L00[1-4]_R[1-2]_001.fastq'), size: -1)
fromPath
and fromFilePairs
are channel factory methods; they are channel 'sources', you can't use them as connectors. But you can create file pairs yourself -- the following is not a great example, but it does end up with a process spitting out a pair of files -- https://github.com/cellgeni/rnaseq/blob/master/main.nf#L295 . I would try to make a small example using toy files emulating what you want to achieve.
I am using Nextflow version 19.05.0-edge build 5097
I want execute process X four time. However, the process only executed once.
Could someone explain what I did wrong? thanks.
```
nextflow.preview.dsl=2
aaa = Channel.from([[9],[1],[7],[5]])
process X{
input:
val b
script:
"""
echo ${b} > hello.txt
"""
}
X(aaa)
executor > local (4)
[43/9ff7f3] process > X (1) [100%] 4 of 4 ✔
#!/bin/bash
set -euo pipefail
nfversion=19.05.0-edge
NXF_VER=$nfversion nextflow run - <<EOC
nextflow.preview.dsl=2
aaa = Channel.from([[9],[1],[7],[5]])
process X {
input: val b
script: "echo \${b} > hello.txt"
}
X(aaa)
EOC
same here (pleasant to see that nextflow run - <<EOC
works!)
@madkinsz I believe you're searching for this:
Channel.fromFilePairs("${params.infolder}/*.fastq.gz",size:-1) {file -> file.name.split(/_S\d+_L/)[0]}
.ifEmpty {error "File ${params.infolder} not parsed properly"}
.set { ch_fastqgz }
process mergefastq {
tag ${sample}
input:
set val(sample), file (fastqfiles) from ch_fastqgz
"""
ls ${sample}_S*_R1_*.fastq.gz | xargs zcat > ${sample}.R1.fastq
ls ${sample}_S*_R2_*.fastq.gz | xargs zcat > ${sample}.R2.fastq
"""
}
channel ch_fastqgz
contains something like this:
[ [sample1 , [sample1_S001_L001_R1_0001.fastq.gz , sample1_S001_L001_R2_0001.fastq.gz ]] ,
[sample2, [sample2_S001_L001_R1_0001.fastq.gz , sample2_S001_L001_R2_0001.fastq.gz] ]]
fastq_pairs.filter{ it =~ /_R1_/ }.tap{fastq_R1only}