Detects sample name using pattern to annotate the output table