Package net.sf.basedb.util.affymetrix
Class CdfValidator
java.lang.Object
net.sf.basedb.util.affymetrix.CdfValidator
Helper class for working with Affymetrix CDF files.
- Since:
- 3.0
- Author:
- Nicklas
- Last modified
- $Date: 2011-05-06 14:09:13 +0200 (fr, 06 maj 2011) $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
checkIfReportersExists
(affymetrix.fusion.cdf.FusionCDFData cdf, ReporterBatcher batcher, boolean create, ReporterType type, ProgressReporter progress) Verify if probesets in a CDF file exists as reporters and optionally create those that doesn't exists.void
copyMetadata
(affymetrix.fusion.cdf.FusionCDFData cdf, ArrayDesign design) Copy metadata from the CDF file to the array design.affymetrix.fusion.cdf.FusionCDFData
loadCdfFile
(File cdfFile) Load a CDF file using the Affymetric Fusion SDK.void
resetMetadata
(ArrayDesign design) Reset metadata on the given array design.
-
Constructor Details
-
CdfValidator
public CdfValidator()Create a new instance.
-
-
Method Details
-
loadCdfFile
public affymetrix.fusion.cdf.FusionCDFData loadCdfFile(File cdfFile) throws ItemNotFoundException, InvalidDataException Load a CDF file using the Affymetric Fusion SDK. This method checks that the file exists, and read all headers.- Parameters:
cdfFile
- The file to load- Returns:
- A FusionCDFData object representing the CDF file
- Throws:
ItemNotFoundException
- If the actual file is not on the serverInvalidDataException
- If the file is not a CDF file
-
copyMetadata
Copy metadata from the CDF file to the array design. This sets the number of features to the number of probesets.- Parameters:
cdf
- The CDF filedesign
- The array design
-
resetMetadata
Reset metadata on the given array design. This set the number of features to 0.- Parameters:
design
- The array design
-
checkIfReportersExists
public int checkIfReportersExists(affymetrix.fusion.cdf.FusionCDFData cdf, ReporterBatcher batcher, boolean create, ReporterType type, ProgressReporter progress) throws ItemNotFoundException, BaseException Verify if probesets in a CDF file exists as reporters and optionally create those that doesn't exists. This method will clear the CDF file, read it, and then clear it again. The calling code is responsible for committing the transaction.- Parameters:
cdf
- The CDF filebatcher
- A reporter batcher used to check and insert reporterscreate
- TRUE to create non-existing reporters, FALSE to throw an ItemNotFoundExceptiontype
- The reporter type to assign to new reporters (if create is true)progress
- An optional progress reporter- Returns:
- The number of created reporter
- Throws:
ItemNotFoundException
- If create is FALSE and a reporter isn't foundBaseException
- If there is another error- Since:
- 2.4
-