% This sccript does the post procesing of a joint systems apoptosis
% evaluation, based on c. print's two endothelial datasets and R, Clarksons
% mouse mammary gland data. This script contains only information that is
% neccesary to generate the csv. rank file 
%
% (C) P. Sykacek 2005, 2006


addpath('./mca_fuse/');
addpath('./mca_base/');
addpath('./helpers/');
addpath('./resultfltr/');
addpath('./statsgen/');
addpath('./');

comp=[];
fname=['./crossanngenespec.mat'];
if syschck('mlb')
    load(fname);
else
    load(fname, '-mat');
end
% contains a cell array of gene symbols and gene description cross annotated between u95 and u74 (affy id's form u95)
% genespec has the following contents: 3 columns and as many rows as we
% have gene ids. the fiorst column ciontains gene ids (as used by the array
% technology (e.g. affy ids). This column is for compatibility it is
% not used here. The second column contains gene accesssion codes. They are
% used as short reference to the gene. The third column ciontains a longer
% description.
%comp.genespec=genedesc(1:500,:);
comp.genespec=genedesc;

comp.interspec={'no gene', 'no gene - prediction from intercept'};
% genespecnam ius used as header to identify the column content in every
% column of genedesc. The most important entries are the ones that contain
% the unique gene id specifiers. (3rd. column and beyond that). This
% symbol is used in the species description to identify the correct id 
% order that must be used for calculation of the probability
% measure that corresponds to a gene.
comp.simfname='./sharetestres.mat';
comp.deffilename='./shareanalysis.def'; % to get the data.
comp.expfun=@mean; % function used for expectations.

% do we want a coexpressed filter applied on the rank tables?
comp.do_coexp_list=1;
% rank table and rank file header (note: additional systems require \
%				  additional Ind. Prob Entries.) 
comp.rankinfo.header={'Gene Symbol', 'Gene Description', 'Ind. Prob.', 'Gene Measure',...
		      'Cumulative Gene Measure', 'Coregulation', 'Upregulation',...
		      'Ind. Prob. - Mammary TC', 'Ind. Prob. - Serum Withdraw'};
comp.rankinfo.fname=['share_test_rank.csv'];
% those columns go into the csv file
comp.rankinfo.csvfileid=[1, 2, 3, 4, 5, 6, 7, 8, 9];

combres2csvfile(comp);