Biostar Beta. Not for public use.
Picard liftoverVCF error when attempting to liftover to build 38
2
Entering edit mode
2.7 years ago
JSEM • 20

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!

ADD COMMENTlink
2
Entering edit mode
16 months ago
WCIP | Glasgow | UK

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 COMMENTlink
0
Entering edit mode
2.0 years ago
YaGalbi ♦ 1.4k
Biocomputing, MRC Harwell Institute, Ox…

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

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1