Update: July 26, 2019
This section of the forum is no longer actively monitored. We are working on a support migration plan that we will share here shortly. Apologies for this inconvenience.

cromwell+wdl with gatk-launch

blueskypyblueskypy Member ✭✭

hi,
I'm using GATK4.beta.1. The helloHaplotypeCaller in the WDL tutorial runs successfully on my linux machine after making small changes to the helloHaplotypeCaller.wdl.

 workflow helloHaplotypeCaller {
        call haplotypeCaller
}

task haplotypeCaller {
        File GATK
        File RefFasta
        String sampleName
        File inputBAM
        File RefIndex
        File RefDict
        File bamIndex
        command {
                java -jar ${GATK} HaplotypeCaller \
                        -R ${RefFasta} \
                        -I ${inputBAM} \
                        -O ${sampleName}.raw.indels.snps.vcf
        }
        output {
                File rawVCF = "${sampleName}.raw.indels.snps.vcf"
        }
}

However, if I replace java -jar ${GATK} HaplotypeCaller by ${GATK} HaplotypeCaller, and set the following in the json file:
"helloHaplotypeCaller.haplotypeCaller.GATK": "/home/jj/drive1/tools/gatk-4.beta.1/gatk-launch",

I got the following running error:

No local jar was found, please build one by running

/home/jj/tmp/WDLdata/tmp/cromwell-executions/helloHaplotypeCaller/e22fceb6-4deb-4d4e-a0bb-42908d35401f/call-haplotypeCaller/inputs/home/jj/drive1/tools/gatk-4.beta.1/gradlew localJar

or
export GATK_LOCAL_JAR=

Just using gatk-launch without cromwell+WDL works OK, so seems it's their combined usage that caused the problem.

Best Answer

Answers

  • blueskypyblueskypy Member ✭✭

    Thanks @ChrisL ! Yes, it works! and exporting GATK_LOCAL_JAR works too. The gatk-launch is a script in GATK4 package to run the jar file.

    Issue · Github
    by Geraldine_VdAuwera

    Issue Number
    2334
    State
    open
    Last Updated
    Assignee
    Array
  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Ah yes this is something we're going to need to document for people who want to use GATK4 without running from a docker.

  • xiuczxiucz Member
    edited April 29

    Hi, @Geraldine_VdAuwera ,
    I got the same running error without a docker,

    No local jar was found, please build one by running
    

    I used gatk4.1.0.0, the gatk. I didn't use the gatk-package-4.1.0.0-local.jar file as a result of java memory problem.
    Should File GATK_jar be pointed to? Or other suggestions can you provide ?

    Thank you very much.

    And the wdl file,

    task haplotypeCaller {
            File GATK
            File RefFasta
            File RefIndex
            File RefDict
            String sampleName
            File inputBAM
            File bamIndex
    
            command {
                     ${GATK} \
                            HaplotypeCaller \
                            -R ${RefFasta} \
                            -I ${inputBAM} \
                            -O ${sampleName}.raw.indels.snps.vcf
            }
            output {
                    File rawVCF = "${sampleName}.raw.indels.snps.vcf"
            }
    }
    
    workflow helloHaplotypeCaller {
            call haplotypeCaller
    }
    

    And the json file

    {
      "helloHaplotypeCaller.haplotypeCaller.RefFasta": "~/tmp/wdl/helloHaplotypeCaller/ref/human_g1k_b37_20.fasta",
      "helloHaplotypeCaller.haplotypeCaller.bamIndex": "~/tmp/wdl/helloHaplotypeCaller/inputs/NA12878_wgs_20.bam",
      "helloHaplotypeCaller.haplotypeCaller.GATK": "~/software/gatktools/gatk-4.1.0.0/gatk",
      "helloHaplotypeCaller.haplotypeCaller.RefIndex": "~/tmp/wdl/helloHaplotypeCaller/ref/human_g1k_b37_20.fasta.fai",
      "helloHaplotypeCaller.haplotypeCaller.RefDict": "~/tmp/wdl/helloHaplotypeCaller/ref/human_g1k_b37_20.dict",
      "helloHaplotypeCaller.haplotypeCaller.inputBAM": "~/tmp/wdl/helloHaplotypeCaller/inputs/NA12878_wgs_20.bam",
      "helloHaplotypeCaller.haplotypeCaller.sampleName": "NA12878"
    }
    
Sign In or Register to comment.