SamToFastqAndBwaMem error when running processing-for-variant-discovery-gatk4.wdl locally

AC321AC321 Member

I am trying to run processing-for-variant-discovery-gatk4.wdl on my MacBook Pro. Instead of using the google drives, I have downloaded the relevant files. I have also pared down the list of unmapped BAM files.

I am encountering the following error:

 [2018-10-10 15:41:36,28] [error] WorkflowManagerActor Workflow a3413d6f-687f-4adf-8490-2db96dd33fb8 failed (during ExecutingWorkflowState): Job PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem:0:1 exited with return code 1 which has not been declared as a valid return code. See 'continueOnReturnCode' runtime attribute for more details.
Check the content of stderr for potential additional information: /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/stderr.
 Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/tmp.aa8f0e6d
19:41:20.966 INFO  NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/usr/gitc/picard.jar!/com/intel/gkl/native/libgkl_compression.so
[Wed Oct 10 19:41:21 UTC 2018] SamToFastq INPUT=/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/inputs/2097736019/HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.bam FASTQ=/dev/stdout INTERLEAVE=true INCLUDE_NON_PF_READS=true    OUTPUT_PER_RG=false COMPRESS_OUTPUTS_PER_RG=false RG_TAG=PU RE_REVERSE=true CLIPPING_MIN_LENGTH=0 READ1_TRIM=0 READ2_TRIM=0 INCLUDE_NON_PRIMARY_ALIGNMENTS=false VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json USE_JDK_DEFLATER=false USE_JDK_INFLATER=false
[Wed Oct 10 19:41:21 UTC 2018] Executing as [email protected] on Linux 4.9.93-linuxkit-aufs amd64; OpenJDK 64-Bit Server VM 1.8.0_111-8u111-b14-2~bpo8+1-b14; Deflater: Intel; Inflater: Intel; Picard version: 2.16.0-SNAPSHOT
[Wed Oct 10 19:41:30 UTC 2018] picard.sam.SamToFastq done. Elapsed time: 0.16 minutes.
Runtime.totalMemory()=3014656000
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" htsjdk.samtools.SAMException: Error in writing fastq file /dev/stdout
    at htsjdk.samtools.fastq.BasicFastqWriter.write(BasicFastqWriter.java:66)
    at picard.sam.SamToFastq.writeRecord(SamToFastq.java:356)
    at picard.sam.SamToFastq.doWork(SamToFastq.java:206)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:268)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:98)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:108)
/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/script: line 33:    14 Exit 1                  java -Dsamjdk.compression_level=5 -Xms3000m -jar /usr/gitc/picard.jar SamToFastq INPUT=/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/inputs/2097736019/HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.bam FASTQ=/dev/stdout INTERLEAVE=true NON_PF=true
        15 Killed                  | /usr/gitc/bwa mem -K 100000000 -p -v 3 -t 16 -Y $bash_ref_fasta /dev/stdin - 2> >(tee HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.unmerged.bwa.stderr.log >&2)
        16 Done                    | samtools view -1 - > HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.unmerged.bam

I haven't been able to resolve this. Any ideas?

Note: I have seen this topical post by @EADG . Perhaps I am missing something, but the workflow I am using doesn't appear to use the sub() function.

Here is my inputs.json file:

