How to get the PATH from working directory #5333
-
Hello. I'm very new to nextflow and I'm trying to translate a very very long bash pipeline into nextflow.
My problem is that in the process fastaDatabase, the python script is not able to find the genbank files because it accepts a directory and not a string of file names. I don't know how can I get the PATH for those files as gffPath = unzipFiles.out.gffFiles.getParent() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @mudymudy , I think the best way would be to pass the process fastaDatabase {
input:
path gffFiles, stageAs: 'gff/*'
// ...
script:
"""
parsing_and_contatenating.py gff
"""
}
workflow {
// ...
fastaDatabase(unzipFiles.out.gffFiles)
} If you put your scripts in the By the way, if you ever have questions like this you can also go to https://community.seqera.io/, there are a lot more people who can help you there. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much Ben. It worked perfectly!!! It's just what I wanted. |
Beta Was this translation helpful? Give feedback.
Hi @mudymudy , I think the best way would be to pass the
gffFiles
directly into thefastaDatabase
and use thestageAs
option to stage them as a directory:If you put your scripts in the
bin
directory instead ofscripts
, make the script executable, and add a shebang to the top of the python script, you can call the python script directly as shown above (docs).By the way, if you ever have questions like this you can also go to https://community.seqera.io/, there are a lot more people who can …