Class ExpressionDataWriterUtils
- java.lang.Object
-
- ubic.gemma.core.datastructure.matrix.ExpressionDataWriterUtils
-
public class ExpressionDataWriterUtils extends Object
- Author:
- keshav
-
-
Field Summary
Fields Modifier and Type Field Description static String
DELIMITER_BETWEEN_BIOMATERIAL_AND_BIOASSAYS
-
Constructor Summary
Constructors Constructor Description ExpressionDataWriterUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
appendBaseHeader(ExpressionExperiment experiment, boolean design, StringBuffer buf)
Appends base header information (about the experiment) to a file.static void
appendBaseHeader(ExpressionExperiment experiment, String fileTypeStr, StringBuffer buf)
Appends base header information (about the experiment) to a file.static String
constructBioAssayName(ExpressionDataMatrix<?> matrix, int assayColumnIndex)
Constructs a bioassay name.static String
constructBioAssayName(BioMaterial bioMaterial, Collection<BioAssay> bioAssays)
static String
constructFactorValueName(FactorValue factorValue)
Produce a value for representing a factor value.static String
getExternalId(BioMaterial bioMaterial, Collection<BioAssay> bioAssays)
-
-
-
Field Detail
-
DELIMITER_BETWEEN_BIOMATERIAL_AND_BIOASSAYS
public static final String DELIMITER_BETWEEN_BIOMATERIAL_AND_BIOASSAYS
- See Also:
- Constant Field Values
-
-
Method Detail
-
appendBaseHeader
public static void appendBaseHeader(ExpressionExperiment experiment, String fileTypeStr, StringBuffer buf)
Appends base header information (about the experiment) to a file.- Parameters:
buf
- bufferexperiment
- eefileTypeStr
- file type str
-
appendBaseHeader
public static void appendBaseHeader(ExpressionExperiment experiment, boolean design, StringBuffer buf)
Appends base header information (about the experiment) to a file.- Parameters:
buf
- bufferdesign
- designexperiment
- ee
-
constructBioAssayName
public static String constructBioAssayName(BioMaterial bioMaterial, Collection<BioAssay> bioAssays)
-
constructBioAssayName
public static String constructBioAssayName(ExpressionDataMatrix<?> matrix, int assayColumnIndex)
Constructs a bioassay name. This is useful when writing out data to a file.- Parameters:
matrix
- matrixassayColumnIndex
- The column index in the matrix.- Returns:
- BA name
-
constructFactorValueName
public static String constructFactorValueName(FactorValue factorValue)
Produce a value for representing a factor value.In the context of the design file, this is focusing on the value (i.e. subjects or measurement value) itself and not its metadata which are instead exposed in the file header.
Replaces spaces and hyphens with underscores.
- Parameters:
factorValue
- FV- Returns:
- replaced string
-
getExternalId
public static String getExternalId(BioMaterial bioMaterial, Collection<BioAssay> bioAssays)
- Parameters:
bioAssays
- BAsbioMaterial
- BM- Returns:
- String representing the external identifier of the biomaterial. This will usually be a GEO or ArrayExpression accession id, or else blank.
-
-