{
  "##_COMMENT1": "SAMPLE NAME AND UNMAPPED BAMS",
  "PreProcessingForVariantDiscovery_GATK4.sample_name": "NA12878",
  "PreProcessingForVariantDiscovery_GATK4.ref_name": "hg38",
  "PreProcessingForVariantDiscovery_GATK4.flowcell_unmapped_bams_list": "/Users/username/dev/genomics/cromwell/inputs/source/NA12878_24RG_small.txt",
  "PreProcessingForVariantDiscovery_GATK4.unmapped_bam_suffix": ".bam",

  "##_COMMENT2": "REFERENCE FILES", 
  "PreProcessingForVariantDiscovery_GATK4.ref_dict": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.dict",
  "PreProcessingForVariantDiscovery_GATK4.ref_fasta": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.fasta",
  "PreProcessingForVariantDiscovery_GATK4.ref_fasta_index": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.fasta.fai",
  "PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem.ref_alt": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.fasta.64.alt",
  "PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem.ref_sa": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.fasta.64.sa",
  "PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem.ref_amb": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.fasta.64.amb",
  "PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem.ref_bwt": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.fasta.64.bwt",
  "PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem.ref_ann": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.fasta.64.ann",
  "PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem.ref_pac": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.fasta.64.pac",

  "##_COMMENT3": "KNOWN SITES RESOURCES", 
  "PreProcessingForVariantDiscovery_GATK4.dbSNP_vcf": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.dbsnp138.vcf",
  "PreProcessingForVariantDiscovery_GATK4.dbSNP_vcf_index": "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.dbsnp138.vcf.idx",
  "PreProcessingForVariantDiscovery_GATK4.known_indels_sites_VCFs": [
    "/Users/username/dev/genomics/cromwell/inputs/reference/Mills_and_1000G_gold_standard.indels.hg38.vcf.gz",
    "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.known_indels.vcf.gz"
  ],
  "PreProcessingForVariantDiscovery_GATK4.known_indels_sites_indices": [
    "/Users/username/dev/genomics/cromwell/inputs/reference/Mills_and_1000G_gold_standard.indels.hg38.vcf.gz.tbi",
    "/Users/username/dev/genomics/cromwell/inputs/reference/Homo_sapiens_assembly38.known_indels.vcf.gz.tbi"
  ],

  "##_COMMENT4": "MISC PARAMETERS", 
  "PreProcessingForVariantDiscovery_GATK4.bwa_commandline": "bwa mem -K 100000000 -p -v 3 -t 16 -Y $bash_ref_fasta",
  "PreProcessingForVariantDiscovery_GATK4.compression_level": 5,
  "PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem.num_cpu": "4",

  "##_COMMENT5": "DOCKERS", 
  "PreProcessingForVariantDiscovery_GATK4.gotc_docker": "broadinstitute/genomes-in-the-cloud:2.3.1-1512499786",
  "PreProcessingForVariantDiscovery_GATK4.gatk_docker": "broadinstitute/gatk:4.0.4.0",
  "PreProcessingForVariantDiscovery_GATK4.python_docker": "python:2.7",

  "##_COMMENT6": "PATHS",   
  "PreProcessingForVariantDiscovery_GATK4.gotc_path": "/usr/gitc/",
  "PreProcessingForVariantDiscovery_GATK4.gatk_path": "/gatk/gatk",

  "##_COMMENT7": "JAVA OPTIONS", 
  "PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem.java_opt": "-Xms3000m",
  "PreProcessingForVariantDiscovery_GATK4.MergeBamAlignment.java_opt": "-Xms3000m",
  "PreProcessingForVariantDiscovery_GATK4.MarkDuplicates.java_opt": "-Xms4000m",
  "PreProcessingForVariantDiscovery_GATK4.SortAndFixTags.java_opt_sort": "-Xms4000m",
  "PreProcessingForVariantDiscovery_GATK4.SortAndFixTags.java_opt_fix": "-Xms500m",
  "PreProcessingForVariantDiscovery_GATK4.BaseRecalibrator.java_opt": "-Xms4000m",
  "PreProcessingForVariantDiscovery_GATK4.GatherBqsrReports.java_opt": "-Xms3000m",
  "PreProcessingForVariantDiscovery_GATK4.ApplyBQSR.java_opt": "-Xms3000m",
  "PreProcessingForVariantDiscovery_GATK4.GatherBamFiles.java_opt": "-Xms2000m",

  "##_COMMENT8": "MEMORY ALLOCATION", 
  "PreProcessingForVariantDiscovery_GATK4.GetBwaVersion.mem_size": "1 GB",
  "PreProcessingForVariantDiscovery_GATK4.SamToFastqAndBwaMem.mem_size": "14 GB",
  "PreProcessingForVariantDiscovery_GATK4.MergeBamAlignment.mem_size": "3500 MB",
  "PreProcessingForVariantDiscovery_GATK4.MarkDuplicates.mem_size": "7 GB",
  "PreProcessingForVariantDiscovery_GATK4.SortAndFixTags.mem_size": "5000 MB",
  "PreProcessingForVariantDiscovery_GATK4.CreateSequenceGroupingTSV.mem_size": "2 GB",
  "PreProcessingForVariantDiscovery_GATK4.BaseRecalibrator.mem_size": "6 GB",
  "PreProcessingForVariantDiscovery_GATK4.GatherBqsrReports.mem_size": "3500 MB",
  "PreProcessingForVariantDiscovery_GATK4.ApplyBQSR.mem_size": "3500 MB",
  "PreProcessingForVariantDiscovery_GATK4.GatherBamFiles.mem_size": "3 GB",

  "##_COMMENT9": "DISK SIZE ALLOCATION",
  "PreProcessingForVariantDiscovery_GATK4.agg_small_disk": 200,
  "PreProcessingForVariantDiscovery_GATK4.agg_medium_disk": 300,
  "PreProcessingForVariantDiscovery_GATK4.agg_large_disk": 400,
  "PreProcessingForVariantDiscovery_GATK4.flowcell_small_disk": 100,
  "PreProcessingForVariantDiscovery_GATK4.flowcell_medium_disk": 200,

  "##_COMMENT10": "PREEMPTIBLES", 
  "PreProcessingForVariantDiscovery_GATK4.preemptible_tries": 3,
  "PreProcessingForVariantDiscovery_GATK4.agg_preemptible_tries": 3
}

