Skip to content

Commit

Permalink
Merge pull request #145 from TomHarrop/plot_ragtag_v004
Browse files Browse the repository at this point in the history
Plot ragtag v004
  • Loading branch information
TomHarrop authored Oct 20, 2024
2 parents b97d17e + b5154b9 commit 950dfdf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
16 changes: 13 additions & 3 deletions tools/plot_ragtag_paf/plot_ragtag_paf.R
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ gp <- ggplot() +
q_y + (y_axis_space / 3)
),
hjust = 0.5,
vjust = 0.5
vjust = 0.5,
size = fontsize,
size.unit = "pt"
) +
annotate(
geom = "text",
Expand All @@ -264,7 +266,9 @@ gp <- ggplot() +
t_y - (y_axis_space / 3)
),
hjust = 0.5,
vjust = 0.5
vjust = 0.5,
size = fontsize,
size.unit = "pt"
)

# Reverse the scales and the limits to plot reference on top
Expand All @@ -285,6 +289,8 @@ if (upside_down == TRUE) {
)
}



# reference contig names
if (label_ref_contigs == TRUE) {
gp <- gp + geom_text(
Expand All @@ -295,7 +301,9 @@ if (label_ref_contigs == TRUE) {
label = tname
),
angle = 30,
hjust = ifelse(upside_down == TRUE, 0, 1)
hjust = ifelse(upside_down == TRUE, 0, 1),
size = 2 * fontsize / 3,
size.unit = "pt"
)
}

Expand All @@ -310,6 +318,8 @@ if (label_query_contigs == TRUE) {
),
angle = 30,
hjust = ifelse(upside_down == TRUE, 1, 0),
size = 2 * fontsize / 3,
size.unit = "pt"
)
}

Expand Down
7 changes: 5 additions & 2 deletions tools/plot_ragtag_paf/plot_ragtag_paf.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="plot_ragtag_paf" name="Plot RagTag output" version="0.0.3" profile="24.1" license="MIT">
<tool id="plot_ragtag_paf" name="Plot RagTag output" version="0.0.4" profile="24.1" license="MIT">
<description>to compare query contigs to the reference</description>
<requirements>
<container type="docker">ghcr.io/tomharrop/r-containers:r2u_24.04_cv1</container>
Expand Down Expand Up @@ -103,8 +103,11 @@
Accepts the PAF and AGP produced by the RagTag Scaffold and draws a plot
showing the alignment of the query contigs to the reference contigs.

.. figure:: $PATH_TO_IMAGES/ragtag.png
.. figure:: https://raw.githubusercontent.com/usegalaxy-au/tools-au/refs/heads/master/tools/plot_ragtag_paf/static/images/ragtag.png
:alt: RagTag plot
:width: 600px
:height: 400px
:align: center

</help>
<citations>
Expand Down

0 comments on commit 950dfdf

Please sign in to comment.