PolyloxPlots.jl

Plotting methods for Polylox / barcoding data.

Heatmap

PolyloxPlots.plxheatmapFunction
plxheatmap(df; <keyword arguments>)

Creates a heatmap of barcode clone sizes for all celltypes in the dataframe (second to last column).

Celltypes are reordered based on a hierarchical clustering with Kendall rank correlation. Barcodes are ordered in groups of same fate combinations, and within these groups via the sum of counts over all celltypes.

Arguments

  • df::DataFrame: a barcode dataframe, first column (:Barcode) contains barcodes, while all further columns contain barcode reads / cell counts of the celltypes.
  • valtransform = x -> x==zero(x) ? -1 : log(x): function that transforms barcode read / cell count values (transformed values used for the colorbar).
  • size = (200,250): figure size.

Examples

julia> using DataFrames, PolyloxPlots;
julia> df = DataFrame(:Barcode => 1:10, 
                        :A => [10,0,0,1,3,5,3,1,2,5],
                        :B => [1,8,4,0,0,0,0,3,2,1],
                        :C => [10,0,1,1,5,5,7,1,0,5])
julia> fig, ax, hm = plxheatmap(df)
julia> fig # display figure
julia> save("plxheatmap.pdf", fig)
source

Bubble plot

PolyloxPlots.plxbubbleFunction
plxbubble(df; <keyword arguments>)

Creates a bubble chart of fate contributions to all individual celltypes in the dataframe (second to last column).

Contributions are computed from the fraction of reads / cell counts that flow into a given celltype, and visualised via markersize and color.

Arguments

  • df::DataFrame: a barcode dataframe, first column (:Barcode) contains barcodes, while all further columns contain barcode reads / cell counts of the celltypes.
  • celltypenames = nothing: short, ideally, single-letter labels for the celltypes on the y axis; if not specified, the first letter of each celltype will be used (default).
  • nallfates::Int = 6: the maximum number of celltypes for which all fate combinations are computed; for celltype numbers above, only fates existing in the data will be shown.
  • size = (300,450): figure size.

Examples

julia> using DataFrames, PolyloxPlots;
julia> df = DataFrame(:Barcode => 1:6,
                    :Aaa => [1,0,0,0,1,0],
                    :Bbb => [0,0.5,0.5,0,1,2],
                    :Ccc => [0,0,0,1,1,2])
julia> fig, ax, sc = plxbubble(df)
julia> fig # display figure
julia> save("plxbubble.pdf", fig)
source

Index