Naming Convention Configuration
Note: this is one of a series of topics outlining the syntax expected in a Studio Mapper System Configuration File.
Warning: updating the system configuration file will affect all Studio Mapper projects with which it is associated. Changes should only be made if you are familiar with the XML format, and changes should be tested in an appropriate environment before rolling out to a live system.
Syntax
In the table below, each XML "tag" refers to an enclosed XML node that may be subordinate to a "parent" node or have one or more child "elements".
Tag | Req? | Description | Parent(s) | Element(s) |
<NamingConventions> | No | Contains elements defining naming conventions for Studio Mapper | <MappingConfiguration> |
<Map> <SampleID> <ChannelSamples> <ChannelID> |
<Map> | No | Contains elements defining a naming convention | <NamingConvention> | <BaseString> |
<BaseString> | No | A string that can also reference <Parameter key> definitions. | <Map> | None |
<Parameter key = “” length = “”> | No | An element of a <BaseString>, referenced by the parameter ID. The ID can be any string, which will be substituted to construct a name. length is optional. If used it will enforce a fixed length for names, padding the ID variable with leading zeros to achieve the specified length. See the example further below. |
<Map> <SampleID> |
None |
<ChannelSamples> | No | An element of a <NamingConvention> that contains attributes relating to the creation of channel sample identification values. | <NamingConvention> | <MinDigits> |
<SampleID> | No | An element describing the structure of a channel sample identification code. An ID can comprise both static and variable elements with supporting <Parameter key=...> elements. | <NamingConvention> |
<BaseString> <Parameter key=...> |
<MinDigits> | No | An element of <ChannelSamples> (above) that describes the number of digits to represent the numeric element of a sample identification label. Values will be front-padded with zeroes if required, to meet the specified value. | <ChannelSamples> | None |
Examples
The following example names new maps with the current date in YYYYMMDD format. The map name is prefixed with “Map_”, includes the current date and is suffixed with a “NW” description:
<?xml version="1.0" encoding="utf-8"?>
</MappingConfiguration>
<NamingConventions>
<Map>
<BaseString>Map_{Date}_NW</BaseString>
<Parameter key="Date">DATE_YYYYMMDD</Parameter>
</Map>
</NamingConventions>
</MappingConfiguration>
Note: the “DATE_” element of the first parameter key can be followed with alternative date format expressions, e.g. “DATE_YYYYDDMM” etc.
This example relates to the naming convention used for channel samples, ensuring all samples start with the static text "ID-" followed by a unique index (using the special "ID" variable), where the ID is constrained to always display four digits (controlled by <MinDigits>.
<?xml version="1.0" encoding="utf-8"?>
</MappingConfiguration>
<NamingConventions>
<SampleID>
<BaseString>Sample{0}</BaseString>
<Parameter key="0">ID</Parameter>
</SampleID>
<ChannelSamples>
<MinDigits>4</MinDigits>
</ChannelSamples>
</NamingConventions>
</MappingConfiguration>