Main Content

exprWrite

Class: bioma.ExpressionSet
Namespace: bioma

Write expression values in ExpressionSet object to text file

Syntax

exprWrite(ESObj, File)
exprWrite(..., 'Delimiter', DelimiterValue, ...)
exprWrite(..., 'Precision', PrecisionValue, ...)
exprWrite(..., 'Header', HeaderValue, ...)
exprWrite(..., 'Annotated', AnnotatedValue, ...)
exprWrite(..., 'Append', AppendValue, ...)

Description

exprWrite(ESObj, File) writes the expression values in the Expressions element (DataMatrix object) from an ExpressionSet object to a text file, using the delimiter \t to separate columns. exprWrite writes the data starting at the first column of the first row in the destination file.

exprWrite(..., 'PropertyName', PropertyValue, ...) calls exprWrite with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Enclose each PropertyName in single quotation marks. Each PropertyName is case insensitive. These property name/property value pairs are as follows:

exprWrite(..., 'Delimiter', DelimiterValue, ...) specifies a delimiter symbol to use as a column separator. Default is '\t'.

exprWrite(..., 'Precision', PrecisionValue, ...) specifies the precision for writing the data to the text file. Default is 5.

exprWrite(..., 'Header', HeaderValue, ...) specifies the first line of the text file. Default is the Name property for the DataMatrix object.

exprWrite(..., 'Annotated', AnnotatedValue, ...) controls the writing of row and column names to the text file. Choices are true (default) or false.

exprWrite(..., 'Append', AppendValue, ...) controls the appending of the expression values to File when it is an existing file. Choices are true or false (default). If false, exprWrite overwrites File.

Input Arguments

ESObj

Object of the bioma.ExpressionSet class.

File

Character vector specifying either a file name or a path and file name for saving the expression values. If you specify only a file name, exprWrite saves the file to the MATLAB Current Folder.

DelimiterValue

Character vector specifying a delimiter symbol to use as a matrix column separator. Typical choices are:

  • ' '

  • '\t' (default)

  • ','

  • ';'

  • '|'

PrecisionValue

Precision for writing the data to the text file, specified by either:

  • Positive integer specifying the number of significant digits

  • C-style format character vector starting with %, such as '%6.5f'

Default: 5

HeaderValue

Character vector specifying the first line of the text file. Default is the Name property for the DataMatrix object.

AnnotatedValue

Controls the writing of row and column names to the text file. Choices are true (default) or false.

AppendValue

Controls the appending of the expression values to File when it is an existing file. Choices are true or false (default). If false, exprWrite overwrites File.

Examples

Construct an ExpressionSet object, ESObj, as described in the Examples section of the bioma.ExpressionSet class reference page. Write the expression values in the ExpressionSet object to a text file:

% Write expression values to text file
exprWrite(ESObj, 'myexpressiondata.txt')