smile.data.parser.microarray
Class TXTParser
- java.lang.Object
-
- smile.data.parser.microarray.TXTParser
-
public class TXTParser extends java.lang.ObjectTXT gene expression file parser. The TXT format is a tab delimited file format that describes an expression dataset. It is organized as follows:The first line contains the labels Name and Description followed by the identifiers for each sample in the dataset. The Description is optional.
Line format: Name(tab)Description(tab)(sample 1 name)(tab)(sample 2 name) (tab) ... (sample N name)
The remainder of the file contains data for each of the genes. There is one line for each gene. Each line contains the gene name, gene description, and a value for each sample in the dataset. If the first line contains the Description label, include a description for each gene. If the first line does not contain the Description label, do not include descriptions for any gene. Gene names and descriptions can contain spaces since fields are separated by tabs.Example: Name Description DLBC1_1 DLBC2_1 ... DLBC58_0Line format: (gene name) (tab) (gene description) (tab) (col 1 data) (tab) (col 2 data) (tab) ... (col N data)Example: AFFX-BioB-5_at AFFX-BioB-5_at (endogenous control) -104 -152 -158 ... -44
-
-
Constructor Summary
Constructors Constructor and Description TXTParser()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AttributeDatasetparse(java.io.File file)Parse a TXT dataset from given file.AttributeDatasetparse(java.lang.String path)Parse a TXT dataset from given file.AttributeDatasetparse(java.lang.String name, java.io.File file)Parse a TXT dataset from given file.AttributeDatasetparse(java.lang.String name, java.io.InputStream stream)Parse a TXT dataset from an input stream.AttributeDatasetparse(java.lang.String name, java.lang.String path)Parse a TXT dataset from given file.AttributeDatasetparse(java.lang.String name, java.net.URI uri)Parse a TXT dataset from given URI.AttributeDatasetparse(java.net.URI uri)Parse a TXT dataset from given URI.
-
-
-
Method Detail
-
parse
public AttributeDataset parse(java.net.URI uri) throws java.io.IOException, java.text.ParseException
Parse a TXT dataset from given URI.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public AttributeDataset parse(java.lang.String name, java.net.URI uri) throws java.io.IOException, java.text.ParseException
Parse a TXT dataset from given URI.- Parameters:
uri- the URI of data source.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public AttributeDataset parse(java.lang.String path) throws java.io.IOException, java.text.ParseException
Parse a TXT dataset from given file.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public AttributeDataset parse(java.lang.String name, java.lang.String path) throws java.io.IOException, java.text.ParseException
Parse a TXT dataset from given file.- Parameters:
path- the file path of data source.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public AttributeDataset parse(java.io.File file) throws java.io.IOException, java.text.ParseException
Parse a TXT dataset from given file.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public AttributeDataset parse(java.lang.String name, java.io.File file) throws java.io.IOException, java.text.ParseException
Parse a TXT dataset from given file.- Parameters:
file- the file of data source.- Throws:
java.io.IOExceptionjava.text.ParseException
-
parse
public AttributeDataset parse(java.lang.String name, java.io.InputStream stream) throws java.io.IOException, java.text.ParseException
Parse a TXT dataset from an input stream.- Parameters:
name- the name of dataset.stream- the input stream of data.- Throws:
java.io.IOExceptionjava.text.ParseException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG