I'm trying to create a Nextflow script that maps assemblies to reference gene sequences. This is what I have so far:
#!/usr/bin/env nexflow
nextflow.enable.dsl = 1
params.assmblreads = '/Users/rimo/Desktop/Assemblies/Assemblies_Flye/flye_assembly.fasta'
params.assmblref = '/Users/rimo/Desktop/Assemblies/gene_targets/GENE.fsa'
refgenome_file = file(params.assmblref)
fasta_files = Channel.fromPath(params.assmblreads)
.map { file -> tuple(file.baseName, file) }
process minimapping {
input:
file genome from refgenome_file
set val(readID), file(readFile) from fasta_files
output:
set val(readID), file("${readID}.paf") into mapped_reads
script:
"""
./minimap2 $readFile $genome > ${readID}.paf
"""
}
I'm running this on a macOS so I have to include the "./" before a command or it will give the error: command not found"
But everytime I run the script with the command: ./nextflow run trials.nf
it results in this error message:
(base) rimo@Ritas-MBP minimap2 % ./nextflow run ../attempt_out.nf
N E X T F L O W ~ version 22.10.0
Launching `../attempt_out.nf` [nasty_baekeland] DSL1 - revision: 98d1deaebd
executor > local (1)
[ae/47e3c0] process > minimapping (1) [ 0%] 0 of 1
Error executing process > 'minimapping (1)'
Caused by:
executor > local (1)
[ae/47e3c0] process > minimapping (1) [100%] 1 of 1, failed: 1 ✘
Error executing process > 'minimapping (1)'
Caused by:
Process `minimapping (1)` terminated with an error exit status (1)
Command executed:
./minimap2 flye_assembly.fasta GENE.fsa > flye_assembly.paf
Command exit status:
1
Command output:
(empty)
Command error:
.command.sh: line 2: ./minimap2: No such file or directory
Work dir:
/Users/rimo/Desktop/AWS/minimap2/work/ae/47e3c0708f33b1949315fc83066b95
Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`
This is my first time ever writing a Nextflow script so I'm very new and confused to this new way of scripting. If someone could help me out that would be great!