{"action":"created","issue":{"url":"https://api.github.com/repos/samtools/htsjdk/issues/229","labels_url":"https://api.github.com/repos/samtools/htsjdk/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/samtools/htsjdk/issues/229/comments","events_url":"https://api.github.com/repos/samtools/htsjdk/issues/229/events","html_url":"https://github.com/samtools/htsjdk/issues/229","id":71373557,"number":229,"title":"Increase number of likelihoods allowed in PL field","user":{"login":"vdauwera","id":2748435,"avatar_url":"https://avatars.githubusercontent.com/u/2748435?v=3","gravatar_id":"","url":"https://api.github.com/users/vdauwera","html_url":"https://github.com/vdauwera","followers_url":"https://api.github.com/users/vdauwera/followers","following_url":"https://api.github.com/users/vdauwera/following{/other_user}","gists_url":"https://api.github.com/users/vdauwera/gists{/gist_id}","starred_url":"https://api.github.com/users/vdauwera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdauwera/subscriptions","organizations_url":"https://api.github.com/users/vdauwera/orgs","repos_url":"https://api.github.com/users/vdauwera/repos","events_url":"https://api.github.com/users/vdauwera/events{/privacy}","received_events_url":"https://api.github.com/users/vdauwera/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/samtools/htsjdk/labels/2%20-%20Working","name":"2 - Working","color":"CCCCCC"},{"url":"https://api.github.com/repos/samtools/htsjdk/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/samtools/htsjdk/labels/secon","name":"secon","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"vdauwera","id":2748435,"avatar_url":"https://avatars.githubusercontent.com/u/2748435?v=3","gravatar_id":"","url":"https://api.github.com/users/vdauwera","html_url":"https://github.com/vdauwera","followers_url":"https://api.github.com/users/vdauwera/followers","following_url":"https://api.github.com/users/vdauwera/following{/other_user}","gists_url":"https://api.github.com/users/vdauwera/gists{/gist_id}","starred_url":"https://api.github.com/users/vdauwera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdauwera/subscriptions","organizations_url":"https://api.github.com/users/vdauwera/orgs","repos_url":"https://api.github.com/users/vdauwera/repos","events_url":"https://api.github.com/users/vdauwera/events{/privacy}","received_events_url":"https://api.github.com/users/vdauwera/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2015-04-27T19:09:27Z","updated_at":"2015-05-08T14:32:07Z","closed_at":null,"body":"Needed to fix https://github.com/broadinstitute/gsa-unstable/issues/937\r\n\r\nThere is a bug occurring in GATK (reported independently several times already) due to large numbers (hundreds) of alternative alleles in the processed loci in some users' GVCF files. Assuming there are N alleles in diploid organism, then VCF file stores N * (N - 1) / 2 likelihoods in the PL field. However, htsjdk reads only first 10,000 likelihoods:\r\n\r\nLINE 755-766 in htsjdk.variant.vcf.AbstractVCFCoded.java:\r\n\r\n    private final String[] INT_DECODE_ARRAY = new String[10000];\r\n    private final int[] decodeInts(final String string) {\r\n    final int nValues = ParsingUtils.split(string, INT_DECODE_ARRAY, ',');\r\n    final int[] values = new int[nValues];\r\n    try {\r\n    for ( int i = 0; i < nValues; i++ )\r\n    values[i] = Integer.valueOf(INT_DECODE_ARRAY[i]);\r\n    } catch (final NumberFormatException e) {\r\n    return null;\r\n    }\r\n    return values;\r\n    }\r\n\r\nSince GATK assumes that there are N * (N - 1) / 2 likelihoods, then it eventually jumps out of the 10,000 array.\r\n\r\nUnless there is a good reason for hardcoding a 10K limit, we'd like to relax this to allow considering larger numbers of alternate alleles, which becomes more likely to happen now that we're calling indels in very large cohorts. \r\n\r\n<!---\r\n@huboard:{\"order\":90.5,\"milestone_order\":229,\"custom_state\":\"ready\"}\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/samtools/htsjdk/issues/comments/100248201","html_url":"https://github.com/samtools/htsjdk/issues/229#issuecomment-100248201","issue_url":"https://api.github.com/repos/samtools/htsjdk/issues/229","id":100248201,"user":{"login":"johnwallace123","id":1088080,"avatar_url":"https://avatars.githubusercontent.com/u/1088080?v=3","gravatar_id":"","url":"https://api.github.com/users/johnwallace123","html_url":"https://github.com/johnwallace123","followers_url":"https://api.github.com/users/johnwallace123/followers","following_url":"https://api.github.com/users/johnwallace123/following{/other_user}","gists_url":"https://api.github.com/users/johnwallace123/gists{/gist_id}","starred_url":"https://api.github.com/users/johnwallace123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnwallace123/subscriptions","organizations_url":"https://api.github.com/users/johnwallace123/orgs","repos_url":"https://api.github.com/users/johnwallace123/repos","events_url":"https://api.github.com/users/johnwallace123/events{/privacy}","received_events_url":"https://api.github.com/users/johnwallace123/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T14:32:07Z","updated_at":"2015-05-08T14:32:07Z","body":"Can't say I disagree with you on that front.  It's not a terribly difficult\nfunction to add, but I don't want to have to write all those test cases!  I\nassumed that there was a specific need to implement the ParsingUtils.split,\nbut it's possible that the commons-lang3 library obviates that need.  I\nhave seen in the past that rewriting a text parser incorporating\nassumptions can be substantially faster than the \"generic\" versions, but it\nshould only be done if profiling indicates that's where the bottleneck is.\n\nIf we do go with using the commons-lang3 library, would it be beneficial to\nreplace the ParsingUtils.split code with the corresponding\nStringUtils.split function?  This way, we wouldn't have to count the number\nof delimiters, and as an added bonus, the StringUtils.split function will\ncollapse repeated delimiters and in general, do the Right Thing.\n\nOn Fri, May 8, 2015 at 10:19 AM, Ron Levine <notifications@github.com>\nwrote:\n\n> This seems like it's reinventing the wheel. From org.apache.commons, we\n> already have commons-jexl, why not commons-lang3? It's a powerfull library\n> and would save a lot of coding effort in the future.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/samtools/htsjdk/issues/229#issuecomment-100245237>.\n>\n"}}