Class StringMatrixReader
java.lang.Object
ubic.gemma.core.util.matrix.AbstractMatrixReader<StringMatrix<String,String>, String>
ubic.gemma.core.util.matrix.StringMatrixReader
Reader for
StringMatrix.
Ported in-tree from ubic.basecode.io.reader.StringMatrixReader as part of the baseCode in-tree
migration; previously consumed via the MatrixUtil.fromBaseCode shim.
- Author:
- Paul Pavlidis
-
Field Summary
Fields inherited from class AbstractMatrixReader
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread(InputStream stream) read(InputStream stream, int maxRows, int numColumnsToSkip) Methods inherited from class AbstractMatrixReader
readHeader
-
Constructor Details
-
StringMatrixReader
public StringMatrixReader()
-
-
Method Details
-
read
- Specified by:
readin classAbstractMatrixReader<StringMatrix<String,String>, String> - Throws:
IOException
-
read
public StringMatrix<String,String> read(InputStream stream, int maxRows, int numColumnsToSkip) throws IOException - Parameters:
stream- input streammaxRows- maximum number of rows to read; -1 means no limitnumColumnsToSkip- how many data columns to skip. 0 or -1 means none; 1 means one column will be skipped, etc.- Returns:
- matrix
- Throws:
IOException- on I/O error
-
read
- Specified by:
readin classAbstractMatrixReader<StringMatrix<String,String>, String> - Throws:
IOException
-
read
- Specified by:
readin classAbstractMatrixReader<StringMatrix<String,String>, String> - Throws:
IOException
-
read
public StringMatrix<String,String> read(String filename, int maxRows, int numColumnsToSkip) throws IOException - Parameters:
filename- file name to read (can be compressed)maxRows- maximum number of rows to read; -1 means no limitnumColumnsToSkip- how many data columns to skip- Returns:
- matrix
- Throws:
IOException- on I/O error
-