Closed huangk3 closed 4 years ago
are you source a lua file that has the definition for contains? This works for me:
function contains(str, tok)
return string.find(str, tok) ~= nil
end
function check_in_omim(arg)
return arg ~= nil and contains(arg, "OMIM")
end
--print(check_in_omim())
--print(check_in_omim("XXXOMIM"))
Yeah, it works. Thanks @brentp
Hi @brentp
I tried to add a tag through checking if a field contains a substring but got the following error:
The lua looks like:
the conf looks like:
The vcf looks like:
I want to add "in_omim=1" if the 'clinvar_disease_database' contains 'OMIM' or "in_omim=0" otherwise. Take the variant above as an example, 'in_omim=0' should be added but I got the error as mentioned in the beginning. Thanks!