Skip to content
Snippets Groups Projects
validation.nf 927 B
Newer Older
nextflow.enable.dsl = 2

include {read_inputs} from './inputs.nf'

    input:

    script:
    """
    # I don't understand why getParent works since md5sum_file is not a path, but it works
    cd ${md5sum_file.getParent()}
    md5sum -c ${md5sum_file.getName()}
workflow validation {
    /*
    Take a parsed samplesheet, flatten it and parse into a channel of observed vs.
    expected checksums. Calls check_errors above to raise an exception upon any
    mismatches.
    */

    take:
        ch_samplesheet_info
    main:
        ch_fastqs = ch_samplesheet_info
        .map(
            { indv, r1, r2 ->
                [r1, r2]
            }
        ).flatten()
        .map({file(it)})
        
        ch_md5_files = ch_fastqs.map(
            { fastq -> fastq.getParent().getParent() + '/md5sums.txt' }