Currently I have a working nf-core pipeline that does some basic things on fastq files. The way it works is that data that can come from three different instruments, each one with a different sample sheet, and I have an R script that validates the instrument-specific samplesheet, and from it creates an nf-core friendly sample sheet that would go into the pipeline.
Right now I run the validation/sample sheet creation R program and then the pipeline, but I am exploring integrating the R script into the pipeline. However, this means that the nf-core pipeline would need to be able to receive three different kinds of sample sheets. Is it possible to do that?
Yes, you just need to invoke the nf-validation fromSamplesheet the number of times you need (and have of course an associated JSON schema), if you want to do it the nf-core way.
An example of this is nf-core/taxprofiler. We have one samplesheet for samples (fastqs and their metadata) and another for databases (database files and their metadata).
We are also working very hard to get nf-schema in the nf-core template which would make this even easier. You can use the new samplesheetToList function there to create a list of each samplesheet. You can then pass these lists to Channel.fromList() to create a channel from these lists. One nice extra feature is that you can pass the samplesheet schema to samplesheetToList which would make it even possible to use a different JSON schema for each type of samplesheet.
@jfy133 , I am looking at the code. Sorry, I am relatively new at nf-core, have made several pipelines now but I am not as superfamiliar with the various parts. Basically, the steps would be:
Create the two sample sheet schemas (in the taxprofiler case schema_database.json and schema_input.json
I could just use a bit more direction!! I don’t understand where you say “you just need to invoke the nf-validation fromSamplesheet the number of times you need”???
@nvnieuwk , do you have an example of using the samplesheeToList function?
And then is received as in the link you gave above :), where we do a little bit more of clean up after the validation (mostly converting various things to nf-core syntax).
I hope that’s slightly more useful this time!
Note that @nvnieuwk 's newer plugin is more powerful but not yet implemented within nf-core (I’m referring to the older version of the plugin)