Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kchu25 committed Sep 12, 2024
1 parent 1e0a189 commit 3a85822
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions tmp3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,49 +194,6 @@ inds_sorted = sortperm(weights)
weights = weights[inds_sorted]
ds_mats = @view ds_mats[inds_sorted, :]

"""
ds_mat: Matrix of distances between the pfms
e.g. 12 6
32 8
number of rows = number of "modes" of distances
number of columns = number of distance in between the pfms
weights: weights for each mode of distances
optional parameters:
given_num_cols: the total number of columns that will be occupied for all the arrow-shapes
arrow_shape_scale_ratio: the ratio by which the width of the arrow-shapes will be scaled
height_top: the maximum height of the arrow-shapes
"""
function logoplot_with_arrow_gaps(pfms,
ds_mats::Matrix{T},
weights::Vector{T};
given_num_cols::Int=15,
arrow_shape_scale_ratio::Real=0.7,
height_top::Real=1.7
) where T<:Real

@assert length(pfms)-1 == size(ds_mats, 2) "The number of columns in ds_mats should be equal to the length of pfms - 1"
@assert length(weights) == size(ds_mats, 1) "The number of rows in ds_mats should be equal to the length of weights"

coords_mat, pfm_starts, total_pfm_cols, total_d_cols =
make_arrow_shapes(ds_mats, weights, given_num_cols, pfms;
arrow_shape_scale_ratio=arrow_shape_scale_ratio, height_top=height_top)

p = nothinglogo(total_pfm_cols + total_d_cols);

for (ind, pfm) in enumerate(pfms)
logo_x_offset = pfm_starts[ind]
logoplot!(p, pfm, PlotPWM.bg;
dpi=65,
setup_off=true,
logo_x_offset=logo_x_offset)
end

for col in eachcol(coords_mat)
arrowplot!(p, col)
end
return p
end


coords_mat, pfm_starts, total_pfm_cols, total_d_cols =
make_arrow_shapes(ds_mats, weights, 15, pfms;
Expand All @@ -260,13 +217,6 @@ p










# plot_shape(coords_mat[1,1]; xlim=(0, 10))
# plot_shape(coords_mat[2,1]; xlim=(0, 10))

Expand Down

0 comments on commit 3a85822

Please sign in to comment.