To celebrate the release of GATK 4.0, we are giving away free credits for running the GATK4 Best Practices pipelines in FireCloud, our secure online analysis portal. It’s first come first serve, so sign up now to claim your free credits worth $250. Sponsored by Google Cloud. Learn more at https://software.broadinstitute.org/firecloud/documentation/freecredits

How do I index a pair?

Here's a snippet of code from my WDL script:

    Array[Pair[String, Array[File]]] pairs =
       zip(listOrfCallInputs.outputNames, listOrfCallInputs.files)

    scatter (pair in pairs) {
        call runOrfCall { 
            input:
                referenceFile=referenceFile,
                outputName=pair[0],
                files=pair[1]
        }
    }

Unfortunately, I get the following error message:

[ERROR] [05/26/2017 19:00:16.771] [cromwell-system-akka.dispatchers.engine-dispatcher-38] [akka://cromwell-system/user/SingleWorkflowRunnerActor/WorkflowManagerActor] WorkflowManagerActor Workflow b9ea363d-ff0a-4b4b-af6e-1a8eb505b5bd failed (during ExecutingWorkflowState): Can't index Success(WdlPair(WdlString(1_B3DM2.1.Foo-14),["/Volumes/Aerial-HD/dalan/s.big/local/wdl/mite-seq/cromwell-executions/fetchAndProcessFiles/b9ea363d-ff0a-4b4b-af6e-1a8eb505b5bd/call-listOrfCallInputs/inputs/Volumes/Aerial-HD/dalan/s.big/local/wdl/mite-seq/NOTES/P53_ref.txt", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAAGGCGA_TAGATCGC.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAAGGCGA_TAGATCGC.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAAGGCGA_TATCCTCT.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAAGGCGA_TATCCTCT.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_AAGGAGTA.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_AAGGAGTA.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_ACTGCATA.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_ACTGCATA.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_AGAGTAGA.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_AGAGTAGA.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_CTAAGCCT.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_CTAAGCCT.unmapped.2.fastq.gz"])) with index Success(WdlInteger(0))
wdl4s.WdlExpressionException: Can't index Success(WdlPair(WdlString(1_B3DM2.1.Foo-14),["/Volumes/Aerial-HD/dalan/s.big/local/wdl/mite-seq/cromwell-executions/fetchAndProcessFiles/b9ea363d-ff0a-4b4b-af6e-1a8eb505b5bd/call-listOrfCallInputs/inputs/Volumes/Aerial-HD/dalan/s.big/local/wdl/mite-seq/NOTES/P53_ref.txt", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAAGGCGA_TAGATCGC.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAAGGCGA_TAGATCGC.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAAGGCGA_TATCCTCT.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAAGGCGA_TATCCTCT.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_AAGGAGTA.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_AAGGAGTA.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_ACTGCATA.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_ACTGCATA.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_AGAGTAGA.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_AGAGTAGA.unmapped.2.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_CTAAGCCT.unmapped.1.fastq.gz", "/Users/dalan/s/wdl/mite-seq/test-data/1_B3DM2.1.TAGGCATG_CTAAGCCT.unmapped.2.fastq.gz"])) with index Success(WdlInteger(0))
        at wdl4s.expression.ValueEvaluator.evaluate(ValueEvaluator.scala:182)
        at wdl4s.WdlExpression$.evaluate(WdlExpression.scala:85)
        at wdl4s.WdlExpression.evaluate(WdlExpression.scala:166)
        at wdl4s.Call$$anonfun$11$$anonfun$apply$6.apply(Call.scala:156)
        at wdl4s.Call$$anonfun$11$$anonfun$apply$6.apply(Call.scala:155)
        at scala.util.Success.flatMap(Try.scala:231)
        at wdl4s.Call$$anonfun$11.apply(Call.scala:155)
        at wdl4s.Call$$anonfun$11.apply(Call.scala:154)
        at scala.util.Success.flatMap(Try.scala:231)
        at wdl4s.Call.wdl4s$Call$$lookup$2(Call.scala:154)
        at wdl4s.Call$$anonfun$lookupFunction$1.apply(Call.scala:199)
        at wdl4s.Call$$anonfun$lookupFunction$1.apply(Call.scala:199)

Alas, I'm not finding the error message very helpful, and I couldn't find any documentation in the WDL spec on how I'm suppose to index a Pair, so I don't know if I'm doing it right.

I tried changing pair[0] to pair(0), etc., but that didn't work any better.

|>oug (dalan@broadinstitute.org)

Best Answer

Answers

Sign In or Register to comment.