getCompareBinsOfFluxes

PURPOSE ^

compares the bins of fluxes between samplo and samphi

SYNOPSIS ^

function [output] = getCompareBinsOfFluxes(xglc,model,samplo,samphi,metabolites)

DESCRIPTION ^

 compares the bins of fluxes between samplo and samphi
 calls compareBinsOfFluxes(xglc,model,sammin,sammax,metabolites)
  samplo and samphi each contain samples in x.points
 Wing Choi 3/7/08

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [output] = getCompareBinsOfFluxes(xglc,model,samplo,samphi,metabolites)
0002 
0003 % compares the bins of fluxes between samplo and samphi
0004 % calls compareBinsOfFluxes(xglc,model,sammin,sammax,metabolites)
0005 %  samplo and samphi each contain samples in x.points
0006 % Wing Choi 3/7/08
0007 
0008 output = 0;
0009 
0010 if (nargin < 4)
0011     disp '[output] = getCompareBinsOfFluxes(xglc,model,samplo,samphi,metabolites)'
0012     return;
0013 end
0014 
0015 if (nargin < 5)
0016     metabolites = [];
0017 end
0018 
0019 if (isempty(xglc))
0020     % random glucose
0021     %xglc = rand(64,1);
0022     %xglc = xglc/sum(xglc);
0023     %xglc = idv2cdv(6)*xglc;
0024     
0025     glucose = rand(8,1);
0026     glucose = glucose/sum(glucose);
0027     %glc = idv2cdv(6)*glc;
0028 
0029     % glc 1-6 = carbon 1-6
0030     % glc 7 = carbon 1+2 (really 5 and 6)
0031     % glc 8 = unlabeled
0032     % glc 9 = fully labeled
0033     glc = zeros(64,9);
0034     glc(1+1,1) = 1;
0035     glc(2+1,2) = 1;
0036     glc(4+1,3) = 1;
0037     glc(8+1,4) = 1;
0038     glc(16+1,5) = 1;
0039     glc(32+1,6) = 1;
0040     glc(32+16+1,7) = 1;
0041     glc(0+1,8) = 1;
0042     glc(63+1,9) = 1;
0043 
0044     xGlc = zeros(64,1);
0045     for i = 1:8
0046         xGlc = xGlc + glucose(i)*glc(:,i);
0047     end
0048 
0049     xglc = idv2cdv(6)*xGlc;
0050 
0051 end
0052 
0053 % specify the #fluxes and #bins to work with.
0054 bins = [ 100 40 ; 125 32 ; 200 20 ; 250 16 ; 300 13 ; 400 10 ; 1000 4 ];
0055 
0056 for i = 1:7
0057     nflux = bins(i,1);
0058     nbins = bins(i,2);
0059     ol = getBinsOfFluxes(samplo,nflux,nbins);
0060     ou = getBinsOfFluxes(samphi,nflux,nbins);
0061     ome = compareBinsOfFluxes(xglc,model,ol,ou,metabolites);
0062     name = sprintf('n%d',nbins);
0063     output.data(i,1:length(ome.totalz)) = ome.totalz';
0064     output.atotalz(i,1) = mean(ome.totalz);
0065     output.std(i,1) = std(ome.totalz);
0066 end
0067 
0068 % get the single bin of 4000 run for compare.
0069 sl.samps(1,1).points = samplo.points(:,1:4000);
0070 su.samps(1,1).points = samphi.points(:,1:4000);
0071 ome = compareBinsOfFluxes(xglc,model,sl,su,metabolites);
0072 output.data(8,1) = ome.totalz(1,1);
0073 output.atotalz(8,1) = ome.totalz(1,1);
0074 output.std(8,1) = 0;
0075 %[totalz,zscore,mdvs] = compareMultSamp(xGlc,x,samps);
0076 
0077 %[totalz] = compareTwoSamp(xGlc,x,samp1,samp2,metabolite);
0078 
0079 return
0080 end

Generated on Thu 21-Jun-2012 15:39:23 by m2html © 2003