brentp / vcfanno

annotate a VCF with other VCFs/BEDs/tabixed files
https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-0973-5
MIT License
365 stars 56 forks source link

api.go:263: WARNING: out of bounds with ref: [T], alt: [A T], vals: [%!s(int=227542)] #71

Closed alig99 closed 7 years ago

alig99 commented 7 years ago

Hi, This is my first attempt at using vcfanno. I think it looks like it's having issues with multi allelics. But ops is set to self in the conf file. At the moment I am having to decompose the vcf file, but I thought the newer version of vcfanno can accomodate multi allelics. Any help would be greatly appreciated. Thank you ali

[[annotation]] file="/home/neuro/Documents/Ali/gnomad_data/release-170228/vcf/exomes/gnomad.exomes.r2.0.1.sites.vcf.gz" fields = ["AC", "Hom", "Hemiz", "AN", "FILTER"] ops=["self", "self", "self", "self", "self"] names=["gnomAD_exome_AC", "gnomAD_exome_Hom", "gnomAD_exome_Hemiz", "gnomAD_exome_AN", "gnomAD_exome_FILTER"]

Calculate allele frequencies

[[postannotation]] fields=["ExAC_AC", "ExAC_AN"] name="ExAC_AF" op="div2" type="Float"

[[postannotation]] fields=["gnomAD_exome_AC", "gnomAD_exome_AN"] name="gnomAD_exome_AF" op="div2" type="Float"

6281.WF.common.vcf.gz

./vcfanno_linux64 -p 4 /cavalier-master/example/vcfanno_conf_exome.toml 6281.WF.common.vcf.gz > annotated_test.vcf

============================================= vcfanno version 0.2.7 [built with go1.8]

see: https://github.com/brentp/vcfanno

vcfanno.go:115: found 10 sources from 2 files vcfanno.go:143: using 2 worker threads to decompress query file bix.go:200: chromosome chrM not found in /home/neuro/Documents/Ali/gnomad_data/ExAC_release/release1.0/ExAC.r1.sites.vep.vcf.gz bix.go:200: chromosome chrM not found in /home/neuro/Documents/Ali/gnomad_data/release-170228/vcf/exomes/gnomad.exomes.r2.0.1.sites.vcf.gz vcfanno.go:187: Info Error: gnomAD_exome_AN not found in INFO >> this error/warning may occur many times. reporting once here... vcfanno.go:187: Info Error: Hemiz not found in header >> this error/warning may occur many times. reporting once here... api.go:263: WARNING: out of bounds with ref: [T], alt: [A T], vals: [%!s(int=227542)] vcfanno.go:187: Info Error: AC_Hemiz not found in header >> this error/warning may occur many times. reporting once here... api.go:263: WARNING: out of bounds with ref: [C T], alt: [C T A], vals: [%!s(int=59092)] api.go:263: WARNING: out of bounds with ref: [C T], alt: [C T A], vals: [%!s(int=183796)] panic: interface conversion: interface {} is []int, not int

goroutine 14081 [running]: github.com/brentp/vcfanno/api.div2(0xc420b312e0, 0x2, 0x2, 0x4, 0xc4200a2cc0) /home/brentp/go/src/github.com/brentp/vcfanno/api/reducers.go:49 +0x386 github.com/brentp/vcfanno/api.(Annotator).PostAnnotate(0xc420017380, 0xc4213bcf04, 0x4, 0x104b2ec, 0x104b2ed, 0x932cc0, 0xc422269ce0, 0x0, 0x0, 0xc4213bcf08, ...) /home/brentp/go/src/github.com/brentp/vcfanno/api/api.go:690 +0x1b65 github.com/brentp/vcfanno/api.(Annotator).AnnotateEnds(0xc420017380, 0x933560, 0xc42112cc00, 0x0, 0x0, 0x92b9a0, 0xc42323d780) /home/brentp/go/src/github.com/brentp/vcfanno/api/api.go:832 +0xf37 main.main.func1(0x933560, 0xc42112cc00) /home/brentp/go/src/github.com/brentp/vcfanno/vcfanno.go:175 +0x71 github.com/brentp/irelate.PIRelate.func1.1(0xc4215876b0, 0xc42224c600, 0x190, 0x190, 0xc420378000) /home/brentp/go/src/github.com/brentp/irelate/parallel.go:202 +0x5f created by github.com/brentp/irelate.PIRelate.func1 /home/brentp/go/src/github.com/brentp/irelate/parallel.go:207 +0x89

