mdciao.cli.compare

mdciao.cli.compare(datasets, graphic_ext='.pdf', output_desc='freq_comparison', pop=False, **kwargs)

Compare contact frequencies across different sets of data

Parameters
  • datasets (iterable (list or dict)) –

    The datasets to compare with each other. If dict, then the keys will be used as names for the contact groups, e.g. “WT”, “MUT” etc. If list, then the keys will be auto-generated. The entries of the list/dictionary can be:

    • ContactGroup objects. For these, a ctc_cutoff_Ang value needs to be passed along, otherwise frequencies cannot be computed on-the-fly.

    • dictionaries where the keys are residue-pairs, one letter-codes, no fragment info, as in mdciao.contacts.ContactGroup.ctc_labels_short and the values are contact frequencies

    • files generated by (or in the same format as) frequency_table

      • ascii-files with the contact the frequencies in the first column and labels in the second and/or third column, see frequency_str_ASCII_file and freq_ascii2dict

      • .xlsx files with the header in the second row, containing at least the column-names “label” and “freqs”, see frequency_spreadsheet

  • graphic_ext (str, default is ".pdf") – The extension for figures

  • output_desc (str, default is 'freq_comparison') – Descriptor for output files.

  • pop (bool, default is True) – Use show to force the figure to be drawn.

  • kwargs (dict) – Optional arguments for compare_groups_of_contacts

Returns

  • myfig (Figure) – Figure with the comparison plot

  • freqs (dictionary) – Unified frequency dictionaries, including mutations and anchor

  • plotted_freqs (dictionary) – Like freqs but sorted and purged according to the user-defined input options, s.t. it represents the plotted values