Hello! I’m trying to run an R script via a docker container using a very simple nextflow process, but keep coming up against this error:
I think there’s an issue with how the folders are mounted into the container, as I can run the docker interactively within the nextflow work dir and it runs correctly.
Any help would be amazing!
Error:
Command executed:
Rscript /app/R_extraction.R --base_dir processed_audio --window 40 --output_dir .
Command exit status:
1
Command output:
(empty)
Command error:
Error: unexpected input in “”
Execution halted
*Work dir:
/mnt/c/holly/nextflowdev/work/94/5dd9c5805bb0a91f17177e8cc00ed4
this is my main.nf:
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
params.input = ‘/mnt/c/holly/nextflowdev/test_files’
params.outdir = ‘/mnt/c/holly/nextflowdev/processed_audio’
workflow {
// wrap folder as a single path object
input_ch = Channel.of(file(params.input))
preproc_ch = PREPROCESS_AUDIO(input_ch)
EXTRACT_R_FEATURES(preproc_ch)
}
process PREPROCESS_AUDIO {
container 'speak_proj/audio-preprocessing:latest'
publishDir "${params.outdir}", mode: 'copy'
input:
path audio_files
output:
path "processed_audio"
script:
"""
mkdir -p processed_audio
python3 /app/py_preprocessing.py --input ${audio_files} --outdir processed_audio
"""
}
process EXTRACT_R_FEATURES {
container 'speak_proj/r-extraction:latest'
publishDir "${params.outdir}/R_features", mode: 'copy'
input:
path processed_audio
output:
path "R_extracted_features.csv"
path "extracted_features.Rdata"
path "features"
script:
"""
Rscript /app/R_extraction.R --base_dir ${processed_audio} --window 40 --output_dir .
"""
}