brentp commented 7 years ago

thanks for reporting.

div2 requires that the 2nd argument has only a single value.

I have just pushed a fix that improves the WARNING message and I'll debug this further tomorrow but it seems that you have a case in your annotatoin file where the header says a field is Number=A, it has 3 ALTs (C,T,A) but only a single value (183796 in one case and 59092 in another case).

can you share the portions of your exac and gnomad files that overlap your query file or are they unaltered from the originals?

brentp commented 7 years ago

if you could narrow it down to either gnomad or ExAC, that would help also.

alig99 commented 7 years ago

Hi,

Thanks for your rapid response.

The ExAC & gnomad files are unaltered from the originals.

When I run it just against ExAC it complains about the 59092

bix.go:200: chromosome chrM not found in /home/neuro/Documents/Ali/gnomad_data/ExAC_release/release1.0/ExAC.r1.sites.vep.vcf.gz vcfanno.go:187: Info Error: ExAC_AN not found in INFO >> this error/warning may occur many times. reporting once here... vcfanno.go:187: Info Error: AC_Hemiz not found in header >> this error/warning may occur many times. reporting once here... api.go:263: WARNING: out of bounds with ref: [C T], alt: [C T A], vals: [%!s(int=59092)] panic: interface conversion: interface {} is []int, not int

When I run it against gnomad it complains about the 183796 These both have 2 ref alleles. But gnomad also complains about a single ref with 2 alt alleles ref: [T], alt: [A T], vals: [%!s(int=227542)]

bix.go:200: chromosome chrM not found in /home/neuro/Documents/Ali/gnomad_data/release-170228/vcf/exomes/gnomad.exomes.r2.0.1.sites.vcf.gz vcfanno.go:187: Info Error: gnomAD_exome_AN not found in INFO >> this error/warning may occur many times. reporting once here... vcfanno.go:187: Info Error: Hemiz not found in header >> this error/warning may occur many times. reporting once here... api.go:263: WARNING: out of bounds with ref: [T], alt: [A T], vals: [%!s(int=227542)] api.go:263: WARNING: out of bounds with ref: [C T], alt: [C T A], vals: [%!s(int=183796)] panic: interface conversion: interface {} is []int, not int

Thanks for your help, ali

Alison Gardner, BA Work days: Monday/Tuesday/Thursday Postal Address: ATTN: Alison Gardner: Neurogenetics Research Program Adelaide Medical School Faculty of Health and Medical Sciences Level 8, Adelaide Health & Medical Sciences Building The University of Adelaide SA 5005 Australia T: +61 8 8313 7961 E: alison.gardner@adelaide.edu.au


