Interface ExpressionDataMatrixWriter<T extends ExpressionDataMatrix<?>,VT extends DataVector>
- All Known Subinterfaces:
BulkExpressionDataMatrixWriter,SingleCellExpressionDataMatrixWriter
- All Known Implementing Classes:
CellBrowserTabularMatrixWriter,JsonMatrixWriter,MatrixWriter,MexMatrixWriter,TabularMatrixWriter
public interface ExpressionDataMatrixWriter<T extends ExpressionDataMatrix<?>,VT extends DataVector>
Base interface for writing
ExpressionDataMatrix.- Author:
- poirigui
-
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.default intwrite(T matrix, Class<? extends VT> vectorType, OutputStream stream) Write the matrix to the given output stream.intWrite the matrix to the given writer.
-
Method Details
-
setAutoFlush
void setAutoFlush(boolean autoFlush) 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.
-
setScaleType
Set the scale type to use when writing the matrix.When null, the original values must be used.
-
write
int write(T matrix, Class<? extends VT> vectorType, Writer writer) throws IOException, UnsupportedOperationException Write the matrix to the given writer.- 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
Write the matrix to the given output stream.- Returns:
- the number of vectors written
- Throws:
IOException
-