genepi / nf-gwas

A nextflow pipeline to perform state-of-the-art genome-wide association studies.
https://genepi.github.io/nf-gwas
MIT License
63 stars 21 forks source link

some Nextflow help to change "genotypes_prediction" param to 3 separate paths #100

Closed linminhtoo closed 9 months ago

linminhtoo commented 9 months ago

Hi again,

I am having some trouble specifying the genotypes_prediction parameter on AWS. The problem is that it expects 3 files together as a pattern, e.g. "example.{bim,bed,fam}" but AWS S3 doesn't recognise this format of paths and my run is failing on AWS because of it.

To solve this problem, I'd like to create 3 separate input params: genotypes_prediction_bim, genotypes_prediction_bed and genotypes_prediction_fam. This way, I can just provide the absolute path to all 3 files without patterns and it will work on any platform.

I understand this involves changing the fromFilePairs channel into 3 separate fromPaths channels, but I'm having trouble on how I could structure the Nextflow code such that it will give the same channel output as fromFilePairs, which I believe is something like [filename, [path_bim, path_bed, path_fam]] I have never coded in Nextflow before, so apologies if this is too simple a problem

Any assistance would be greatly appreciated! Thank you so much