Class MatrixWriter

    • Constructor Detail

      • MatrixWriter

        public MatrixWriter()
    • Method Detail

      • writeWithStringifiedGeneAnnotations

        public void writeWithStringifiedGeneAnnotations​(Writer writer,
                                                        ExpressionDataMatrix<?> matrix,
                                                        Map<CompositeSequence,​String[]> geneAnnotations,
                                                        boolean writeHeader)
                                                 throws IOException
        Alternate method that uses annotations in string form (e.g., read from another file).
        Parameters:
        geneAnnotations - Map of composite sequences to an array of delimited strings: [probe name,genes symbol, gene Name] -- these include the "|" to indicate multiple genes, and originate in the platform annotation files.
        matrix - the matrix to write
        writeHeader - the writer header
        writer - the writer to use
        Throws:
        IOException - when the write failed
        See Also:
        ArrayDesignAnnotationServiceImpl.readAnnotationFileAsString(ArrayDesign)
      • writeWithStringifiedGeneAnnotations

        public void writeWithStringifiedGeneAnnotations​(Writer writer,
                                                        ExpressionDataMatrix<?> matrix,
                                                        @Nullable
                                                        Map<CompositeSequence,​String[]> geneAnnotations,
                                                        boolean writeHeader,
                                                        boolean writeSequence,
                                                        boolean writeGeneInfo,
                                                        boolean orderByDesign)
                                                 throws IOException
        Parameters:
        geneAnnotations - Map of composite sequences to an array of delimited strings: [probe name,genes symbol, gene Name] -- these include the "|" to indicate multiple genes, and originate in the platform annotation files.
        writeHeader - the writer header
        matrix - the matrix
        orderByDesign - if true, the columns are in the order defined by ExpressionDataMatrixColumnSort.orderByExperimentalDesign
        writeGeneInfo - whether to write gene info
        writer - the writer to use
        writeSequence - whether to write sequence
        Throws:
        IOException - when the write failed
      • write

        public void write​(Writer writer,
                          ExpressionDataMatrix<?> matrix,
                          @Nullable
                          Map<CompositeSequence,​Collection<Gene>> geneAnnotations,
                          boolean writeHeader,
                          boolean writeSequence,
                          boolean writeGeneInfo,
                          boolean orderByDesign)
                   throws IOException
        Parameters:
        orderByDesign - if true, the columns are in the order defined by ExpressionDataMatrixColumnSort.orderByExperimentalDesign
        writeSequence - whether to write sequence
        writer - the writer to use
        writeGeneInfo - whether to write gene info
        matrix - the matrix
        writeHeader - the writer header
        geneAnnotations - Map of composite sequences to an array of delimited strings: [probe name,genes symbol, gene Name] -- these include the "|" to indicate multiple genes, and originate in the platform annotation files.
        Throws:
        IOException - when the write failed