Class MatrixWriter
- java.lang.Object
-
- ubic.gemma.core.datastructure.matrix.MatrixWriter
-
public class MatrixWriter extends Object
- Author:
- pavlidis
-
-
Constructor Summary
Constructors Constructor Description MatrixWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(Writer writer, ExpressionDataMatrix<?> matrix, Map<CompositeSequence,Collection<Gene>> geneAnnotations, boolean writeHeader, boolean orderByDesign)
void
write(Writer writer, ExpressionDataMatrix<?> matrix, Map<CompositeSequence,Collection<Gene>> geneAnnotations, boolean writeHeader, boolean writeSequence, boolean writeGeneInfo, boolean orderByDesign)
void
writeJSON(Writer writer, ExpressionDataMatrix<?> matrix)
void
writeWithStringifiedGeneAnnotations(Writer writer, ExpressionDataMatrix<?> matrix, Map<CompositeSequence,String[]> geneAnnotations, boolean writeHeader)
Alternate method that uses annotations in string form (e.g., read from another file).void
writeWithStringifiedGeneAnnotations(Writer writer, ExpressionDataMatrix<?> matrix, Map<CompositeSequence,String[]> geneAnnotations, boolean writeHeader, boolean writeSequence, boolean writeGeneInfo, boolean orderByDesign)
-
-
-
Method Detail
-
write
public void write(Writer writer, ExpressionDataMatrix<?> matrix, Map<CompositeSequence,Collection<Gene>> geneAnnotations, boolean writeHeader, boolean orderByDesign) throws IOException
- Throws:
IOException
-
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 writewriteHeader
- the writer headerwriter
- the writer to use- Throws:
IOException
- when the write failed- See Also:
ArrayDesignAnnotationServiceImpl.readAnnotationFileAsString(ArrayDesign)
-
writeWithStringifiedGeneAnnotations
public void writeWithStringifiedGeneAnnotations(Writer writer, ExpressionDataMatrix<?> matrix, 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 headermatrix
- the matrixorderByDesign
- if true, the columns are in the order defined by ExpressionDataMatrixColumnSort.orderByExperimentalDesignwriteGeneInfo
- whether to write gene infowriter
- the writer to usewriteSequence
- whether to write sequence- Throws:
IOException
- when the write failed
-
write
public void write(Writer writer, ExpressionDataMatrix<?> matrix, 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.orderByExperimentalDesignwriteSequence
- whether to write sequencewriter
- the writer to usewriteGeneInfo
- whether to write gene infomatrix
- the matrixwriteHeader
- the writer headergeneAnnotations
- 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
-
writeJSON
public void writeJSON(Writer writer, ExpressionDataMatrix<?> matrix) throws IOException
- Throws:
IOException
-
-