
% SEND: 
% --- Kmer, rep: the information retrieved from the analysis of Kmers in a single protein 

function Gstat = get_global_stat(Kmer, rep)

% total number of Kmers
Tot_Kmer = length(Kmer);

% total number of repetitions of all Kmers
Tot_rep = sum(rep);

%%%%     LEADING Kmer (most abundant)   %%%%%
id_lead       = find(rep == max(rep));
Lead_Kmer     = Kmer(id_lead);
Lead_Kmer_rep = rep(id_lead);

% Output structure
Gstat.Tot_Kmer       = Tot_Kmer;
Gstat.Tot_rep        = Tot_rep;
Gstat.Lead_Kmer      = Lead_Kmer;
Gstat.Lead_Kmer_rep  = Lead_Kmer_rep;