Class CellBrowserTabularMatrixWriter
- java.lang.Object
-
- ubic.gemma.core.visualization.cellbrowser.CellBrowserTabularMatrixWriter
-
- All Implemented Interfaces:
ExpressionDataMatrixWriter<SingleCellExpressionDataMatrix<?>>
,SingleCellExpressionDataMatrixWriter
public class CellBrowserTabularMatrixWriter extends Object implements SingleCellExpressionDataMatrixWriter
Generate a tabular matrix format compatible with Cell Browser.- Author:
- poirigui
-
-
Constructor Summary
Constructors Constructor Description CellBrowserTabularMatrixWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setAutoFlush(boolean autoFlush)
Flush every time a complete line is written.void
setScaleType(ScaleType scaleType)
Set the scale type to use when writing the matrix.void
setUseBioAssayIds(boolean useBioAssayIds)
void
setUseRawColumnNames(boolean useRawColumnNames)
int
write(Collection<SingleCellExpressionDataVector> vectors, Map<CompositeSequence,Set<Gene>> cs2gene, Writer writer)
int
write(Stream<SingleCellExpressionDataVector> vectors, Map<CompositeSequence,Set<Gene>> cs2gene, Writer writer)
int
write(SingleCellExpressionDataMatrix<?> matrix, Writer writer)
Write the matrix to the given writer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.datastructure.matrix.io.ExpressionDataMatrixWriter
write
-
-
-
-
Method Detail
-
setUseBioAssayIds
public void setUseBioAssayIds(boolean useBioAssayIds)
-
setUseRawColumnNames
public void setUseRawColumnNames(boolean useRawColumnNames)
-
setAutoFlush
public void setAutoFlush(boolean autoFlush)
Description copied from interface:ExpressionDataMatrixWriter
Flush 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:
setAutoFlush
in interfaceExpressionDataMatrixWriter<SingleCellExpressionDataMatrix<?>>
-
setScaleType
public void setScaleType(@Nullable ScaleType scaleType)
Description copied from interface:ExpressionDataMatrixWriter
Set the scale type to use when writing the matrix.When null, the original values must be used.
- Specified by:
setScaleType
in interfaceExpressionDataMatrixWriter<SingleCellExpressionDataMatrix<?>>
-
write
public int write(SingleCellExpressionDataMatrix<?> matrix, Writer writer) throws IOException, UnsupportedOperationException
Description copied from interface:ExpressionDataMatrixWriter
Write the matrix to the given writer.- Specified by:
write
in interfaceExpressionDataMatrixWriter<SingleCellExpressionDataMatrix<?>>
- 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
-
-