%read data from features folder into complete_data

count=0;
COMPLETE_DATA=[];
for p=1:numel(PARTS)
    count = count+1;
    filename = strcat(FEATURES_FOLDER,'/',PARTS{p},'.csv');
    [fid,msg] = fopen(filename);
    COMPLETE_DATA = [COMPLETE_DATA dlmread2(filename,' ',0,1,[0,1,5000000,5000000])];
    if count == 1 %read filenames in the first loop
        countnames = 1;
        namegene = fgets(fid,24);
        fgetl(fid);
        while namegene ~= -1
            names{countnames} = namegene;
            countnames = countnames + 1;
            namegene = fgets(fid,24);
            fgetl(fid);
        end
    end
    fclose(fid);
end
ind = isnan(COMPLETE_DATA);
COMPLETE_DATA(ind)=0;
[COMPLETE_DATA MU SIGMA] = zscore(COMPLETE_DATA);

%exclude not valid genes
COMPLETE_DATA = COMPLETE_DATA(find(~EXCLUDE_GENES),:);

NUM_FEATURES = size(COMPLETE_DATA,2);