Skip to content

Commit

Permalink
always make docstring of plot_structure_makie available
Browse files Browse the repository at this point in the history
  • Loading branch information
marcom committed Dec 2, 2022
1 parent 6060741 commit 365e180
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
13 changes: 13 additions & 0 deletions src/PlotRNA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,17 @@ include("r2r.jl")
#plot_structure_makie("(((...)))"; sequence="GGGAAACCC")
end

# We define the docstring of plot_structure_makie here so it's always
# available, even if the plot_structure_makie implementation wasn't
# included because CairoMakie was not loaded.
"""
plot_structure_makie(structure; [sequence, savepath, layout_type, colorscheme])
Plot a secondary structure to a PNG image or PDF file depending on `savepath` ending.
Using this function requires CairoMakie to have been loaded before
PlotRNA with `using CairoMakie, PlotRNA`.
"""
function plot_structure_makie end

end # module PlotRNA
5 changes: 0 additions & 5 deletions src/plot_structure_makie.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ using .CairoMakie: Makie, Axis, Colorbar, ColorTypes, DataAspect, Figure,
hidedecorations!, hidespines!, lines!, scatter!, text!,
xlims!, ylims!

"""
plot_structure_makie(structure; [sequence, savepath, layout_type, colorscheme])
Plot a secondary structure to a PNG image or PDF file depending on `savepath` ending.
"""
function plot_structure_makie(
structure::AbstractString;
sequence::AbstractString=" "^length(structure),
Expand Down

0 comments on commit 365e180

Please sign in to comment.