Question: (Closed) Liftover of .vcf files from build 37 to build 38
0
gravatar for JSEM
11 months ago by
JSEM20
JSEM20 wrote:

Hi,

I'm hoping someone may have some pearls of wisdom. I've been trying to liftover .vcf files (human) from build 37 to build 38, and have tried a variety of different approaches, none of which have worked so far. NCBI's web tool produces an error stating that I am trying to access a page I do not have access to (despite using their own web submission form to submit the .vcf.gz file!), I keep receiving a gateway time-out error from Ensembl's genome assembly tool, and Picard's LiftoverVcf program produces the following null pointer exception errors:

java -jar picard.jar LiftoverVcf I=Input.vcf O=Output.vcf CHAIN=hg19ToHg38.over.chain REJECT=rejected_variants_chr22.vcf R=hg38.fa

Exception in thread "main" java.lang.NullPointerException at picard.vcf.LiftoverVcf.doWork(LiftoverVcf.java:218) at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:268) at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:98) at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:108)

Does anyone have any suggestions for an approach that may be more successful than the above? Or any fixes for these issues?

Thank you very much in advance for any suggestions you might have!

snp sequence genome • 830 views
ADD COMMENTlink modified 11 months ago by Hussain Ather890 • written 11 months ago by JSEM20

Hello JSEM!

We believe that this post does not fit the main topic of this site.

This issue solved.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLYlink written 11 months ago by JSEM20
1
gravatar for Pierre Lindenbaum
11 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum115k wrote:

Exception in thread "main" java.lang.NullPointerException at picard.vcf.LiftoverVcf.doWork(LiftoverVcf.java:218) at

there is no such line 218 with java code (it's a comment) in the current picard code. Your version of picard is outdated.

https://github.com/broadinstitute/picard/blob/master/src/main/java/picard/vcf/LiftoverVcf.java#L218

ADD COMMENTlink written 11 months ago by Pierre Lindenbaum115k
1

Futhermore, is hg38.fa indexed with samtools faidx AND picard createsequencedictionary ?

ADD REPLYlink written 11 months ago by Pierre Lindenbaum115k

Actually probably not, I wasn't aware it needed to be (blush). Thanks, will try this.

ADD REPLYlink written 11 months ago by JSEM20

Thanks for the quick reply! I've now upgraded to the latest Picard (2.17.3), so will try with that and see

ADD REPLYlink written 11 months ago by JSEM20

Hi again,

I've now upgraded Picard, and indexed the reference fasta file, which seems to have solved the first error I was encountering. I now seem to have an error relating to the header in the vcf file (original produced by the Michigan Imputation Server, and subsequently thinned down using vcftools).

This is the error:

Exception in thread "main" java.lang.IllegalStateException: Key GENOTYPED found in VariantContext field FILTER at 22:17072483 but this key isn't defined in the VCFHeader. We require all VCFs to have complete VCF headers by default. at htsjdk.variant.vcf.VCFEncoder.fieldIsMissingFromHeaderError(VCFEncoder.java:173) at htsjdk.variant.vcf.VCFEncoder.getFilterString(VCFEncoder.java:155) at htsjdk.variant.vcf.VCFEncoder.encode(VCFEncoder.java:106) at htsjdk.variant.variantcontext.writer.VCFWriter.add(VCFWriter.java:224) at picard.vcf.LiftoverVcf.rejectVariant(LiftoverVcf.java:400) at picard.vcf.LiftoverVcf.doWork(LiftoverVcf.java:328) at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:269) at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:98) at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:108)

And the following is the header in the VCF file (I have omitted the sample ID columns):

fileformat=VCFv4.2

filedate=2017.9.11

source=Minimac3

contig=<id=10>

FORMAT=<id=gt,number=1,type=string,description="genotype">

FORMAT=<id=ds,number=1,type=float,description="estimated alternate="" allele="" dosage="" :="" [p(0="" 1)+2*p(1="" 1)]"="">

FORMAT=<id=gp,number=3,type=float,description="estimated posterior="" probabilities="" for="" genotypes="" 0="" 0,="" 0="" 1="" and="" 1="" 1"="">

INFO=<id=af,number=1,type=float,description="estimated alternate="" allele="" frequency"="">

INFO=<id=maf,number=1,type=float,description="estimated minor="" allele="" frequency"="">

INFO=<id=r2,number=1,type=float,description="estimated imputation="" accuracy"="">

INFO=<id=er2,number=1,type=float,description="empirical (leave-one-out)="" r-square="" (available="" only="" for="" genotyped="" variants)"="">

source_20180109.1=vcf-merge(v0.1.14-12-gcdb80b8) M1.vcf.gz M2.vcf.gz

sourceFiles_20180109.1=0:M1.vcf.gz,1: M2.vcf.gz

INFO=<id=sf,number=.,type=string,description="source file="" (index="" to="" sourcefiles,="" f="" when="" filtered)"="">

INFO=<id=ac,number=.,type=integer,description="allele count="" in="" genotypes"="">

INFO=<id=an,number=1,type=integer,description="total number="" of="" alleles="" in="" called="" genotypes"="">

CHROM POS ID REF ALT QUAL FILTER INFO FORMAT

The first line is as follows: 10 94426 10:94426 C T . PASS AC=255;AF=0.39354;AN=636;MAF=0.39354;R2=0.89454;SF=0,1 GT:DS:GP

The offending line the exception refers to has the entry 'GENOTYPED' in place of 'PASS'.

Do you happen to know how I might be able to edit the header to remedy this error?

Thanks again for your help with this!

ADD REPLYlink written 11 months ago by JSEM20

this is another kind of problem. Close this one and open a new one please.

ADD REPLYlink written 11 months ago by Pierre Lindenbaum115k
1

answer here: https://github.com/samtools/bcftools/issues/470#issuecomment-240769450

ADD REPLYlink written 11 months ago by Pierre Lindenbaum115k

Ah, OK, thanks! First time posting so didn't realise a separate post was needed.

ADD REPLYlink written 11 months ago by JSEM20
1
gravatar for Hussain Ather
11 months ago by
Hussain Ather890
National Institutes of Health, Bethesda, MD
Hussain Ather890 wrote:

Have you tried upgrading picard?

ADD COMMENTlink written 11 months ago by Hussain Ather890

Have just tried to do this. Will give it a go and update here. Thanks for the suggestion!

ADD REPLYlink written 11 months ago by JSEM20
Please log in to add an answer.
The thread is closed. No new answers may be added.

Help
Access

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