i think you could use sub to do this with something like
> if (sub(sample_name, "clinical", "") != sample_name) { ...
i.e. if i'm able to remove the substring i'm looking to match, it means the substring was present and the sub() output will not be the same as my original string
From Broad slack: https://broadinstitute.slack.com/archives/CESEYJW9W/p1663869404506729
From Morgan:
Jess also did this in the example script she wrote for Conditionally running different WDL tasks based on input data type using
if(sub())