Class ExpressionDataWriterUtils


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

      • ExpressionDataWriterUtils

        public ExpressionDataWriterUtils()
    • Method Detail

      • appendBaseHeader

        public static void appendBaseHeader​(ExpressionExperiment experiment,
                                            String fileTypeStr,
                                            @Nullable
                                            String experimentUrl,
                                            BuildInfo buildInfo,
                                            Writer buf)
                                     throws IOException
        Appends base header information (about the experiment) to a file.
        Parameters:
        buf - buffer
        fileTypeStr - file type str
        experiment - ee
        experimentUrl - an URL for the expriment, or null to ommit
        Throws:
        IOException
      • constructSampleName

        public static String constructSampleName​(BulkExpressionDataMatrix<?> matrix,
                                                 int assayColumnIndex)
        Constructs a sample name for a given column of a data matrix.
        Parameters:
        matrix - matrix
        assayColumnIndex - The column index in the matrix.
        Returns:
        BA name
      • constructSampleName

        public static String constructSampleName​(BioMaterial bm,
                                                 BioAssay ba)
        Construct a sample name in case there is only one BioAssay attached to the corresponding BioMaterial.
      • 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
      • constructSampleExternalId

        public static String constructSampleExternalId​(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.