Picard liftoverVCF error when attempting to liftover to build 38
2
3
Entering edit mode
6.3 years ago
JSEM ▴ 30

Hi,

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 \
  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. Any suggestions?

Thanks!

SNP genome sequence Assembly software error • 6.8k views
ADD COMMENT
6
Entering edit mode
5.9 years ago

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 \
    WARN_ON_MISSING_CONTIG=true

(Using picard 2.18)

ADD COMMENT
0
Entering edit mode

but use WARN_ON_MISSING_CONTIG=true ,the REJECT.vcf will very big,at the same time the output vcf is very samll.it means much variant info not be convert.

ADD REPLY
0
Entering edit mode
6.3 years ago
BioinfGuru ★ 1.7k

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 COMMENT

Login before adding your answer.

Traffic: 2998 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6