From: Brent Pedersen - Bioinformatics notifications@github.com Sent: Thursday, 29 June 2017 10:53:57 AM To: brentp/vcfanno Cc: Alison Gardner; Author Subject: Re: [brentp/vcfanno] api.go:263: WARNING: out of bounds with ref: [T], alt: [A T], vals: [%!s(int=227542)] (#71)

if you could narrow it down to either gnomad or ExAC, that would help also.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/brentp/vcfanno/issues/71#issuecomment-311836188, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADXXqZ1Qn21gl58bY5Kr96aRQTCeb-F8ks5sIvytgaJpZM4OItWL.

brentp commented 7 years ago

so, I'll fix the bug of vcfanno panicing in this case, but the exac v1 vcf is malformed. It has in the header, e.g.:

##INFO=<ID=AC_Adj,Number=1,Type=Integer,Description="Adjusted Allele Count (AC)">

but then it will have values like AC_Adj=6999,4369 when there are 2 ALTs.

This is true of all the AC fields. So, for ExAC, please update to ExAC v3 (instead of v1) or change the header of v1 so that the AC* fields have Number=A The error occurs because it tries to parse that as an int and fails and then it has fewer than expected items in the list.

For gnomad, I don't understand how that's happening. I'll recreate and debug tomorrow.

alig99 commented 7 years ago

Hi,

I'm using ExAC release 1 which is the most recent, not 0.1 & the AC all seem to be NUMBER=A

INFO=

INFO=

INFO=

INFO=

INFO=

INFO=

INFO=

INFO=

INFO=

INFO=

INFO=

INFO=

Not sure what's going on. thanks for help so far, ali

Alison Gardner, BA Work days: Monday/Tuesday/Thursday Postal Address: ATTN: Alison Gardner: Neurogenetics Research Program Adelaide Medical School Faculty of Health and Medical Sciences Level 8, Adelaide Health & Medical Sciences Building The University of Adelaide SA 5005 Australia T: +61 8 8313 7961 E: alison.gardner@adelaide.edu.au


From: Brent Pedersen - Bioinformatics notifications@github.com Sent: Thursday, 29 June 2017 11:50:40 AM To: brentp/vcfanno Cc: Alison Gardner; Author Subject: Re: [brentp/vcfanno] api.go:263: WARNING: out of bounds with ref: [T], alt: [A T], vals: [%!s(int=227542)] (#71)

so, I'll fix the bug of vcfanno panicing in this case, but the exac v1 vcf is malformed. It has in the header, e.g.:

INFO=

but then it will have values like AC_Adj=6999,4369 when there are 2 ALTs.

This is true of all the AC fields. So, for ExAC, please update to ExAC v3 (instead of v1) or change the header of v1 so that the AC* fields have Number=A The error occurs because it tries to parse that as an int and fails and then it has fewer than expected items in the list.

For gnomad, I don't understand how that's happening. I'll recreate and debug tomorrow.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/brentp/vcfanno/issues/71#issuecomment-311843816, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADXXqS9sPUd0aVPdKAqHxWghXoar2SOEks5sIwn4gaJpZM4OItWL.

brentp commented 7 years ago

Hi, thanks for looking into this. I believe this was a regression introduced in v0.2.7 I believe have fixed this--and I added a test based on your data to the repo. Would you verify that it resolves the problems you are seeing?

I have attached the binary here. It is gzipped as required by github, but you can just gunzip and chmod+x and give it a go.

vcfanno_linux64.gz

alig99 commented 7 years ago

Hi Brent,

Thanks, that does resolve the issues with the

WARNING: out of bounds with ref: [T], alt: [A T], vals: [%!s(int=227542)] (#71)

These warnings do not come up now.

Great, appreciate your help,

cheers alison

Alison Gardner, BA Work days: Monday/Tuesday/Thursday Postal Address: ATTN: Alison Gardner: Neurogenetics Research Program Adelaide Medical School Faculty of Health and Medical Sciences Level 8, Adelaide Health & Medical Sciences Building The University of Adelaide SA 5005 Australia T: +61 8 8313 7961 E: alison.gardner@adelaide.edu.au


From: Brent Pedersen - Bioinformatics notifications@github.com Sent: Friday, 30 June 2017 1:55:13 AM To: brentp/vcfanno Cc: Alison Gardner; Author Subject: Re: [brentp/vcfanno] api.go:263: WARNING: out of bounds with ref: [T], alt: [A T], vals: [%!s(int=227542)] (#71)

Hi, thanks for looking into this. I believe this was a regression introduced in v0.2.7 I believe have fixed this--and I added a test based on your data to the repo. Would you verify that it resolves the problems you are seeing?

I have attached the binary here. It is gzipped as required by github, but you can just gunzip and chmod+x and give it a go.

vcfanno_linux64.gzhttps://github.com/brentp/vcfanno/files/1112760/vcfanno_linux64.gz

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/brentp/vcfanno/issues/71#issuecomment-312019541, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADXXqaLZOrHoFSqHJJryK7xSRLqHvA03ks5sI8_ogaJpZM4OItWL.

brentp commented 7 years ago

great. thanks for following up. I'll make a new release shortly that will be mostly identical with the one linked above.