carpentries-incubator / workflows-nextflow

Workflow management with Nextflow and nf-core
https://carpentries-incubator.github.io/workflows-nextflow/
Other
21 stars 34 forks source link

Replace ansible installation files with training files, and lint. #41

Closed mahesh-panchal closed 2 years ago

mahesh-panchal commented 2 years ago

Replace Ansible installation files with files for exercises.

File names have been spellchecked (1 correction) Files have been linted for spacing to the best of my ability.

Channel assignments have been moved inside workflow declarations (they become globally accessible otherwise).

channel -> Channel for consistency.

I notice some other things too which I think need to be addressed in another revision. Workflow parameters should generally not be accessed inside the script scope, but passed as input parameters for proper checkpointing purposes. e.g. in process_conditional.nf:

    script:
    if( params.aligner == 'kallisto' ) {
        """
        echo indexed using kallisto
        kallisto index -i index  -k $params.kmer $params.transcriptome
        """
    } else if( params.aligner == 'salmon' ) {
        """
        echo indexed using salmon
        salmon index -t $params.transcriptome -i index --kmer $params.kmer
        """
    } else {
        """
        echo Unknown aligner $params.aligner"
        """
    }

params.aligner should be passed as an input val to the process (another example of don't use global variables).

Another issue is there are scripts where input files are not passed as input. All input files should be staged, and is essential for proper checkpointing and portability.

I haven't had the time to assess the files in context. There is a DSL1 script present.