% generate sequences of size 500 and 5000

s1 = randseq(500);
s2 = randseq(5000);

pats = generate_trimers();

[fp1, ] = freq_profile(s1, pat);
[fp2, ] = freq_profile(s2, pat);

cont_table = [fp1; fp2];
[chi, p] = chi_square_pval(cont_table);
fprintf('Random sequence Set 1, p-value  = %f\n', p);

% Change the frequencies of bases for the second sequence

s2 = randseq(500, 'Weights', [0.1, 0.4, 0.4, 0.1]);
[fp2, ] = freq_profile(s2, pat);
cont_table = [fp1; fp2];
[chi, p] = chi_square_pval(cont_table);
fprintf('Random sequence Set 2, p-value  = %f\n', p);

