function varargout = boot_consense_tree(varargin)
% BOOT_CONSENSE_TREE MATLAB code for boot_consense_tree.fig
%      BOOT_CONSENSE_TREE, by itself, creates a new BOOT_CONSENSE_TREE or raises the existing
%      singleton*.
%
%      H = BOOT_CONSENSE_TREE returns the handle to a new BOOT_CONSENSE_TREE or the handle to
%      the existing singleton*.
%
%      BOOT_CONSENSE_TREE('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in BOOT_CONSENSE_TREE.M with the given input arguments.
%
%      BOOT_CONSENSE_TREE('Property','Value',...) creates a new BOOT_CONSENSE_TREE or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before boot_consense_tree_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to boot_consense_tree_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help boot_consense_tree

% Last Modified by GUIDE v2.5 19-May-2011 23:35:28

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @boot_consense_tree_OpeningFcn, ...
                   'gui_OutputFcn',  @boot_consense_tree_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before boot_consense_tree is made visible.
function boot_consense_tree_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to boot_consense_tree (see VARARGIN)

% Choose default command line output for boot_consense_tree
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes boot_consense_tree wait for user response (see UIRESUME)
% uiwait(handles.figure1);
global omezeni_delky omezeni_slov substitucni_matice_typ kontrola_prubehu korekce_vzdalenosti algoritmus pam_cislo blosum_cislo klasicky


pom1 = exist('sekvence.mat','file'); %sekvence z datasetu
if pom1 == 2
    delete('sekvence.mat');
end

set(handles.prubeh,'Visible','off');
omezeni_delky=0;
omezeni_slov=0;
substitucni_matice_typ={'PAM' 'BLOSUM'};
pam_cislo=10:10:500;
blosum_cislo=30:5:90;
gap_open=8;
gap_extend=8;
num_boots=500;
klasicky=0;

korekce_vzdalenosti={'Jukes-Cantor' 'p-distance' 'alignment-score'};
algoritmus={'equivar' 'firstorder' 'average'}';

set(handles.typ_matice,'string',substitucni_matice_typ)
set(handles.cislo_matice,'string',pam_cislo)
set(handles.otevreni_mezery,'string',gap_open)
set(handles.prodlouzeni_mezery,'string',gap_extend)
set(handles.korekce_evo_vzdalenosti,'string',korekce_vzdalenosti)
set(handles.rekonstrukcni_algoritmus,'string',algoritmus)
set(handles.pocet_vzorku,'string',num_boots)
kontrola_prubehu=0;




% --- Outputs from this function are returned to the command line.
function varargout = boot_consense_tree_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in nacet.
function nacet_Callback(hObject, eventdata, handles)
% hObject    handle to nacet (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global name seq

[FileName,PathName]= uigetfile({'*.fas;*.fasta','FASTA soubory (*.fas,*.fasta)'},'Vyber soubor FASTA');

if ischar(FileName)
SelectedFile = [PathName FileName];
set(handles.hlavicky,'String',''); %vymaze se vzorova hlavicka souboru
set(handles.hlavicky,'Value',1);

if exist(SelectedFile,'file') == 2
   [name, seq]=fastaread(SelectedFile); 
end
pom='';
pom=name{1,1};

set(handles.hlavicky,'String',pom);

pom1 = exist('sekvence.mat','file'); %sekvence z datasetu
if pom1 == 2
    delete('sekvence.mat');
end
end


% --- Executes on selection change in hlavicky.
function hlavicky_Callback(hObject, eventdata, handles)
% hObject    handle to hlavicky (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns hlavicky contents as cell array
%        contents{get(hObject,'Value')} returns selected item from hlavicky


% --- Executes during object creation, after setting all properties.
function hlavicky_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hlavicky (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in vyber_hlavicky.
function vyber_hlavicky_Callback(hObject, eventdata, handles)
% hObject    handle to vyber_hlavicky (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global name seq omezeni_delky omezeni_slov kontrola_prubehu



Position = get(handles.hlavicky,'Value');
pom = get(handles.hlavicky,'String');
L = length(name);
if Position > 0 && ischar(pom)
    for k = 1:L
        line = name{k};
        [token, remain] = strtok(line, '|');
        for h = 1:(Position-1)
            [token, remain] = strtok(remain, '|');
        end
    pom1=token;    
    if omezeni_delky==0 && omezeni_slov==0
        sekvence{k}=pom1;
    elseif omezeni_delky==1 && omezeni_slov==0
        hrskp=length(pom1);
        if hrskp>30
        sekvence{k}=pom1(1:30);
        else
        sekvence{k}=pom1;
        end
    elseif omezeni_delky==0 && omezeni_slov==1
        pom2=get(handles.pocet_slov,'String');
        pom2=str2num(pom2);
        [pom3, remain] = strtok(pom1, ' ');
        for i = 1: pom2-1
        [token, remain] = strtok(remain, ' ');
        pom3=[pom3 ' ' token];
        end
        sekvence{k}=pom3;
    elseif omezeni_delky==1 && omezeni_slov==1
        pom2=get(handles.pocet_slov,'String');
        pom2=str2num(pom2);
        [pom3, remain] = strtok(pom1, ' ');
        for i = 1: pom2-1
        [token, remain] = strtok(remain, ' ');
        pom3=[pom3 ' ' token];
        end
        if length(pom3)>30
        sekvence{k}=pom3(1:30);
        else
        sekvence{k}=pom3;
        end
    end

    end
set(handles.seznam_sekvenci,'String',sekvence);


delka_sekvence=length(seq{1});
delka_sekvence=num2str(delka_sekvence);

set(handles.kratky_nazev,'string',sekvence{1})
set(handles.delka,'string',['Délka sekvence:' delka_sekvence])
kontrola_prubehu=1;
save sekvence sekvence
end


% --- Executes on selection change in seznam_sekvenci.
function seznam_sekvenci_Callback(hObject, eventdata, handles)
% hObject    handle to seznam_sekvenci (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns seznam_sekvenci contents as cell array
%        contents{get(hObject,'Value')} returns selected item from seznam_sekvenci
global name seq kontrola_prubehu 

if kontrola_prubehu>0
     pom1 = exist('sekvence.mat','file');

if pom1 == 2
    load sekvence
end

    
k=get(hObject,'Value');
delka_sekvence=length(seq{k});
delka_sekvence=num2str(delka_sekvence);

set(handles.kratky_nazev,'string',sekvence{k})
set(handles.delka,'string',['Délka sekvence:' delka_sekvence])

end


% --- Executes during object creation, after setting all properties.
function seznam_sekvenci_CreateFcn(hObject, eventdata, handles)
% hObject    handle to seznam_sekvenci (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in listbox2.
function listbox2_Callback(hObject, eventdata, handles)
% hObject    handle to listbox2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns listbox2 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox2


% --- Executes during object creation, after setting all properties.
function listbox2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function kratky_nazev_Callback(hObject, eventdata, handles)
% hObject    handle to kratky_nazev (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of kratky_nazev as text
%        str2double(get(hObject,'String')) returns contents of kratky_nazev as a double


% --- Executes during object creation, after setting all properties.
function kratky_nazev_CreateFcn(hObject, eventdata, handles)
% hObject    handle to kratky_nazev (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in zmena_nazvu.
function zmena_nazvu_Callback(hObject, eventdata, handles)
% hObject    handle to zmena_nazvu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global name seq kontrola_prubehu


if kontrola_prubehu>0
    pom1 = exist('sekvence.mat','file');
if pom1 == 2
    load sekvence
end

k=get(handles.seznam_sekvenci,'value');
nazev=get(handles.kratky_nazev, 'string');

sekvence{k}=nazev;

set(handles.seznam_sekvenci,'string',sekvence)
save sekvence sekvence
end


% --- Executes on selection change in seznam_sekvenci.
function listbox4_Callback(hObject, eventdata, handles)
% hObject    handle to seznam_sekvenci (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns seznam_sekvenci contents as cell array
%        contents{get(hObject,'Value')} returns selected item from seznam_sekvenci


% --- Executes during object creation, after setting all properties.
function listbox4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to seznam_sekvenci (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in omezeni.
function omezeni_Callback(hObject, eventdata, handles)
% hObject    handle to omezeni (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of omezeni
global omezeni_delky

omezeni_delky=get(hObject,'Value');


% --- Executes on button press in omezeni_slovy.
function omezeni_slovy_Callback(hObject, eventdata, handles)
% hObject    handle to omezeni_slovy (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of omezeni_slovy
global omezeni_slov

omezeni_slov=get(hObject,'Value');


function pocet_slov_Callback(hObject, eventdata, handles)
% hObject    handle to pocet_slov (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of pocet_slov as text
%        str2double(get(hObject,'String')) returns contents of pocet_slov as a double


% --- Executes during object creation, after setting all properties.
function pocet_slov_CreateFcn(hObject, eventdata, handles)
% hObject    handle to pocet_slov (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in typ_matice.
function typ_matice_Callback(hObject, eventdata, handles)
% hObject    handle to typ_matice (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns typ_matice contents as cell array
%        contents{get(hObject,'Value')} returns selected item from typ_matice
global substitucni_matice_typ pam_cislo blosum_cislo

typ=get(hObject, 'value');
if typ==1
    set(handles.cislo_matice,'value',1)
    set(handles.cislo_matice,'string',pam_cislo)
elseif typ==2
    set(handles.cislo_matice,'value',1)
    set(handles.cislo_matice,'string',blosum_cislo)
end





function prodlouzeni_mezery_Callback(hObject, eventdata, handles)
% hObject    handle to prodlouzeni_mezery (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of prodlouzeni_mezery as text
%        str2double(get(hObject,'String')) returns contents of prodlouzeni_mezery as a double


% --- Executes during object creation, after setting all properties.
function prodlouzeni_mezery_CreateFcn(hObject, eventdata, handles)
% hObject    handle to prodlouzeni_mezery (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end





function otevreni_mezery_Callback(hObject, eventdata, handles)
% hObject    handle to otevreni_mezery (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of otevreni_mezery as text
%        str2double(get(hObject,'String')) returns contents of otevreni_mezery as a double


% --- Executes during object creation, after setting all properties.
function otevreni_mezery_CreateFcn(hObject, eventdata, handles)
% hObject    handle to otevreni_mezery (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



% --- Executes on selection change in korekce_evo_vzdalenosti.
function korekce_evo_vzdalenosti_Callback(hObject, eventdata, handles)
% hObject    handle to korekce_evo_vzdalenosti (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns korekce_evo_vzdalenosti contents as cell array
%        contents{get(hObject,'Value')} returns selected item from korekce_evo_vzdalenosti


% --- Executes during object creation, after setting all properties.
function korekce_evo_vzdalenosti_CreateFcn(hObject, eventdata, handles)
% hObject    handle to korekce_evo_vzdalenosti (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in rekonstrukcni_algoritmus.
function rekonstrukcni_algoritmus_Callback(hObject, eventdata, handles)
% hObject    handle to rekonstrukcni_algoritmus (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns rekonstrukcni_algoritmus contents as cell array
%        contents{get(hObject,'Value')} returns selected item from rekonstrukcni_algoritmus


% --- Executes during object creation, after setting all properties.
function rekonstrukcni_algoritmus_CreateFcn(hObject, eventdata, handles)
% hObject    handle to rekonstrukcni_algoritmus (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in cislo_matice.
function cislo_matice_Callback(hObject, eventdata, handles)
% hObject    handle to cislo_matice (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns cislo_matice contents as cell array
%        contents{get(hObject,'Value')} returns selected item from cislo_matice


% --- Executes during object creation, after setting all properties.
function cislo_matice_CreateFcn(hObject, eventdata, handles)
% hObject    handle to cislo_matice (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes during object creation, after setting all properties.
function typ_matice_CreateFcn(hObject, eventdata, handles)
% hObject    handle to typ_matice (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function pocet_vzorku_Callback(hObject, eventdata, handles)
% hObject    handle to pocet_vzorku (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of pocet_vzorku as text
%        str2double(get(hObject,'String')) returns contents of pocet_vzorku as a double


% --- Executes during object creation, after setting all properties.
function pocet_vzorku_CreateFcn(hObject, eventdata, handles)
% hObject    handle to pocet_vzorku (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in klasicky.
function klasicky_Callback(hObject, eventdata, handles)
% hObject    handle to klasicky (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of klasicky

global klasicky

klasicky=get(hObject,'Value');


% --- Executes on button press in sestrojit.
function sestrojit_Callback(hObject, eventdata, handles)
% hObject    handle to sestrojit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global omezeni_delky omezeni_slov substitucni_matice_typ kontrola_prubehu korekce_vzdalenosti algoritmus pam_cislo blosum_cislo seq klasicky

% nacteni parametru pro rekonstrukci
set(handles.prubeh,'Visible','on');

pom1 = exist('sekvence.mat','file');

if pom1 == 2
    load sekvence
end

%sekvence a hlavicky
L=length(seq);
for i=1:L
    seqs(i).Header=sekvence{i};
    seqs(i).Sequence=seq{i};
end

%skorovaci matice
pom_typ=get(handles.typ_matice,'value');
pom_cislo=get(handles.cislo_matice,'value');
typ=substitucni_matice_typ{pom_typ};
if pom_typ==1
    cislo=pam_cislo(pom_cislo);
elseif pom_typ==2
    cislo=blosum_cislo(pom_cislo);
end
cislo=num2str(cislo);
scoringmatrix=[typ cislo];

%mezery
open_gap=get(handles.otevreni_mezery,'string');
open_gap=str2num(open_gap);
extend_gap=get(handles.prodlouzeni_mezery,'string');
extend_gap=str2num(extend_gap);

%korekce evolucni vzdalenosti
pom_korekce_vzdalenosti=get(handles.korekce_evo_vzdalenosti,'value');
method=korekce_vzdalenosti(pom_korekce_vzdalenosti);

%algoritmus
pom_algoritmus=get(handles.rekonstrukcni_algoritmus,'value');
method_alg=algoritmus(pom_algoritmus);

%pocet bootstrapovych vzorku
num_boots=get(handles.pocet_vzorku,'string');
num_boots=str2num(num_boots);


%konstrukce stromu
if klasicky==0
    consense(seqs,scoringmatrix,open_gap,extend_gap,method,method_alg,num_boots);
elseif klasicky==1
    clasic_and_consense(seqs,scoringmatrix,open_gap,extend_gap,method,method_alg,num_boots);
end
set(handles.prubeh,'Visible','off')


% --- Executes on button press in konec.
function konec_Callback(hObject, eventdata, handles)
% hObject    handle to konec (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

delete('sekvence.mat');
close all
