Picard liftoverVCF error when attempting to liftover to build 38

Hi,

Apologies for the Biostars cross-posting, but haven't received any replies there yet, so was hoping for some help. I've been trying to lift over .vcf files (human) from build 37 to build 38 using Picard's liftoverVCF. After some very helpful tips from 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'm 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 \ R=hg38.fa

11:08:47.603 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/gpfs/home/Work/picard.jar!/com/intel/gkl/native/libgkl_compression.so [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. This seems to be the same error as posted here:
https://gatkforums.broadinstitute.org/gatk/discussion/7009/picard-liftovervcf-contig-not-part-of-the-target-reference

but I can't see a solution posted. Any suggestions?

Thanks!

Answers

Sign In or Register to comment.