Question: Picard liftoverVCF error when attempting to liftover to build 38
gravatar for JSEM
20 months ago by
JSEM20 wrote:


I've been trying to lift over .vcf files (human) from build 37 to build 38 using Picard's lftoverVCF. After some very helpful tips from other BioStars users (reference fasta file has been appropriately indexed, I'm also running the latest version of Picard (2.17.3)), I'm now at the stage where I am receiving the following error:

java -jar picard.jar LiftoverVcf \
  I=Input.vcf \
  O=Output.vcf \
  CHAIN=GRCh37_to_GRCh38.chain \
  REJECT=rejected_variants_chr22.vcf \

11:08:47.603 INFO NativeLibraryLoader - Loading from jar:file:/gpfs/home/Work/picard.jar!/com/intel/gkl/native/ [Mon Jan 15 11:08:47 GMT 2018] LiftoverVcf INPUT=Input.vcf OUTPUT=Output.vcf CHAIN=GRCh37_to_GRCh38.chain REJECT=rejected_variants_chr22.vcf REFERENCE_SEQUENCE=hg38.fa WARN_ON_MISSING_CONTIG=false WRITE_ORIGINAL_POSITION=false LIFTOVER_MIN_MATCH=1.0 ALLOW_MISSING_FIELDS_IN_HEADER=false TAGS_TO_REVERSE=[AF] TAGS_TO_DROP=[MAX_AF] 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 [Mon Jan 15 11:08:47 GMT 2018] Executing as user@node030 on Linux 2.6.32-220.el6.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0-internal-root_2016_01_29_08_23-b00; Deflater: Intel; Inflater: Intel; Picard version: 2.17.3-SNAPSHOT INFO 2018-01-15 11:08:47 LiftoverVcf Loading up the target reference genome. INFO 2018-01-15 11:09:05 LiftoverVcf Lifting variants over and sorting (not yet writing the output file.) ERROR 2018-01-15 11:09:05 LiftoverVcf Encountered a contig, 22 that is not part of the target reference. [Mon Jan 15 11:09:05 GMT 2018] picard.vcf.LiftoverVcf done. Elapsed time: 0.29 minutes. Runtime.totalMemory()=3293052928

Looking up this error, I see some suggestions to add "chr" to the chromosome notation in the .vcf file, to match the reference and chain files. I have done this as follows:

awk '{if($0 !~ /^#/) print "chr"$0; else print $0}' Input.vcf > Input_withchr.vcf

but am still receiving the same error as above. Any suggestions?


ADD COMMENTlink modified 14 months ago by h.mon27k • written 20 months ago by JSEM20
gravatar for dariober
15 months ago by
WCIP | Glasgow | UK
dariober10k wrote:

I've been banging my head on this for the last couple of hours... The fix (for me at least) is to add to LiftoverVcf the option WARN_ON_MISSING_CONTIG=true

My command:

java -Xmx6g -jar picard.jar LiftoverVcf I=22.fix.vcf.gz O=22.lo.vcf.gz \
    CHAIN=hg19ToHg38.over.chain.gz \
    REJECT=22.reject.vcf \
    R=GRCh38.fa \

(Using picard 2.18)

ADD COMMENTlink modified 15 months ago • written 15 months ago by dariober10k
gravatar for YaGalbi
20 months ago by
Biocomputing, MRC Harwell Institute, Oxford, UK
YaGalbi1.4k wrote:

Can you locate the line that is causing the error....remove it (and all like it)....and rerun? The point --> get it working first on a test data set...then iron out the problems with the real data set.

ADD COMMENTlink written 20 months ago by YaGalbi1.4k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 950 users visited in the last hour