Class CellBrowserTabularMatrixWriter
java.lang.Object
ubic.gemma.core.visualization.cellbrowser.CellBrowserTabularMatrixWriter
- All Implemented Interfaces:
ExpressionDataMatrixWriter<SingleCellExpressionDataMatrix<?>, SingleCellExpressionDataVector>, SingleCellExpressionDataMatrixWriter
public class CellBrowserTabularMatrixWriter
extends Object
implements SingleCellExpressionDataMatrixWriter
Generate a tabular matrix format compatible with Cell Browser.
- Author:
- poirigui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAutoFlush(boolean autoFlush) Flush every time a complete line is written.voidsetScaleType(ScaleType scaleType) Set the scale type to use when writing the matrix.voidsetUseBioAssayIds(boolean useBioAssayIds) voidsetUseRawColumnNames(boolean useRawColumnNames) intwrite(Collection<SingleCellExpressionDataVector> vectors, Map<CompositeSequence, Set<Gene>> cs2gene, Writer writer) intwrite(Stream<SingleCellExpressionDataVector> vectors, Map<CompositeSequence, Set<Gene>> cs2gene, Writer writer) intwrite(SingleCellExpressionDataMatrix<?> matrix, Class<? extends SingleCellExpressionDataVector> vectorType, Writer writer) Write the matrix to the given writer.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExpressionDataMatrixWriter
writeMethods inherited from interface SingleCellExpressionDataMatrixWriter
write, write
-
Constructor Details
-
CellBrowserTabularMatrixWriter
public CellBrowserTabularMatrixWriter()
-
-
Method Details
-
write
public int write(SingleCellExpressionDataMatrix<?> matrix, Class<? extends SingleCellExpressionDataVector> vectorType, Writer writer) throws IOException, UnsupportedOperationException Description copied from interface:ExpressionDataMatrixWriterWrite the matrix to the given writer.- Specified by:
writein interfaceExpressionDataMatrixWriter<SingleCellExpressionDataMatrix<?>, SingleCellExpressionDataVector>- Parameters:
vectorType- the type of vectors to write. This helps the writer determine how theQuantitationTypeof the matrix should be interpreted.- Returns:
- the number of vectors written
- Throws:
UnsupportedOperationException- if the matrix cannot be written to a text output (i.e. if this is a binary format).IOException
-
write
public int write(Stream<SingleCellExpressionDataVector> vectors, @Nullable Map<CompositeSequence, Set<Gene>> cs2gene, Writer writer) throws IOException - Throws:
IOException
-
write
public int write(Collection<SingleCellExpressionDataVector> vectors, @Nullable Map<CompositeSequence, Set<Gene>> cs2gene, Writer writer) throws IOException - Throws:
IOException
-
setUseBioAssayIds
public void setUseBioAssayIds(boolean useBioAssayIds) -
setUseRawColumnNames
public void setUseRawColumnNames(boolean useRawColumnNames) -
setAutoFlush
public void setAutoFlush(boolean autoFlush) Description copied from interface:ExpressionDataMatrixWriterFlush every time a complete line is written.This is not very efficient, but it can be used to view the output of a matrix as it is being written.
- Specified by:
setAutoFlushin interfaceExpressionDataMatrixWriter<SingleCellExpressionDataMatrix<?>, SingleCellExpressionDataVector>
-
setScaleType
Description copied from interface:ExpressionDataMatrixWriterSet the scale type to use when writing the matrix.When null, the original values must be used.
- Specified by:
setScaleTypein interfaceExpressionDataMatrixWriter<SingleCellExpressionDataMatrix<?>, SingleCellExpressionDataVector>
-