Customizing Cross Name Prefixes - IntegratedBreedingPlatform/Documentation GitHub Wiki
Introduction
The BMS supports automated name generation for Crosses based on rules stored in the Breeding Methods table in the database. This is described in further detail on this page. A key aspect of cross names is the prefix portion, often referred to as "cross codes." These are generated by the [CIMCRS] process code. Unlike the other BMS process codes, the behavior of [CIMCRS] can be customized for your BMS installation by modifying the Fieldbook properties file. Information about the default behavior and instructions for customizing it are provided below.
How Cross Name Prefixes are Generated
Cross name prefixes, also called cross codes, are constructed by the system as part of the cross naming process. The [CIMCRS] process code reads the format that is defined in the Crossing properties file, constructs the prefix, and inserts it into the new cross names according to the rest of the rule specified in the Breeding Methods table.
The Crossing properties file can be found inside the commons.jar, embedded in BMSAPI and Fielbook web applications. Edit the crossing.properties file in both jars
As with the Seed Source format definitions, the format for the cross name prefix consists of placeholders that will be replaced during the generation of the string, along with literal characters that are inserted into the string as they are shown in the configuration file. Some elements of these formats rely on variables being present in the nursery or trial, as detailed below.
Example: Default Cross Name Prefix for Nurseries
The default format for cross name prefixes for nurseries is [PROJECT_PREFIX][HABITAT_DESIGNATION][SEASON][LABBR]. Given a nursery with the following details:
- Project Prefix = P1
- Habitat Designation = IB
- Season = A
- Location Abbreviation = L1
The cross name prefix will expand to: P1IBAL1
Placeholders Available to Use in Cross Name Prefixes
Currently, the following placeholders are supported in the cross name prefix format string:
- [PROJECT_PREFIX] replaced by the value of PROJECT_PREFIX (cvterm id = 3001) variable if it is present in nursery settings or trial instance settings and has a non empty value. Defaulted to empty string otherwise.
- [HABITAT_DESIGNATION] replaced by the value of HABITAT_DESIGNATION variable (cvtermId = 3002) variable if it is present in nursery settings or trial instance settings and has a non empty value. Defaulted to empty string otherwise.
- [SEASON] replaced by the value of SEASON_VAR (cvterm id = 8371) variable if it is present in nursery/trial settings and has a non empty value. Defaulted to current year and month in YYYYMM format otherwise.
- [LOCATION] replaced by the value of LOCATION_ABBR (cvterm id = 8189) variable if it is present in nursery/trial settings and has a non empty value. Defaulted to empty string otherwise.
- [LABRR] replaced by the value of the instance location abbreviation for the first instance of the study.
Changing the Cross Name Prefix Formats
If you need to change the default formats to match your institution's standards, you can do so by editing the format definitions in the Crossing properties file.
The Crossing properties file can be found inside the commons.jar, embedded in BMSAPI and Fielbook web applications. Edit the crossing.properties file in both jars
Edit this property in the file to change the way the cross name prefixes are generated:
- breeders.cross.id.study=[PROJECT_PREFIX][HABITAT_DESIGNATION][SEASON][LABBR]
You can add, remove, or rearrange the placeholders listed above to specify the elements you would like in the cross name prefix, and also their order. You can also add, remove, or change the separator characters between the elements, and add literal strings that will be inserted as-is.
Once you have saved your changes to the properties file, you will need to restart the BMS before they will take effect.