Skip to content

How do the functions in dsl=2 work? #2376

Discussion options

You must be logged in to vote

changing code to this:

#!/usr/bin/env nextflow

nextflow.enable.dsl=2

import java.nio.charset.StandardCharsets
import java.util.Base64
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec

workflow {
    labIDs = Channel.of('19457_108635_21A', '19455_108626_21', '108296', '108641')
    printLabIDWithSignature(labIDs)
    println ""
    printLabIDWithSignature.out.verbiage.view()
}

process printLabIDWithSignature {
  input:
    val lab_id
  output:
    stdout emit: verbiage
  shell:
    signatureFromFunction = getSignature(lab_id)

    Mac mac = Mac.getInstance("HmacSHA512")
    SecretKeySpec secretKeySpec = new SecretKeySpec("acdcabbacd".getBytes(StandardCharsets.UTF_8), "Hmac…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@anttitakalahti
Comment options

@1pakch
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by anttitakalahti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #2375 on October 08, 2021 10:32.