Update for Running Cutadapt

process CUTADAPT { publishDir “results/” , mode: “copy”

output: path ’trimmed.fastq’ script: """ cutadapt -a AACCGGTT -o trimmed.fastq ~/sample1.fastq “”"}

workflow {

CUTADAPT()

}

We can keep ‘results’ as our publishDir for this example, but we’ll need to change our output to trimmed.fastq and we’ll change the command for cutadapt with our adapter and our input and output file names. Because Nextflow executes each task in its own work directory, we need to provide the full path. Our workflow just becomes running the CUTADAPT process. Does this work? Yes, it does. However, but we are hard-coding everything and this not really flexible and does not really allow us to scale.

Previous
Next
RC Logo RC Logo © 2026 The Rector and Visitors of the University of Virginia