%This is the reader input for zebrafish simulations.
%Specify your model parameters and hit run.

clear;

%biased domain growth parameters
gamma=1;
q=1;

%parameters for biased proliferation -- areal proliferation
gamma_prolif=0.25; %proportion of the domain to bias
p_b=0.1; %probability of a growht event happing in lower part of the domain (detemined by gamma_prolif)

%indicators for areal proliferation bias
biased_prolif=1;

%paramter for directional bias in proliferation. p_l = 0.25 is equivalent to
%unbiased proliferation
p_l=0.25;

%Which simulation would you like to run? e.g. WT/nac/shd/pfe/rse/cho/seurat/leo/ablation/all;
fish_type_str = "WT";

%What will you name this simulation
name = "WT_testing_code";

%fish type for simualting mixed mutants
type_str={'shd_pfe', 'nac_pfe', 'nac_shd'};

%How many repeats would you like to do?
rep_str="1";

%Would you like to record every dev stage, every half day or only final point (J+)? 1/2/3;
time_str="1";


str='OK, I will generate %s repeat(s) of the fish type, %s \n' ;
fprintf(str, rep_str, fish_type_str);

double_rep_str=str2double(rep_str);

for i=1:double_rep_str
    rng(i);
    
    if strcmp(fish_type_str,'all')==1
        for j=1:length(type_str)
            fish_type_str=type_str{j};
            name_dir=[fish_type_str,'_', num2str(i)];
            mkdir(name_dir);
            [domain_matrix,domain_matrix_ir,domain_matrix_X]=main(fish_type_str, str2double(time_str),name_dir,gamma,q,gamma_prolif,p_b,biased_prolif,p_l);
            parsave(strcat(name_dir,'/',fish_type_str, '.mat'),domain_matrix,domain_matrix_ir,domain_matrix_X);
        end
        
    else
        
        name_dir=name+fish_type_str+num2str(i);
        mkdir(name_dir);

        [domain_matrix,domain_matrix_ir,domain_matrix_X]=main(fish_type_str, str2double(time_str),name_dir,gamma,q,gamma_prolif,p_b,biased_prolif,p_l);
        parsave(strcat(name_dir,'/',fish_type_str, '.mat'),domain_matrix,domain_matrix_ir,domain_matrix_X);

    end
end