{"action":"created","issue":{"url":"https://api.github.com/repos/samtools/bcftools/issues/757","repository_url":"https://api.github.com/repos/samtools/bcftools","labels_url":"https://api.github.com/repos/samtools/bcftools/issues/757/labels{/name}","comments_url":"https://api.github.com/repos/samtools/bcftools/issues/757/comments","events_url":"https://api.github.com/repos/samtools/bcftools/issues/757/events","html_url":"https://github.com/samtools/bcftools/issues/757","id":304995893,"number":757,"title":"bcftools array FORMAT subscripts produce error on tag AD","user":{"login":"tedtoal","id":1427919,"avatar_url":"https://avatars1.githubusercontent.com/u/1427919?v=4","gravatar_id":"","url":"https://api.github.com/users/tedtoal","html_url":"https://github.com/tedtoal","followers_url":"https://api.github.com/users/tedtoal/followers","following_url":"https://api.github.com/users/tedtoal/following{/other_user}","gists_url":"https://api.github.com/users/tedtoal/gists{/gist_id}","starred_url":"https://api.github.com/users/tedtoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedtoal/subscriptions","organizations_url":"https://api.github.com/users/tedtoal/orgs","repos_url":"https://api.github.com/users/tedtoal/repos","events_url":"https://api.github.com/users/tedtoal/events{/privacy}","received_events_url":"https://api.github.com/users/tedtoal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-14T01:54:27Z","updated_at":"2018-03-15T15:02:02Z","closed_at":null,"author_association":"NONE","body":"In bcftools 1.7, this command:\r\n\r\n```\r\nbcftools annotate -e 'FORMAT/AD[1]==0' xxx.vcf.gz\r\n```\r\n\r\nproduces this error message:\r\n\r\n```\r\nThe FORMAT tag AD can have multiple subfields, run as AD[sample:subfield]\r\n```\r\n\r\nAs far as I know, the AD tag does NOT have multiple subfields.\r\n\r\nThe tag has this header entry:\r\n\r\n```\r\n##FORMAT=<ID=AD,Number=R,Type=Integer,Description=\"Allelic depths for the ref and alt alleles in the order listed\">\r\n```\r\n\r\nand here is a sample data line:\r\n\r\n```\r\nchr1    100731188       .       C       T       190.77  .       AC=1;AF=0.5;AN=2;BaseQRankSum=-1.635;ClippingRankSum=0;DP=35;ExcessHet=3.0103;FS=1.493;MLEAC=1;MLEAF=0.5;MQ=60;MQRankSum=0;QD=5.45;ReadPosRankSum=1.871;SOR=0.332       GT:AD:DP:GQ:PL  0/1:23,12:35:99:219,0,615\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/samtools/bcftools/issues/comments/373406829","html_url":"https://github.com/samtools/bcftools/issues/757#issuecomment-373406829","issue_url":"https://api.github.com/repos/samtools/bcftools/issues/757","id":373406829,"user":{"login":"pd3","id":524074,"avatar_url":"https://avatars3.githubusercontent.com/u/524074?v=4","gravatar_id":"","url":"https://api.github.com/users/pd3","html_url":"https://github.com/pd3","followers_url":"https://api.github.com/users/pd3/followers","following_url":"https://api.github.com/users/pd3/following{/other_user}","gists_url":"https://api.github.com/users/pd3/gists{/gist_id}","starred_url":"https://api.github.com/users/pd3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pd3/subscriptions","organizations_url":"https://api.github.com/users/pd3/orgs","repos_url":"https://api.github.com/users/pd3/repos","events_url":"https://api.github.com/users/pd3/events{/privacy}","received_events_url":"https://api.github.com/users/pd3/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T15:02:02Z","updated_at":"2018-03-15T15:02:02Z","author_association":"OWNER","body":"Thank you for the suggestion and your help with improving the documentation.\r\n\r\n@jkbonfield  proposed that the term \"element\" should make the wording clearer (https://en.wikipedia.org/wiki/Array_data_structure)\r\n\r\nThis is the updated version of the text:\r\n````\r\nArray subscripts (0-based), \"*\" for any field, \"-\" to indicate a range. Note that\r\nfor querying FORMAT vectors, the colon \":\" can be used to select a sample and an\r\nelement of the vector, as shown in the examples below\r\n\r\n        INFO/AF[0] > 0.3             .. first AF value bigger than 0.3\r\n        FORMAT/AD[0:0] > 30          .. first AD value of the first sample bigger than 30\r\n        FORMAT/AD[0:1]               .. first sample, second AD value\r\n        FORMAT/AD[1:0]               .. second sample, first AD value\r\n        DP4[*] == 0                  .. any DP4 value\r\n        FORMAT/DP[0]   > 30         .. DP of the first sample bigger than 30\r\n        FORMAT/DP[1-3] > 10         .. samples 2-4\r\n        FORMAT/DP[1-]  < 7          .. all samples but the first\r\n        FORMAT/DP[0,2-4] > 20       .. samples 1, 3-5\r\n        FORMAT/AD[0:1]              .. first sample, second AD field\r\n        FORMAT/AD[0:*], AD[0:] or AD[0] .. first sample, any AD field\r\n        FORMAT/AD[*:1] or AD[:1]        .. any sample, second AD field\r\n        (DP4[0]+DP4[1])/(DP4[2]+DP4[3]) > 0.3\r\n        CSQ[*] ~ \"missense_variant.*deleterious\"\r\n````\r\n"}}
{"actor":{"display_login":"pd3"}}