3.2.4: 2013-12-06

net.sf.basedb.util.affymetrix
Class CelValidator

java.lang.Object
  extended by net.sf.basedb.util.affymetrix.CelValidator

public class CelValidator
extends Object

Helper class for working with Affymetrix CEL files.

Since:
3.0
Author:
Nicklas
Last modified
$Date: 2011-05-06 14:09:13 +0200 (Fri, 06 May 2011) $

Constructor Summary
CelValidator()
          Create a new instance.
 
Method Summary
 void copyMetadata(affymetrix.fusion.cel.FusionCELData cel, RawBioAssay rba)
          Copy metadata from the CEL file to the raw bioassay.
 affymetrix.fusion.cel.FusionCELData loadCelFile(File celFile)
          Load a CEL file using the Affymetric Fusion SDK.
 void resetMetadata(RawBioAssay rba)
          Reset metadata on the given raw bioassay.
private  void setHeader(RawBioAssay rba, String name, String value)
           
 void validateCelAndCdf(affymetrix.fusion.cel.FusionCELData cel, affymetrix.fusion.cdf.FusionCDFData cdf, String cdfChipType)
          Check if the loaded CEL and CDF files matches.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CelValidator

public CelValidator()
Create a new instance.

Method Detail

setHeader

private void setHeader(RawBioAssay rba,
                       String name,
                       String value)

loadCelFile

public affymetrix.fusion.cel.FusionCELData loadCelFile(File celFile)
Load a CEL file using the Affymetric Fusion SDK. This method checks that the file exists, and read all headers.

Parameters:
celFile - The file to load
Returns:
A FusionCELData object representing the CEL file
Throws:
ItemNotFoundException - If the actual file is not on the server
InvalidDataException - If the file is not a CEL file

copyMetadata

public void copyMetadata(affymetrix.fusion.cel.FusionCELData cel,
                         RawBioAssay rba)
Copy metadata from the CEL file to the raw bioassay. This will set the mumber of spots and headers from the file.

Parameters:
cel - The CEL file
rba - The raw bioassay

resetMetadata

public void resetMetadata(RawBioAssay rba)
Reset metadata on the given raw bioassay. This set the number of spots to 0 and remove all headers.

Parameters:
rba - The raw bioassay

validateCelAndCdf

public void validateCelAndCdf(affymetrix.fusion.cel.FusionCELData cel,
                              affymetrix.fusion.cdf.FusionCDFData cdf,
                              String cdfChipType)
                       throws InvalidDataException
Check if the loaded CEL and CDF files matches. The chip type is verified. Unfortunately the chip type is not stored inside the CDF file, but has to be given as an extra parameter. Typically, this should be the name of the file. This method also verify that the number rows and columns in the two files matches.

Parameters:
cel - The CEL fila data
cdf - The CDF file data
cdfChipType - The CDF chip type
Throws:
InvalidDataException

3.2.4: 2013-12-06