Code covered by the BSD License  

Highlights from
Absolute and Comparison Analysis for Affymetrix Data

Absolute and Comparison Analysis for Affymetrix Data

by

 

31 Mar 2005 (Updated )

Perform single-array and comparison analysis for Affymetrix data given by CEL and CDF files ...

affyCdfCel2chp(celStruct,cdfStruct,theID)
function probevalues = affyCdfCel2chp(celStruct,cdfStruct,theID)
%AFFYCDFCEL2CHP extracts the probe sets values from CDF and CEL structures. 
%   PROBEVALUES=AFFYCDFCEL2CHP(CELSTRUCT,CDFSTRUCT,THEID) returns the matrix
%   of size numPairs x 18. Its columns are ProbeSetNumber, ProbePairNumber,
%   PMPosX, PMPosY, PMIntensity, PMStDev, PMPixels, PMOutlier, PMMasked,
%   MMPosX, MMPosY, MMIntensity, MMStDev,MMPixels, MMOutlier and MMMasked
%   values for each probe pair.
%
%   THEID is probe set ID or probe set name from corresponding CDFStruct.
%
%   This function is a vectorized version of MATLAB function PROBESETVALUES.
%
%   Example:
%      celStruct = affyread('Drosophila-121502.CEL',libDir);
%      cdfStruct = affyread('Drosgenome1.CDF',libDir);
%      % get the values for probe set AFFX-MurIL2_at
%      probevalues = affyCdfCel2chp(celStruct,cdfStruct,'AFFX-MurIL2_at')
%
%   See also AFFYREAD, PROBELIBRARYINFO, PROBESETLINK, PROBESETLOOKUP.
 
%   $Revision: 1.0 $  $Date: 2005/03/15 $
%   Copyright (c) Abram Jujunashvili ajujunas@math.cudenver.edu.remove
%            and  Andrew Knyazev
%
%      THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
%      EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
%
%      The software is provided free of charge.
%
%   Tested on MATLAB Version 7.0.1.24704 (R14) Service Pack 1.
%   The code uses Bioinformatics toolbox.
%   Bioinformatics Toolbox Version 2.0 (R14SP1+) was used.
%
%Availability: 
%
%   http://www-math.cudenver.edu/~ajujunas/software/bioinform/microarray/

% get the ID
if ischar(theID)
    ID = strmatch(theID,{cdfStruct.ProbeSets.Name});
    if isempty(ID)
        error('affyCdfCel2chp:UnknownProbeName',...
            'Unknown probe set name: %s.',theID);
    elseif length(ID)>1
        warning('affyCdfCel2chp:AmbiguousParameterName',...
            'Ambiguous probe set name: %s.',theID);
        ID = ID(1);
    end
else
    ID = theID;
end
%
numCols = cdfStruct.Cols;
numPairs = cdfStruct.ProbeSets(ID).NumPairs;
thePairs = cdfStruct.ProbeSets(ID).ProbePairs;
%
PMX = thePairs(:,3);
PMY = thePairs(:,4);
MMX = thePairs(:,5);
MMY = thePairs(:,6);
probevalues=[ones(size(thePairs,1),1)*(ID-1)...
             [0:numPairs-1]' zeros(numPairs,2)...
             PMX PMY celStruct.Probes(PMY*numCols + PMX + 1,[3:7])...
             MMX MMY celStruct.Probes(MMY*numCols + MMX + 1,[3:7])];


Contact us