getGroupName function

Convert strain name to its group name e.g. 'Bacteroides.1' becomes 'Bacteroides' updated (Dec 2019) so that MFG names can contain dots

Convert strain name to its group name e.g. 'Bacteroides.1' becomes 'Bacteroides' updated (Dec 2019) so that MFG names can contain dots

getGroupName(xname, microbeNames)

Arguments

  • xname: a string (may be strain name or something else)
  • microbeNames: vector of strings of microbial group names

Returns

group name (string) if xname is a strain name. If xname is not a the name of a strain it will simply return xname unchanged.