Our documentation websites are currently offline due to a data center fire. We do not yet have an ETA for restoring service; we’ll update this message when we know more.

[Picard] Read error; BinaryCodec in readmode

HyunminHyunmin Seoul, KoreaMember
edited February 13 in Ask the GATK team

Dear, GATK team.

Could I ask something related to picard program in here?

java -Dsamjdk.compression_level=5 -Xms16000m -jar /BiO/BioTools/picard-2.17.8/picard.jar \ SortSam \ INPUT=/BiO/Project/brandon-genome-analysis/wdl/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/9dccfb10-f6c1-4d03-b74f-14f2d3dce600/call-SortAndFixTags/inputs/BiO/Project/brandon-genome-analysis/wdl/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/9dccfb10-f6c1-4d03-b74f-14f2d3dce600/call-MarkDuplicates/execution/NA12878.hg38.aligned.unsorted.duplicates_marked.bam \ OUTPUT=/dev/stdout \ SORT_ORDER="coordinate" \ CREATE_INDEX=false \ CREATE_MD5_FILE=false \ | \ java -Dsamjdk.compression_level=5 -Xms2000m -jar /BiO/BioTools/picard-2.17.8/picard.jar \ SetNmAndUqTags \ INPUT=/dev/stdin \ OUTPUT=NA12878.hg38.aligned.duplicate_marked.sorted.bam \ CREATE_INDEX=true \ CREATE_MD5_FILE=true \ REFERENCE_SEQUENCE=/BiO/Project/brandon-genome-analysis/wdl/cromwell-executions/PreProcessingForVariantDiscovery_GATK4/9dccfb10-f6c1-4d03-b74f-14f2d3dce600/call-SortAndFixTags/inputs/BiO/Project/brandon-genome-analysis/ref/ftp.broadinstitute.org/bundle/hg38/Homo_sapiens_assembly38.fasta

This piping command is not work in my case.

When I divided the command and run, it was work well.

so, I guess this problem is related to picard.

How can I handle this problem?

Issue · Github
by Sheila

Issue Number
2908
State
closed
Last Updated
Assignee
Array
Milestone
Array
Closed By
sooheelee

Best Answers

  • HyunminHyunmin Seoul, KoreaMember
    Accepted Answer

    After update with picard-2.17.10, it works!

Answers

  • HyunminHyunmin Seoul, KoreaMember

    @Sheila Ok, Thanks!
    @shlee I'll try to run with your comment.

  • HyunminHyunmin Seoul, KoreaMember
    edited February 20

    In some case..

    1. Change SetNmAndUqTags to SetNmMdAndUqTags
      Failed

    2. No pipe.
      Success

    so, I want to check the piping command in picard-2.17.8 version.

    #!/bin/sh
    
    set -o pipefail
    
    PICARD_JAR=/BiO/Install/picard-2.17.8/picard.jar
    
    ref_fasta=/BiO/Project/brandon-genome-analysis/ref/ftp.broadinstitute.org/bundle/hg38/Homo_sapiens_assembly38.fasta
    
    input_bam=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.unsorted.duplicates_marked.bam
    output_bam_basename=/BiO/Project/brandon-genome-analysis/analysis/brandon_wes.aligned.duplicate_marked.sorted
    
    compression_level=5
    java_opt_sort="-Xms16G"
    java_opt_fix="-Xms16G"
    
    
    java -Dsamjdk.compression_level=${compression_level} ${java_opt_sort} -jar ${PICARD_JAR} \
      SortSam \
      INPUT=${input_bam} \
      SORT_ORDER="coordinate" \
      CREATE_INDEX=false \
      CREATE_MD5_FILE=false \
      OUTPUT=/dev/stdout \
    | \
    java -Dsamjdk.compression_level=${compression_level} ${java_opt_fix} -jar ${PICARD_JAR} \
      SetNmMdAndUqTags \
      INPUT=/dev/stdin \
      OUTPUT=${output_bam_basename}.bam \
      CREATE_INDEX=true \
      CREATE_MD5_FILE=true \
      REFERENCE_SEQUENCE=${ref_fasta}
    

    I also posted a bug report to the Picard in github.

  • HyunminHyunmin Seoul, KoreaMember
    Accepted Answer

    After update with picard-2.17.10, it works!

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @Hyunmin
    Hi,

    Glad to hear. Thanks for reporting back :smiley:

    -Sheila

Sign In or Register to comment.