plot_compare2matrices

Reliability status: development

Comparison of proximity matrices. Plots either the ratio or the difference between two HiM matrices. It also plots both matrices together, with one in the upper triangle, and the other in the lower triangle.

usage: plot_compare2matrices [-h] [-O OUTPUTFOLDER] [-T1 INPUT1] [-T2 INPUT2]
                             [-U BARCODES] [--fontsize FONTSIZE] [--axisLabel]
                             [--axisTicks] [--ratio]
                             [--output_format {png,svg,pdf}]
                             [--normalize NORMALIZE] [--pixelSize PIXELSIZE]
                             [--matrix_norm_mode MATRIX_NORM_MODE]
                             [--dist_calc_mode DIST_CALC_MODE]
                             [--proximity_threshold PROXIMITY_THRESHOLD]
                             [--c_max CMAX]
                             [--scalingParameter SCALINGPARAMETER]
                             [--shuffle SHUFFLE] [--c_min CMIN] [--cmap CMAP]

Named Arguments

-O, --output, --outputFolder

Folder for outputs

-T1, --input1

Filename of single-cell PWD matrices in Numpy

-T2, --input2

Filename of single-cell PWD matrices in Numpy

-U, --barcodes, --uniqueBarcodes

csv file with list of unique barcodes

--fontsize

Size of fonts to be used in matrix

--axisLabel

Use if you want a label in x and y

Default: False

--axisTicks

Use if you want axes ticks

Default: False

--ratio

Does ratio between matrices. Default: difference

Default: False

--output_format

Possible choices: png, svg, pdf

Output image format. Default = png.

Default: 'png'

--normalize

Matrix normalization factor: maximum, none, single value (normalize 2nd matrix by), bin pair e.g. 1,2

--pixelSize

pixelSize in microns

--matrix_norm_mode

Matrix normalization mode. Can be n_cells (default) or nonNANs

--dist_calc_mode

Mode used to calculate the mean distance. Can be either ‘median’, ‘KDE’ or ‘proximity’. Default: median

--proximity_threshold

proximity threshold in um

--c_max, --cMax

Colormap max scale. Default: automatic

--scalingParameter

Scaling parameter. Default: 1

--shuffle

Provide shuffle vector: 0,1,2,3… of the same size or smaller than the original matrix. No spaces! comma-separated!

--c_min, --cMin

Colormap min cscale. Default: 0

--cmap, --c_map

Colormap. Default: coolwarm

Output Files

The script generates:

  1. [output]/Fig_[input1]_[mode]_[matrix_norm_mode]_[c_max].[format]: Matrix plot for the first input matrix.

  2. [output]/Fig_[input2]_[mode]_[matrix_norm_mode]_[c_max].[format]: Matrix plot for the second input matrix.

  3. [output]/Fig_[input1]_difference.[format]: Difference or ratio plot comparing the two matrices.

  4. [output]/Fig_[input1]_mixed_matrix.[format]: Mixed matrix plot with one input in the upper triangle and the other in the lower triangle.

  5. [output]/Fig_[input1]_mixed_matrix.npy: NPY file containing the mixed matrix values.

  6. [output]/Fig_[input1]_Wilcoxon.[format]: Wilcoxon statistical comparison plot. This file is written for non-proximity distance modes.

  7. [output]/Fig_[input1]_Wilcoxon.npy: NPY file containing the Wilcoxon statistical comparison values. This file is written for non-proximity distance modes.

Examples

plot_compare2matrices --help

Notes

  • See the command-line reference above for the complete option list.