I am trying to download using my custom python script located in a location and output to a directory of my choice. However, I encountered
ERROR ~ Cannot read write-only property: from.
I have tried multiple ways to tell nextflow, here is my input script and I want the output of that script in my desired folder.
When I comment out input and output, it runs fine. And my python script runs and downloads fine in a terminal.
Any help or suggestion in appreciated. Thanks.
Here is my code.
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
// Pipeline parameters
params.uri_file = "./data/zinc/zn_test_uri.uri"
params.output_dir = "./data/zinc/test_fold/"
// Channel for the URI file
uri_channel = Channel.fromPath(params.uri_file)
// Process to download PDBQT files from given URLs
process znDownload {
input:
path uri_file from uri_channel
output:
path "${params.output_dir}/*" into separated_files
script:
"""
python3 ./scripts/zinc_download_pdbqt_from_url.py --uri_file ${uri_file} --output_dir ${params.output_dir}
"""
}
// Workflow
workflow {
znDownload()
separated_files.view()
}