Reputation: 437
I have this processes:
#!/usr/bin/env nextflow
params.queries = ""
params.db = ""
queries = Channel.fromPath(params.queries)
queries.into { queries_psiblast; queries_pssm }
db = file(params.db)
process PsiBlast {
input:
file query from queries_psiblast
output:
file top_hits
"""
psiblast -db $db -query $query -out top_hits
"""
}
process ParsePsiBlastOut {
input:
file top_hits
output:
file top_hits2
"""
python3 psi_blast_output_to_fasta_next.py $top_hits
"""
}
I have a problem with the second process, Nextflow doesn't find my python script.
Here is my directory (I'm not in HOME, I'm in project/ . So it's not my "bin" in HOME):
bin/ pipeline_amont.nf
My python script is in bin, like the Nextflow doc says.
But Nextflow seems to search it in work.
How can I say to Nextflow to look for the script in bin?
Upvotes: 2
Views: 1356
Reputation: 3381
Nextflow automatically adds the project bin directory to the task $PATH
, therefore you need to invoke your script as a command without specifying the python interpreter i.e.
psi_blast_output_to_fasta_next.py
instead of
python3 psi_blast_output_to_fasta_next.py
Upvotes: 3