Class MatrixSpotIntensityEventHandler

All Implemented Interfaces:

public class MatrixSpotIntensityEventHandler
extends Object
implements EventHandler
Event handler that extracts spot intensity information from matrix BFS data files and inserts the values to a spot batcher. In the matrix format there is one data file per channel. In each file there should be one data column for each assay. All data files should have the same column layout and the same number of lines. For example, file1.txt contains data for channel 1 and file2.txt contains data for channel 2. In both files the first column (index=0) has intensity for assay #1 and the second column (index=1) has intensity for assay #2.

This event handler is designed to work together with a SynchronizedSpotDataParser and will only react to SynchronizedSpotDataParser.DATA_EVENT events.

Last modified
$Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $
  • Field Details

    • spotBatcher

      private final SpotBatcher spotBatcher
    • positionHandler

      private final PositionEventHandler positionHandler
    • assays

      private final BioAssay[] assays
    • chIndex

      private final int[] chIndex
    • ch

      private float[] ch
  • Constructor Details

    • MatrixSpotIntensityEventHandler

      public MatrixSpotIntensityEventHandler​(SpotBatcher spotBatcher, PositionEventHandler positionHandler, BioAssay[] assays, int[] chIndex)
      Create a new spot instensity event handler.
      spotBatcher - The spot batcher that should receive the intensity data
      positionHandler - The event handler that is responsible for extracting position information from the reporter annotations file
      assays - An array with all assays in the same order that they appeared in the pdata file
      chIndex - An array with file indexes for channel intensities, first value is the file index for channel 1. The first file has index = 0. The size of this array should match the number of channels in the experiment.
  • Method Details

    • handleEvent

      public void handleEvent​(EventType eventType, Object eventData, BfsParser parser)
      Extract the spot intensity values from the data files and batch insert them using the spot batcher. If all channels are empty, no data will be inserted for that spot, otherwise a null value will be inserted for the missing channels. The parser will treat invalid values as empty columns.
      Specified by:
      handleEvent in interface EventHandler
      eventType - The type of event. See the parser documentation for more information about the event types it generates
      eventData - The data that is associated with the event
      parser - The parser that is resposible for parsing the file