Note
THIS REPOSITORY IS A SUBSET OF THE nf-core/modules REPOSITORY
Warning
UNDER DEVELOPEMENT
A repository for hosting curated Nextflow DSL2 subworkflow files and their associated documentation, and class description files.
The usual nf-core/tools can be used by specifying the appropriate repository.
nf-core modules --git-remote https://github.com/mirpedrol/class-modules.git <YOUR COMMAND>A class is a way of grouping Nextflow DSL2 modules. All tools which share the same purpose (can be used to perform the same task) and share the same inputs and outputs, belong to the same class.
Essentially, a class is defined through a YAML file specifying the inputs and outputs of that class and some keywords, used to determine the purpose of that class. You can see examples of classes in the classes directory. It also contains the list of all nf-core/modules which belong to the class.
The basic structure of a class YAML file is the following:
# yaml-language-server: $schema=https://raw.githubusercontent.com/mirpedrol/class-modules/main/classes/class-schema.json
name: "myclass"
description: perform the task of this class
keywords:
- task
- topic
- field
input:
- - meta:
type: map
description: Groovy Map containing sample information
- input1:
type: file
description: Input file for this class in FASTA format as an example
pattern: "*.{fa,fasta}"
ontologies:
- edam: http://edamontology.org/format_1929
output:
- channel1:
- meta:
type: map
description: Groovy Map containing sample information
- "*.txt"
type: file
description: The output file in TXT format of this class
pattern: "*.txt"
components:
modules:
- tool/subtool
- tool2
testdata:
- - "[ id:'test' ]"
- "file(params.modules_testdata_base_path + 'genomics/eukaryotes/my_organism/testfile.fa', checkIfExists: true)"The components section of the class YAML file can be edited to add new nf-core/modules to a class.
This information will then be used to update the existing class subworkflow,
or to generate a new class subworkflow.
The testdata section specifyes the datasets that will be used to test the class subworkflow with nf-test.
It should have the same structure as the input channel(s).
When a subworkflow is created with nf-class nf-class subworkflows expand-class, nf-test are craeted, generating a main.nf.test file.
The snapshots are not generated, since the subworkflow needs to be installed into a pipeline, with all the corresponding modules, and run in order to generate the snapshot.
To ease the snapshot generation process, the GHA which runs the tests will generate the snapshots the first time it's run (or update them if they exist).
These snapshots are uploaded as an artifact, and can be downloaded to copy then to the working branch, and pushed to the PR.