Class ExpressionDataWriterUtils


  • public class ExpressionDataWriterUtils
    extends Object
    Author:
    keshav
    • Field Detail

      • DELIMITER_BETWEEN_BIOMATERIAL_AND_BIOASSAYS

        public static final String DELIMITER_BETWEEN_BIOMATERIAL_AND_BIOASSAYS
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExpressionDataWriterUtils

        public ExpressionDataWriterUtils()
    • 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 - buffer
        experiment - ee
        fileTypeStr - 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 - buffer
        design - design
        experiment - ee
      • 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 - matrix
        assayColumnIndex - 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 - BAs
        bioMaterial - BM
        Returns:
        String representing the external identifier of the biomaterial. This will usually be a GEO or ArrayExpression accession id, or else blank.