{"action":"created","issue":{"url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1894","repository_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen","labels_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1894/labels{/name}","comments_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1894/comments","events_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1894/events","html_url":"https://github.com/chapmanb/bcbio-nextgen/issues/1894","id":220779430,"number":1894,"title":"A problem with AD field in ensemble variant calling?","user":{"login":"naumenko-sa","id":13981803,"avatar_url":"https://avatars2.githubusercontent.com/u/13981803?v=3","gravatar_id":"","url":"https://api.github.com/users/naumenko-sa","html_url":"https://github.com/naumenko-sa","followers_url":"https://api.github.com/users/naumenko-sa/followers","following_url":"https://api.github.com/users/naumenko-sa/following{/other_user}","gists_url":"https://api.github.com/users/naumenko-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/naumenko-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naumenko-sa/subscriptions","organizations_url":"https://api.github.com/users/naumenko-sa/orgs","repos_url":"https://api.github.com/users/naumenko-sa/repos","events_url":"https://api.github.com/users/naumenko-sa/events{/privacy}","received_events_url":"https://api.github.com/users/naumenko-sa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-10T21:41:41Z","updated_at":"2017-04-12T12:33:33Z","closed_at":null,"body":"Hello bcbio developers and users!\r\n\r\nWith (bcbio-nextgen,1.0.3a-e4eac29,  freebayes v1.1.0-9-g09d4ecf)\r\nI've got an SNP with the weird AD field (I omit most annotations).\r\nIt was 3-sample calling:\r\n```\r\nEnsemble-annotated-decomposed.vcf.gz:\r\n1\t14930\t.\tA\tG\t81.4\tPASS\t\r\nAC=3;AF=0.5;AN=6;CALLERS=freebayes,gatk-haplotype,samtools,platypus;DECOMPOSED;LEN=1;NS=3;TYPE=snp;rs_ids=rs6682385;\r\nGT:AD:AO:DP:GQ:PL:QA:QR:RO\t\r\n0|1:6,5,3:5,3:14:43:92,0,137,32,74,175:140,97:205:6\r\n0|1:1,0,2:0,2:3:6:49,52,59,0,9,3:0,61:31:1\r\n0|1:6,3,2:3,2:11:12:44,0,154,12,114,170:81,62:202:6\r\n\r\ngatk-haplotype-annotated-decomposed.vcf.gz\r\n1\t14930\trs6682385\tA\tG\t420.5\tPASS\t\r\nGT:AD:DP:GQ:PL\t\r\n0/1:6,5:11:99:141,0,115\t\r\n0/1:6,8:14:99:261,0,120\t\r\n1/1:0,2:2:6:49,6,0\r\n\r\nplatypus-annotated-decomposed.vcf.gz\r\n1\t14930\t.\tA\tG\t38.0\tPASS\r\nGT:GL:GOF:GQ:NR:NV\t\r\n0|1:-6.4,0,-6.3:5:60:5:1\t\r\n0|1:-17.2,0,-12.6:20:99:11:5\t\r\n0|1:-0.35,0,-0.25:34:3:2:0\r\n\r\nsamtools-annotated-decomposed.vcf.gz \r\n1\t14930\t.\tA\tG\t299.0\tPASS\t\t\r\nGT:DP:PL\t\r\n0/1:9:163,0,110\t\r\n0/1:2:54,0,6\t\r\n0/1:6:117,0,116\r\n\r\nfreebayes-annotated-decomposed.vcf.gz\r\n1\t14930\t.\tA\tG\t81.4\tPASS\t\r\nGT:AD:AO:DP:GQ:PL:QA:QR:RO\t\r\n0|1:6,5,3:5,3:14:43:92,0,137,32,74,175:140,97:205:6\t\r\n0|1:1,0,2:0,2:3:6:49,52,59,0,9,3:0,61:31:1\t\r\n0|1:6,3,2:3,2:11:12:44,0,154,12,114,170:81,62:202:6\r\n```\r\n\r\nIt has 3 alleles in Ensemble and Freebayes vcfs in AD field. In the bam file there is no evidence of the 3rd allele, and in the decomposed-annotated vcf there is no other variant in this position (1:14930).\r\n\r\nUnfortunately, I've deleted intermediate files to check if there is 3-allele SNP in non-decomposed freebayes vcf.\r\n\r\nEven if so (then it is, probably, a false call of freebayes), then what is the logic of the ensemble algorithm? Which of AD fields (from freebayes or GATK) does it take and why?\r\n\r\nAnd if there is a 3-allele SNP from FreeBayes indeed,  then variant decomposition failed for AD field?\r\n\r\nThe particular problem is that some downstream analysis tools (bcftools) \r\ncan't work with incorrect 3-allelic AD field.\r\n```Incorrect number of AD fields (3) at 1:14930, cannot merge.```\r\n\r\nSergey"},"comment":{"url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/comments/293561940","html_url":"https://github.com/chapmanb/bcbio-nextgen/issues/1894#issuecomment-293561940","issue_url":"https://api.github.com/repos/chapmanb/bcbio-nextgen/issues/1894","id":293561940,"user":{"login":"chapmanb","id":39391,"avatar_url":"https://avatars2.githubusercontent.com/u/39391?v=3","gravatar_id":"","url":"https://api.github.com/users/chapmanb","html_url":"https://github.com/chapmanb","followers_url":"https://api.github.com/users/chapmanb/followers","following_url":"https://api.github.com/users/chapmanb/following{/other_user}","gists_url":"https://api.github.com/users/chapmanb/gists{/gist_id}","starred_url":"https://api.github.com/users/chapmanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapmanb/subscriptions","organizations_url":"https://api.github.com/users/chapmanb/orgs","repos_url":"https://api.github.com/users/chapmanb/repos","events_url":"https://api.github.com/users/chapmanb/events{/privacy}","received_events_url":"https://api.github.com/users/chapmanb/received_events","type":"User","site_admin":false},"created_at":"2017-04-12T12:33:33Z","updated_at":"2017-04-12T12:33:33Z","body":"Sergey;\r\nThanks for the detailed report and sorry about the inconsistencies. This is an unfortunate known problem with the current ensemble approach since we don't try to harmonize outputs. The logic for filling in the FORMAT fields is to take the first caller in order from the `variantcaller` parameter that is available for a given call. So if you have:\r\n```\r\nvariantcaller: [freebayes, gatk-haplotype, platypus, samtools]\r\n```\r\nit will pick the first caller with support for that call in order of freebayes, gatk-haplotype, platypus, then samtools.\r\n\r\nSince there is no consistency between callers on fields, this will result in different genotype information depending on the support.\r\n\r\nFreeBayes definitely has the trickiest behavior and the decomposition and cleanup approaches don't fix things like the AD problem so you'll expect these type of inconsistencies.\r\n\r\nSorry this is not optimal but it's a hard problem to solve and I don't know of any tools that handle it. Your best approach is to assume these are not going to be all correct and that you might need to clean up ensemble post-calling. You may also be able to mitigate some issues by moving FreeBayes down the priority list since it has the most inconsistencies.\r\n\r\nSorry to not have a better answer but hope this helps."}}
{"actor":{"display_login":"chapmanb"}}