Efficiently extracting network measures from saved .b2 file

Home Forums General Help (Braph 2.0) Efficiently extracting network measures from saved .b2 file

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #190552
    Nabin Koirala
    Participant

    Can I load the saved .b2 file in matlab and export all computed network measures in some format ? I should mention this that I know that I could click on them and get the table and save as .xlsx but I would prefer not to do that 20 times for all the measures. I have asked this before and Emiliano helped me with the script to extract those measures but that computes everything from the start. So, i would like to know how can I do it if I already have the saved comparison in .b2 format? Thank you.

    #190902
    Emiliano Gomez
    Moderator

    This question was solved with the following example of code:

    *Note***
    In Nabin’s case the saved b2 file was a Comparison of Structural groups.

    [file, path, filterindex] = uigetfile(BRAPH2.EXT_ELEMENT, [‘Select the .b2 file.’]);
    tmp = load(filename, ‘-mat’, ‘el’);
    filename = fullfile(path, file);
    tmp = load(filename, ‘-mat’, ‘el’);
    comparison = tmp.el
    % for group 1
    a1 = comparison.get(‘A1’)
    g1 = a1.get(‘G’)
    m_dict1 = g1.get(‘m_dict’)
    measure_names = m_dict1.getKeys();
    measures = m_dict1.getItems();
    vals = cellfun(@(x) x.get(‘M’), measures, ‘UniformOutput’, false)

    Emiliano Gomez

    #191606
    Nabin Koirala
    Participant

    Thanks Emiliano for your help on this.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.