This topic is under construction for the 21.11 (November 2021) release of LabKey Server.

This topic will cover naming patterns for generating unique sample IDs for Aliquots. Aliquots can be generated from samples using LabKey Biologics or Sample Manager. The Aliquot Naming Pattern is included in the definition of a Sample Type in those applications. If it is left blank, the default is used.

As with Sample Naming Patterns, your Aliquot Naming Pattern can incorporate strings, values from other columns, different separators, etc. provided that your aliquots always will have unique names. It is best practice to always include the AliquotedFrom column, i.e. the name of the parent sample, but this is not strictly required by the system.

Note that Aliquots do not have their own properties - they "share" the properties of the sample from which they were aliquoted. As such, you cannot use Sample Type properties in the creation of aliquot names (unless those properties are already included in the name of the samples themselves).

withCounter Syntax

Using nested substitution syntax, you can include a counter specific to the value in the AliquotedFrom column (the originating Sample ID). These counters will guarantee unique values, i.e. will skip a count if a sample already exists using that name, giving you a reliable way to create unique and clear aliquot names.

Prefix the :withCounter portion with the expression that should be evaluated first, then surround the entire expression with ${ } brackets. Like sample naming expressions, the base expression may incorporate strings, and other tokens to generate the desired final aliquot name.

Default Pattern (Dash Count)

By default, the name of the aliquot will use the name of its parent sample followed by a dash and a counter for that parent’s aliquots.


For example, if the original sample is S1, aliquots of that sample will be named S1-1, S1-2, etc.

Dot Count

To generate aliquot names with "dot count", such as S1.0, S1.1, an admin can set the Sample Type's aliquot naming pattern to:


Start Counter at Value

To have the aliquot counter start at a specific number other than the default 0, such as S1.1001, S1.1002., set the aliquot naming pattern to:


Set Number of Digits

To use a fixed number of digits, use number pattern formatting. For example, to generate S1-001, S1-002, use:

${${AliquotedFrom}-:withCounter(1, '000')}


Aliquot Naming PatternGenerated aliquot names
BLANKS1-1, S1-2
${${AliquotedFrom}-:withCounter}S1-1, S1-2
${${AliquotedFrom}-:withCounter(1000)}S1-1000, S1-1001
${${AliquotedFrom}-:withCounter(1, '000')}S1-001, S1-002
${${AliquotedFrom}.:withCounter}S1.1, S1.2

Related Topics


Was this content helpful?

Log in or register an account to provide feedback

expand all collapse all