This is a test version of Biostars. For the public version, visit https://www.biostars.org.
convert vcf file from GRCh38 to GRCh37 using picard LiftoverVcf

Hello,

I am trying to convert vcf file from GRCh38 to GRCh37 using picard LiftoverVcf. I added chr to my vcf files and ran the software. However, I get the following errors. would you please advise? btw, I am using java openjdk-jdk1.8.0_72.

INFO    2016-12-26 11:52:02 LiftoverVcf Loading up the target reference genome.
INFO    2016-12-26 11:52:19 LiftoverVcf Lifting variants over and sorting.
[Mon Dec 26 11:52:19 EST 2016] picard.vcf.LiftoverVcf done. Elapsed time: 0.30 minutes.
Runtime.totalMemory()=5999427584
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" java.lang.NullPointerException
    at java.lang.String.checkBounds(String.java:384)
    at java.lang.String.<init>(String.java:324)
    at htsjdk.samtools.util.StringUtil.bytesToString(StringUtil.java:301)
    at picard.vcf.LiftoverVcf.doWork(LiftoverVcf.java:196)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:209)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)
dnaseq

? btw, I am using java openjdk-jdk1.8.0_72.

and what is the version of picard ?

../openjdk-jdk1.8.0_72/bin/java -Dsamjdk.buffer_size=4194304 -Xmx6g -Xms2g -jar ../picard-tools-2.0.1/picard.jar LiftoverVcf TMP_DIR=../tmp I=myvcf.hg19.vcf O=myvcf.hg19.lift.flt.vcf CHAIN=hg38ToHg19.over.chain REJECT= myvcf.hg19.rejected.vcf R= Homosapiens.GRCh37.fa

Thanks Pierre,

I ran it without adding chr to the original vcf file and it runs but obviously can not liftover most of the variants. I don't know what is wrong with my vcf file when I am adding chr. any thoughts?

I'm also getting the same error, but I'm not quite making it to the ' LiftoverVcf Lifting variants over and sorting' step. (java-jdk/1.8.0_92, picard/2.8.1) My vcf doesn't have chr prefixes and I removed the 'chr' in the reference.

java -Xmx1G -jar ${PICARD} LiftoverVcf I=./17.2057_passedvariants_T99.9.vcf O=./17.2057_passedvariants_T99.9_chr38.p10.vcf CHAIN=./hg19ToHg38.over.chain REJECT=./17.2057_passedvariants_T99.9_chr38.p10.rejected.vcf R=./Homo_sapiens_assembly38_WithoutHaplotypes.fasta


 [Mon Jul 17 14:07:46 CDT 2017] picard.vcf.LiftoverVcf INPUT=./17.2057_passedvariants_T99.9.vcf OUTPUT=./17.2057_passedvariants_T99.9_chr38.p10.vcf CHAIN=./hg19ToHg38.over.chain REJECT=./17.2057_passedvariants_T99.9_chr38.p10.rejected.vcf REFERENCE_SEQUENCE=./Homo_sapiens_assembly38_WithoutHaplotypes.fasta    WARN_ON_MISSING_CONTIG=false WRITE_ORIGI  2 [Mon Jul 17 14:07:46 CDT 2017] Executing as jdilts1@cri16cn083 on Linux 2.6.32-573.12.1.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_92-b14; Picard version: 2.8.1-SNAPSHOT
INFO    2017-07-17 14:07:47     LiftoverVcf     Loading up the target reference genome.
[Mon Jul 17 14:07:47 CDT 2017] picard.vcf.LiftoverVcf done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=1029177344
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" java.lang.NullPointerException
     at picard.vcf.LiftoverVcf.doWork(LiftoverVcf.java:158)
     at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:208)
     at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
     at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

0 answers

No answers yet.

Log in to answer this question.