sptread

Read data from a SPOT file

Syntax

SPOTData = sptread('File',
                   'PropertyName', PropertyValue)

sptread(..., 'CleanColNames, 'CleanColNamesValues')

Arguments

File

SPOT formatted file (ASCII text file). Enter a filename, a path and filename, or URL pointing to a file. File can also be a MATLAB character array that contains the text for a SPOT file.

CleanColNamesValue

Property to control using valid MATLAB variable names.

Description

SPOTData = sptread('File') reads a SPOT formatted file and creates a MATLAB structure SPOTData containing the following fields:

Header
Data
Blocks
Columns
Rows
IDs
ColumnNames
Indices
Shape

sptread(..., 'CleanColNames, CleanColNamesValue) The column names in the SPOT file contain periods and some characters that cannot be used in MATLAB variable names. If you plan to use the column names as variable names in a function, use this option with CleanColNames set to true and the function will return the field ColumnNames with valid variable names.

The Indices field of the structure includes the MATLAB indices that you can use for plotting heat maps of the data.

Examples

% Read in a sample SPOT file and plot the median foreground
% intensity for the 635 nm channel.
spotStruct = sptread('spotdata.txt')
maimage(spotStruct,'Rmedian');

% Alternatively, create a similar plot using
% more basic graphics commands.

rmedCol = find(strcmp(spotStruct.ColumnNames,'Rmedian'));
Rmedian = spotStruct.Data(:,rmedCol);
imagesc(Rmedian(spotStruct.Indices));
colormap bone
colorbar

See Also

Bioinformatics Toolbox functions gprread, maimage


© 1994-2005 The MathWorks, Inc.