A sequence selection is a specification of the sequence name component of the data. That is, a sequence selection only selects the name of the sequence with the times depending on the referencing context. In most contexts there are implied defaults for the matched components. For example, a station and archive is often implied by the context the sequence selection is used in.

In the most general form, a sequence selection is an array of hash values. Each element of the array specifies a single selection and all elements are combined together to create the final selection. For example, one element to select each of several variables.

In this context each element of the array is a hash with key values specifying the sequence name components.

Station

The text station code regular expression. This regular expression is matched against the entire station, ignoring case. So, if it contains no special characters, it can be treated as the full name of the station.

Archive

The text archive regular expression. This regular expression is matched against the entire archive name, ignoring case. So, if it contains no special characters, it can be treated as the full name of the archive.

Variable

The text variable regular expression. This regular expression is matched against the entire variable name and is case sensitive. So, if it contains no special characters, it can be treated as the full name of the variable.

HasFlavors

An array of text required flavors regular expressions. This is an array of regular expressions that are matched against the present flavors in the sequence name. All elements of the array are required to match at least one present flavor. This can also be simplified into simply a string (instead of an array), which is split by : then converted as if it was an array.

LacksFlavors

An array of text excluded flavors regular expressions. This is an array of regular expressions that are matched against the present flavors in the sequence name. If any element of the array matches a present data flavor, then the sequence name does not match the selection. In most contexts, this has a default of excluding the "cover", "stats" and "end" flavors, unless override. This can also be simplified into simply a string (instead of an array), which is split by : then converted as if it was an array.

Flavors

An array of text exact flavors regular expressions. This is an array of regular expressions that are matched against the present flavors in the sequence name. The required flavors must match the sequence name flavors on a one-to-one basis. This can also be simplified into simply a string (instead of an array), which is split by : then converted as if it was an array.

Full selection
/#0/Station,"bnd"
/#0/Archive,"raw"
/#0/Variable,"T_S11"
/#0/HasFlavors/#0,"pm1"
Multiple regular expression
/#0/Variable,"(T|P)_S11"
/#1/Variable,"Q_A11"

The first alternate form of the sequence selection omits the array. In this form, it is treated as a single matching element with the above keys valid.

Simple component match
/Variable,"BsG_S11"
/Archive,"clean"

Another alternate form is simply a single text element specifying a combined selection. This is treated much like the command line selection syntax. In the most basic and most common form, this is simply a regular expression matching the variable component of the sequence name. However, it can be elaborated into the various components by splitting it with :. In this context, if it has two components, the first is the archive and the second the variable. If it has three, the first is the station, the second the archive and the third is the variable. If it has four or more components, the first tree are the same and any subsequent ones are flavor selections. If a flavor selection has no leading character or begins with + then it is added to the required flavors. A flavor starting with - is added to the excluded flavors and one with = is added to the exact flavors, which then take precedence.

Basic text
"T_S11"
Complex text
"bnd::(T|P)_S11:pm1"