function [map2] = changeNodesArea(map, metList, areaHeight, areaWidth)
% Change the area size of a list of metabolites (standardize the map)
%
% USAGE:
%
%    [map2] = changeNodesArea(map,metList,areaHeight,areaWidth)
%
% INPUTS:
%    map:          A parsed model structure generated by
%                  'transformXML2Map' function
%    metList:      list of metabolites which area wants to be changed
%
% OPTIONAL INPUTS:
%    areaHeight:       change heigt
%    areaWidth:        change areaWidth
%
% OUTPUTS:
%    map2:          New parsed file with the changes in the reactions
%
% .. Authors:
%       - J.modamio 18/07/2017. Belval, Luxembourg, 18/07/2017.
%       - N.Sompairac - Institut Curie, Paris, 11/10/2017. (Code checking)

    if nargin < 3
        areaHeight = 25.0;
        if nargin < 4
            areaWidth = 70.0;
        end
    end

    % Rename map
    map2 = map;

    % Find mets in the map
    id = map2.specID(ismember(map2.specName, metList));
    idx = find(ismember(map2.molID, id));

    % Change areaHeight
    map2.molHeight(idx, 1) = {areaHeight};

    % Change areaWidth
    map2.molWidth(idx, 1) = {areaWidth};

end
