Class Base1FieldConverter

  • All Implemented Interfaces:
    ExportableFieldConverter

    public class Base1FieldConverter
    extends StandardFieldConverter
    Exportable field converter that support BASE 1 naming conventions. This implementation rely in most cases on formulas with the same name as the BASE 1 field. BASE 1 fields that happens to have the same name in BASE 2 doesn't need formulas.

    This class extends the standard field converter and only overrides methods that is used by the Base1PluginExecuter so thatit can work as expected. The major differences are the name of intensity fields and the _xc_ prefix on extra value fields.

    Version:
    2.15
    Author:
    Nicklas
    Last modified
    $Date: 2010-03-22 13:45:37 +0100 (må, 22 mar 2010) $
    • Constructor Detail

      • Base1FieldConverter

        public Base1FieldConverter​(DbControl dc,
                                   BioAssaySet source)
        Create a new converter for the given bioassay set.
        Parameters:
        dc - A DbControl to use for database access
        source - The source bioassay set
    • Method Detail

      • getReporterField

        public DynamicField getReporterField​(String name,
                                             boolean required)
        Convert a reporter field. The conversion is done in steps until a match is found:
        • If the field starts with '_xc_' it could be an extra value. We check if there is a position extra value with an external id that is the same as the rest of the field (eg. without the _xc_ prefix).
        • Check if a formula that has the exactly the same name as the given field name exists. The formula must be a column expression and it must usable on the raw data type and the intensity transform that the source bioassay set uses.
        • Check if an extended reporter property with exactly the same name as the given field name exists.
        Specified by:
        getReporterField in interface ExportableFieldConverter
        Overrides:
        getReporterField in class StandardFieldConverter
        Parameters:
        name - The BASE 1 field name
        required - Controls if null is returned or an exception is thrown when a field is not found
        Returns:
        A DynamicField expression or null if the field name can't be converted
      • getSpotField

        public DynamicField getSpotField​(String name,
                                         boolean required)
        Convert a spot field. The conversion is done in steps until a match is found:
        • If the field starts with '_xc_' it could be an extra value. We check if there is an spot extra value with an external id that is the same as the rest of the field (eg. without the _xc_ prefix).
        • Check if a formula that has the exactly the same name as the given field name exists. The formula must be a column expression and it must usable on the raw data type and the intensity transform that the source bioassay set uses.
        • Check if a raw data property with exactly the same name as the given field name exists.
        • Check if the field name is 'intensityX' where 'X' is a channel number.
        Specified by:
        getSpotField in interface ExportableFieldConverter
        Overrides:
        getSpotField in class StandardFieldConverter
        Parameters:
        name - The BASE 1 field name
        required - Controls if null is returned or an exception is thrown when a field is not found
        Returns:
        A DynamicField expression or null if the field name can't be converted
      • getIntensityField

        protected DynamicField getIntensityField​(String fieldName,
                                                 String exportTitle)
        Create a dynamic field for spot intensity if the field name has the pattern 'intensityX' where 'X' is a channel number between 1 and the number of channels in the raw data type used by the source bioassay set.
        Overrides:
        getIntensityField in class AbstractFieldConverter
        Parameters:
        fieldName - The field name
        Returns:
        A dynamic field, or null if the name doesn't match the pattern