Skip to Main Content Skip to Search
Product Documentation

sptread - Read data from SPOT file

Syntax

SPOTData = sptread(File)

SPOTData = sptread(File, 'CleanColNames', CleanColNamesValue)

Arguments

File

Either of the following:

  • String specifying a file name, a path and file name, or a URL pointing to a file. The referenced file is a SPOT-formatted file (ASCII text file). If you specify only a file name, that file must be on the MATLAB search path or in the MATLAB Current Folder.

  • MATLAB character array that contains the text of a SPOT-formatted file.

CleanColNamesValue

Controls the use of valid MATLAB variable names.

Description

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

Header
Data
Blocks
Columns
Rows
IDs
ColumnNames
Indices
Shape


SPOTData = sptread(File, 'CleanColNames', CleanColNamesValue)
controls the use of valid MATLAB variable names. The column names in the SPOT-formatted 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 indices that you can use for plotting heat maps of the data.

Examples

  1. Read in a sample SPOT file and plot the median foreground intensity for the 635 nm channel. Note that the example file spotdata.txt is not provided with the Bioinformatics Toolbox software.

    spotStruct = sptread('spotdata.txt')
    maimage(spotStruct,'Rmedian');
  2. Alternately, create a similar plot using more basic graphics commands.

    Rmedian = magetfield(spotStruct,'Rmedian');
    imagesc(Rmedian(spotStruct.Indices));
    colormap bone
    colorbar

See Also

affyread | agferead | celintensityread | geoseriesread | geosoftread | gprread | ilmnbsread | imageneread | maboxplot | magetfield

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS