org.genepattern.io.expr.cls
Class ClsParser

java.lang.Object
  extended byorg.genepattern.io.expr.cls.ClsParser

public class ClsParser
extends java.lang.Object

Class for reading cls files using callbacks.

The CLS files are simple files created to load class information into GeneCluster. These files use spaces to separate the fields.

  • The first line of a CLS file contains numbers indicating the number of samples and number of classes. The number of samples should correspond to the number of samples in the associated RES or GCT data file.
    • Line format: (number of samples) (space) (number of classes) (space) 1
    • For example: 58 2 1
  • The second line in a CLS file contains names for the class numbers. The line should begin with a pound sign (#) followed by a space.
    • Line format: # (space) (class 0 name) (space) (class 1 name)
    • For example: # cured fatal/ref.
  • The third line contains numeric class labels for each of the samples. The number of class labels should be the same as the number of samples specified in the first line.
    • Line format: (sample 1 class) (space) (sample 2 class) (space) ... (sample N class)
    • For example: 0 0 0 ... 1


Constructor Summary
ClsParser()
           
 
Method Summary
 boolean canDecode(java.io.InputStream in)
           
 java.util.List getFileSuffixes()
           
 java.lang.String getFormatName()
           
 void parse(java.io.InputStream is)
          Parses the InputStream to create a ClassVector instance
 void setHandler(IClsHandler handler)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClsParser

public ClsParser()
Method Detail

canDecode

public boolean canDecode(java.io.InputStream in)

parse

public void parse(java.io.InputStream is)
           throws java.io.IOException,
                  ParseException
Parses the InputStream to create a ClassVector instance

Parameters:
is - The input stream
Throws:
ParseException - If there is a problem with the data
java.io.IOException - if an I/O error occurs while reading the stream.

setHandler

public void setHandler(IClsHandler handler)

getFormatName

public java.lang.String getFormatName()

getFileSuffixes

public java.util.List getFileSuffixes()


Hosted by docs.bugaco.com