Traits
KDSmart facilitates the recording or scoring of traits for trials and nurseries. Traits are usually phenotypic information although this arbitrary.
KDSmart scoring screens are designed to allow quick recording of measurements, usually with a single touch.
Traits can be defined with validation rules to facilitate strict data capture rules to assist in preventing recording errors. These rules can also be utilised to also make scoring more efficient by minimising the required keystrokes.
The Traits Screen (pictured below) provides a list of all available traits and options for management of traits including importing and exporting.
What is a Trait?
Traits are the quality or characteristic being inspected, measured and recorded for the organism. Within KDSmart, traits have the following characteristics and features:
User definable;
Defined by six different data types;
Optionally lockable once scored to prevent accidental change;
Importable and exportable;
Can be grouped into bundles for easier management; and
Are either plot level or sub-plot level.
A measurement is stored for each trait instance in each plot or sub-plot includes the:
Date and time when the measurement was taken;
GPS coordinates (if this is enabled); and
Value of the measurement.
Some examples of traits include the height of a plant (this might be called Plant_Height) or the date that a plot was irrigated (which could be called Irrigated).
Trait Attributes
Each trait contains a set of attributes that define its characteristics. The following table lists the attributes of a trait:
Attribute |
Description |
---|---|
Trait Name |
Must be unique and short for display in the Scoring Screen where space is limited on smaller devices (i.e. phones). |
Alias |
An alternative trait name, useful when the trait name is too long for the screen. |
Description |
This is an optional longer explanation of the trait to assist in data entry. |
Data Type |
Constrains permitted values of traits. Types available are:
For details refer to Trait Data Types |
Unit |
An arbitrary term for the unit of the trait to assist with what value to enter when scoring (e.g. measurement in millimetres or centimetres). |
Validation Rule |
The validation rule optionally restricts the values being entered. The nature of the rule is dependent upon the selection of a data type. |
Tip
Within the Scoring Screen, a long press of any trait name will:
Display the trait details; and
Allow editing of the trait value if it is locked.
Note
Traits loaded from CSV all default to the TEXT data type unless they have previously been loaded or defined. Once loaded you may edit the trait definition to define its data type etc.
Note
Unless specified in the CSV, traits loaded from CSV default to the TEXT data type. If the Trait already exists and is not yet scored unless they have previously been loaded or defined. Once loaded you may edit the trait definition to define its data type etc.
Trait Instances
A trial consists of plots and sub-plots which have traits for scoring. Furthermore, KDSmart allows you to score each trait multiple times - this is called a Trait Instance. The benefit of instancing traits is that they are easier to create and manage because only one trait needs to be managed rather than separate ones. Having separate traits also creates more work for data analysis and curation in KDXplore.
For example, you may wish to score PH_Soil three times: after 3 weeks, after 5 weeks and after 7 weeks. You can either:
Define three different traits (e.g. PH_Soil1, PH_Soil2, and PH_Soil3).
Define three instances of the single trait (e.g. PH_Soil #1, PH_Soil #2, and PH_Soil #3).
Trait Naming
When preparing traits it is recommended that the use spaces in trait names are avoided and underscores are used instead. For example instead of Plant Height use Plant_Height.
Should KDXplore software be used after scoring it has the ability to calculate trait values from other traits, however, is restricted if trait names contain spaces.
Trait Data Types
The following table describes the available data types for traits:
Data Type |
Description |
Data Entry Style |
Example Validation Rule |
---|---|---|---|
TEXT |
No constraint on what may be entered. |
A text input field with a full keyboard. |
No rule required. |
CATEGORICAL |
Value is constrained to be one from a list of allowed values. |
A list of the allowed values is presented and the user touches the value desired. |
Example: |
DATE |
Value is a date. |
A calendar is presented from which to choose a date. |
May be left blank or specified as date. |
ELAPSED_DAYS |
Value is the number of days since the trial’s planting date. |
A list of days around the current date are presented and the user selects the desired value or chooses ‘Other’ to use a calendar to pick a date outside this range. |
May be left blank or specified as |
INTEGER |
Integer numeric values in a range specified. |
If the number of values is ‘small’ then the entry is similar to the categorical data type. Otherwise, a numeric keypad is presented (excluding a decimal point key). |
Specify the range of values as: |
DECIMAL |
Specify a lower and upper bound and whether or not the bounds are included in the range and the number of digits of precision that will be recorded. |
Entry is done using a numeric keypad that includes the decimal point. |
RANGE(min..max) |
CALC |
Calculated or Derived Trait. |
Data entry is not permitted for this type. |
A simple calculated or derived trait is: |
Calculated or Derived Traits
The validation rule has either one or two components (with a comma separating them if required):
The first component provides a formula that may reference other traits (by the trait name), using the operators and functions listed below.
If present, the second component indicates the number of decimal digits to retain in the computed result.
The functions available are in a table below. Arithmetic operators are:
* / % (the last is the modulo operation)
+ - (unary minus is also supported)
^ ** (for exponentiation).
Note
The comparison operators: < <= = != > >= and the logical operators: && || evaluate to either 1 or 0 representing true or false respectively. This is relevant for the if(cond,a,b) function.
Functions Available For CALC Data Type
The following table describes the functions available for the CALC data type.
Function Name(s) |
Description |
Example |
---|---|---|
sin cos tan asin acos atan |
Trigonometric functions |
|
sinh cosh tanh |
Hyperbolic functions |
|
abs round floor ceil sqrt exp ln log sign |
Unary mathematical functions: |
round(1.5) returns 2.0 |
pow min max |
Binary mathematical functions |
pow(2,3) returns 8.0 |
rnd deg(radians) rad(degrees) |
Other functions: |
rnd(10) will return a value y satisfying: |
if(expr , a , b) |
Conditional expression: |
if(PH_CM <= 5 , 1 , 2) |
Tip
Why can’t I import my CALC trait?!
Ensure validation rules using comma’s (e.g. CALC( max(PH_CM/5,1) , 1 )) are wrapped by double quotes (e.g. “CALC( max(PH_CM/5,1) , 1 )”). Excel handles this automatically.
Ensure the number of opening and closing brackets match (It’s an easy thing to miss at a glance).
Trait names that use white spaces in their names cannot be used for derived CALC traits.
Categorical Traits
At times during scoring, the precision level required can vary. This may be dictated by a number of factors, e.g. sheer volume of specimens, time frame for data collection, reduced/limited people to perform the scoring, etc. In these instances, the Categorical trait may be useful.
Typicall, categories are used for constraining the data entered to a predefined list of values, such as the following definitions:
CHOICE(BLUE | YELLOW | RED); and
CHOICE(White | Yellow | Purple | Variegated | Brown | Orange yellow | Mottled | White top | Red | Sun red | Blue | Other).
A categorical other trait is one where an other field can be used as a text field. In this case, the user can choose either a category that is provided to them, or the other field to enter their own text.
Note
In these examples, the pipe character ‘|’ is shown with a space character either side to improve legibility.
Using Categorical Traits
In some situations using a categorical data type may be more beneficial as this facilitates the use of selection ranges instead of data entry.
The following table illustrates the collection of plant height using both methods:
Trait Defined as Integer |
Trait Defined as Categorical |
|
---|---|---|
Entry Method |
Plant height entered by selecting a value buttons. |
Plant height entered by selecting a value range from a list. |
Conditions |
Trait validation with a minimum of 5 and maximum of 50 |
Trait validation with six ranges defined (e.g. The unit of measure may be 5 centimetres). |
Validation Rule |
5 <= x <= 50 |
CHOICE(5-10 | 10-15 | 15-20 | 20-25 | 25-30 | 30++). |
Key Presses |
Minimum 2 button press per sub-plot (single digit) then Accept Button. |
Minimum 1 button press per sub-plot, unless a long condition list requires scrolling. |
Note
For a categorical trait, the number of choices may be limited to suit the circumstances of the trial stage.