And here is my unmapped bams list (just one file):

/Users/username/dev/genomics/cromwell/inputs/source/HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.bam

I have made no edits to the wdl file.

Thanks in advance for any insight!

Post edited by AC321 on

Answers

  • bshifawbshifaw moonMember, Broadie, Moderator admin

    Hi @AC321 ,

    You mentioned this is being run on your laptop, how's the disk space? Perhaps its unable to write to the stdout because there isn't enough space to write it to.

    Whats in the content of the following files:
    /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/stderr
    /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/stdout
    /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/stdlog

    and any other log files within that directory? You can just upload them to the forum thread.

  • AC321AC321 Member

    Hi @bshifaw ,

    Thanks for the prompt response. I have 307 GB available currently.

    /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/stderr:

    Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/tmp.aa8f0e6d
    19:41:20.966 INFO  NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/usr/gitc/picard.jar!/com/intel/gkl/native/libgkl_compression.so
    [Wed Oct 10 19:41:21 UTC 2018] SamToFastq INPUT=/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/inputs/2097736019/HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.bam FASTQ=/dev/stdout INTERLEAVE=true INCLUDE_NON_PF_READS=true    OUTPUT_PER_RG=false COMPRESS_OUTPUTS_PER_RG=false RG_TAG=PU RE_REVERSE=true CLIPPING_MIN_LENGTH=0 READ1_TRIM=0 READ2_TRIM=0 INCLUDE_NON_PRIMARY_ALIGNMENTS=false VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json USE_JDK_DEFLATER=false USE_JDK_INFLATER=false
    [Wed Oct 10 19:41:21 UTC 2018] Executing as [email protected] on Linux 4.9.93-linuxkit-aufs amd64; OpenJDK 64-Bit Server VM 1.8.0_111-8u111-b14-2~bpo8+1-b14; Deflater: Intel; Inflater: Intel; Picard version: 2.16.0-SNAPSHOT
    [Wed Oct 10 19:41:30 UTC 2018] picard.sam.SamToFastq done. Elapsed time: 0.16 minutes.
    Runtime.totalMemory()=3014656000
    To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
    Exception in thread "main" htsjdk.samtools.SAMException: Error in writing fastq file /dev/stdout
            at htsjdk.samtools.fastq.BasicFastqWriter.write(BasicFastqWriter.java:66)
            at picard.sam.SamToFastq.writeRecord(SamToFastq.java:356)
            at picard.sam.SamToFastq.doWork(SamToFastq.java:206)
            at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:268)
            at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:98)
            at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:108)
    /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/script: line 33:    14 Exit 1                  java -Dsamjdk.compression_level=5 -Xms3000m -jar /usr/gitc/picard.jar SamToFastq INPUT=/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/inputs/2097736019/HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.bam FASTQ=/dev/stdout INTERLEAVE=true NON_PF=true
            15 Killed                  | /usr/gitc/bwa mem -K 100000000 -p -v 3 -t 16 -Y $bash_ref_fasta /dev/stdin - 2> >(tee HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.unmerged.bwa.stderr.log >&2)
            16 Done                    | samtools view -1 - > HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.unmerged.bam
    

    /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/stdout is empty.

    /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/stdlog does not exist.

    Other log files in that directory:

    docker_cid:

    5b5eabd4b2860a1c6ff3d9bdc7f968b0a08babdb023549254daccefc3685553d
    

    rc:

    1
    

    stdout.background

    35008
    5b5eabd4b2860a1c6ff3d9bdc7f968b0a08babdb023549254daccefc3685553d
    

    and stderr.background and HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.unmerged.bwa.stderr.log, which are empty.

    The directory also contains scripts:

    script:

    #!/bin/bash
    
    cd /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution
    tmpDir=$(mkdir -p "/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/tmp.aa8f0e6d" && echo "/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/tmp.aa8f0e6d")
    chmod 777 "$tmpDir"
    export _JAVA_OPTIONS=-Djava.io.tmpdir="$tmpDir"
    export TMPDIR="$tmpDir"
    export HOME="$HOME"
    (
    cd /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution
    
    )
    (
    cd /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution
    
    
      set -o pipefail
      set -e
    
      # set the bash variable needed for the command-line
      bash_ref_fasta=/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/inputs/2061131745/Homo_sapiens_assembly38.fasta
    
    java -Dsamjdk.compression_level=5 -Xms3000m -jar /usr/gitc/picard.jar \
        SamToFastq \
            INPUT=/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/inputs/2097736019/HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.bam \
            FASTQ=/dev/stdout \
            INTERLEAVE=true \
            NON_PF=true \
      | \
    /usr/gitc/bwa mem -K 100000000 -p -v 3 -t 16 -Y $bash_ref_fasta /dev/stdin -  2> >(tee HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.unmerged.bwa.stderr.log >&2) \
      | \
    samtools view -1 - > HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.unmerged.bam
    )  > '/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/stdout' 2> '/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/stderr'
    echo $? > /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/rc.tmp
    (
    # add a .file in every empty directory to facilitate directory delocalization on the cloud
    cd /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution
    find . -type d -empty -print0 | xargs -0 -I % touch %/.file
    )
    (
    cd /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution
    sync
    
    
    )
    mv /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/rc.tmp /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/rc
    

    script.background:

    #!/bin/bash
    '/bin/bash' '/Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/script.submit' < /dev/null || { rc=$?; if [ "$rc" -gt "128" ]; then echo $rc; else echo -1; fi } > /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/rc &
    echo $!
    

    script.submit:

    #!/bin/bash
    # make sure there is no preexisting Docker CID file
    rm -f /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/docker_cid
    # run as in the original configuration without --rm flag (will remove later)
    docker run \
      --cidfile /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/docker_cid \
      -i \
       \
      --entrypoint /bin/bash \
      -v /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0:/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0 \
      broadinstitute/[email protected]:4fca8ca945c17fd86e31eeef1c02983e091d4f2cb437199e74b164d177d5b2d1 /cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/script
    
    # get the return code (working even if the container was detached)
    rc=$(docker wait `cat /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/docker_cid`)
    
    # remove the container after waiting
    docker rm `cat /Users/acrane10/dev/genomics/cromwell/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/a3413d6f-687f-4adf-8490-2db96dd33fb8/call-SamToFastqAndBwaMem/shard-0/execution/docker_cid`
    
    # return exit code
    exit $rc
    

    Finally, the directory also contains a copy of HJYFJ.4.NA12878.downsampled.query.sorted.unmapped.unmerged.bam.

    Let me know if you need any more info. Thanks!

  • bshifawbshifaw moonMember, Broadie, Moderator admin

    What was the command used to run the workflow?

Sign In or Register to comment.