{"action":"created","issue":{"url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/93","repository_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava","labels_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/93/comments","events_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/93/events","html_url":"https://github.com/AstraZeneca-NGS/VarDictJava/pull/93","id":287394643,"node_id":"MDExOlB1bGxSZXF1ZXN0MTYyMDkzNDcx","number":93,"title":"Fix zero position coverage (Argument isn't numeric error)","user":{"login":"PolinaBevad","id":32058078,"node_id":"MDQ6VXNlcjMyMDU4MDc4","avatar_url":"https://avatars2.githubusercontent.com/u/32058078?v=4","gravatar_id":"","url":"https://api.github.com/users/PolinaBevad","html_url":"https://github.com/PolinaBevad","followers_url":"https://api.github.com/users/PolinaBevad/followers","following_url":"https://api.github.com/users/PolinaBevad/following{/other_user}","gists_url":"https://api.github.com/users/PolinaBevad/gists{/gist_id}","starred_url":"https://api.github.com/users/PolinaBevad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolinaBevad/subscriptions","organizations_url":"https://api.github.com/users/PolinaBevad/orgs","repos_url":"https://api.github.com/users/PolinaBevad/repos","events_url":"https://api.github.com/users/PolinaBevad/events{/privacy}","received_events_url":"https://api.github.com/users/PolinaBevad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-10T11:05:36Z","updated_at":"2018-06-14T18:06:44Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls/93","html_url":"https://github.com/AstraZeneca-NGS/VarDictJava/pull/93","diff_url":"https://github.com/AstraZeneca-NGS/VarDictJava/pull/93.diff","patch_url":"https://github.com/AstraZeneca-NGS/VarDictJava/pull/93.patch"},"body":"### Description\r\nIssue: https://github.com/AstraZeneca-NGS/VarDictJava/issues/75\r\nThe error appears in log when running var2vcf_paired.pl: \"Argument \"NA\" isn't numeric in numeric lt (<) at /apps/vardictjava/1.4.6/VarDict/var2vcf_paired.pl line 157, <> line 330.\" The cause of this error is a calculation of fields in method combineAnalysis() when checking for strong somatic variations.\r\n\r\nNaN appears due to division by zero, where zero is position coverage for second BAM in paired sample variant calling. This appears only if -p option is set (conf.minr=0). It equals zero when calculated as a difference in position coverages between variations from combined bam and first bam. So it leads to NaN values for PMEAN, QUAL, MAPQ, ADJAF, HIAF, NM fields, which are calculated with division by zero value.\r\n### Solution\r\nWe have few assumptions for solve this issue. This pull request support the solution to return tuple with type \"False\" in combineAnalysis() if after calculation position coverage of second variant is zero. If so, this variation doesn't appear in output at all. \r\n\r\nAlso there could be other options:\r\n* Change fields that involved in error (PMEAN, QUAL, MAPQ, ADJAF, HIAF, NM) to 0 for second variant instead of calculating them. \r\n* Leave these errors in log as is.\r\n\r\n@zhongwulai What do you think, should we skip variations with zero position coverage or set fields to 0 to avoid NaN values?\r\n### Example of data:\r\nAfter varDict and teststrandbias: \r\nTumor    BRAF    7    140453038    140453044    AAAA    GAAAT    386885    1    384249    1263    1    0    AAAAA/+6    0    1;0    20    0    34.2    0    60    2    0    01    1    0    112528    0    112014    83    0    0    AAAAA/+6    0    1;0    NA    1    NA    1    NA    2    NA    NA    NA    1    0    0    0    0TCAGCAGCATCTCAGGGCCA    TTTAATCAGTGGAAAAATAG    7:140453012-140453158    Germline    Complex    0.77468    Inf\r\n\r\nAfter var2vcf_paired.pl:\r\n7    140453038    .    AAAA    GAAAT    0    v3;f0.05;pSTD    STATUS=Germline;SAMPLE=Tumor;TYPE=Complex;DP=386885;VD=1;AF=0;SHIFT3=0;MSI=0;MSILEN=0;SSF=0.77468;SOR=Inf;LSEQ=TCAGCAGCATCTCAGGGCCA;RSEQ=TTTAATCAGTGGAAAAATAG    GT:DP:VD:ALD:RD:AD:AF:BIAS:PMEAN:PSTD:QUAL:QSTD:SBF:ODDRATIO:MQ:SN:HIAF:ADJAF:NM    0/0:386885:1:1,0:384249,1263:385512,1:0:1,0:20:0:34.2:0:1:0:60:2:0:0:1    0/0:112528:0:0,0:112014,83:112097,0:0:1,0:NA:1:NA:1:1:0:NA:2:NA:NA:NA"},"comment":{"url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/comments/397387101","html_url":"https://github.com/AstraZeneca-NGS/VarDictJava/pull/93#issuecomment-397387101","issue_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/93","id":397387101,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzM4NzEwMQ==","user":{"login":"zhongwulai","id":8194727,"node_id":"MDQ6VXNlcjgxOTQ3Mjc=","avatar_url":"https://avatars0.githubusercontent.com/u/8194727?v=4","gravatar_id":"","url":"https://api.github.com/users/zhongwulai","html_url":"https://github.com/zhongwulai","followers_url":"https://api.github.com/users/zhongwulai/followers","following_url":"https://api.github.com/users/zhongwulai/following{/other_user}","gists_url":"https://api.github.com/users/zhongwulai/gists{/gist_id}","starred_url":"https://api.github.com/users/zhongwulai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhongwulai/subscriptions","organizations_url":"https://api.github.com/users/zhongwulai/orgs","repos_url":"https://api.github.com/users/zhongwulai/repos","events_url":"https://api.github.com/users/zhongwulai/events{/privacy}","received_events_url":"https://api.github.com/users/zhongwulai/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T18:06:44Z","updated_at":"2018-06-14T18:06:44Z","author_association":"CONTRIBUTOR","body":"@PolinaBevad either way is fine, though I prefer set all NA as 0.  Skipping them should be mostly OK as it's likely not in regions of interest.  Thanks!"}}
{"actor":{"display_login":"zhongwulai"}}