Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure Updates #41

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ This repository includes all the scripts written to produce figures in the paper
```
$ bash bin/get_data.sh
```

## Rebuild Extened Figures
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Rebuild Extened Figures
## Rebuild Extended Figures


```{r}
Rscript -e "rmarkdown::render('bin/citations-graphs.Rmd', output_dir = 'bin')" # Extended Figure 1
Rscript -e "rmarkdown::render('bin/survey-figure.Rmd', output_dir = 'bin')" # Extended Figure 2
Rscript -e "rmarkdown::render('bin/tools-graphs.Rmd', output_dir = 'bin')" # Extended Figure 3
Rscript -e "rmarkdown::render('bin/workflows-graphs.Rmd', output_dir = 'bin')" # Extended Figure 4
Rscript -e "rmarkdown::render('bin/tutorials-graphs.Rmd', output_dir = 'bin')" # Extended Figure 5
```



Expand Down
24 changes: 12 additions & 12 deletions bin/citations-graphs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ library(patchwork)
## Input data

```{r}
years <- fread("https://raw.githubusercontent.com/usegalaxy-eu/microgalaxy_technical_paper_2024/refs/heads/main/results/citations/years.csv")
methods <- fread("https://raw.githubusercontent.com/usegalaxy-eu/microgalaxy_technical_paper_2024/refs/heads/main/results/citations/methods.csv")
target_technical <- fread("https://raw.githubusercontent.com/usegalaxy-eu/microgalaxy_technical_paper_2024/refs/heads/main/results/citations/technical_target.csv")
target_organisms <- fread("https://raw.githubusercontent.com/usegalaxy-eu/microgalaxy_technical_paper_2024/refs/heads/main/results/citations/targeted_organisms.csv")
years <- fread("https://raw.githubusercontent.com/usegalaxy-eu/microgalaxy_paper_2025/refs/heads/main/results/citations/years.csv")
methods <- fread("https://raw.githubusercontent.com/usegalaxy-eu/microgalaxy_paper_2025/refs/heads/main/results/citations/methods.csv")
target_technical <- fread("https://raw.githubusercontent.com/usegalaxy-eu/microgalaxy_paper_2025/refs/heads/main/results/citations/technical_target.csv")
target_organisms <- fread("https://raw.githubusercontent.com/usegalaxy-eu/microgalaxy_paper_2025/refs/heads/main/results/citations/targeted_organisms.csv")

years$year <- seq(2005, 2025)
years$year <- seq(2005, 2026)
years <- years |> melt(id.vars = "year", value.factor = FALSE, variable.factor = FALSE)
years$variable <- years$variable |> str_to_title()

Expand All @@ -70,15 +70,15 @@ gr1 <- years |>
ggplot(aes(year, value)) +

geom_point(aes(fill = variable), color = "grey25",
shape = 21, size = 5.5, stroke = .25,
shape = 21, size = 5.3, stroke = .25,
position = position_dodge(width = .9)) +

geom_col(aes(fill = variable), color = "grey25",
linewidth = .15,
position = position_dodge(width = .9)) +

geom_point(aes(color = variable),
size = 4.85,
size = 4.65,
position = position_dodge(width = .9)) +

scale_x_continuous(expand = c(0, 0)) +
Expand Down Expand Up @@ -138,7 +138,7 @@ gr2 <- p0 |>

strip.text = element_text(face = "bold"),

axis.title.x = element_text(margin = margin(t = 10)),
axis.title.x = element_blank(), # element_text(margin = margin(t = 10)),
axis.title.y = element_markdown(margin = margin(r = 10))
) +

Expand All @@ -157,22 +157,22 @@ multi <- (gr1 / gr2) +


```{r}
outfolder <- "../results/citations/"
outfolder <- "../docs/extended/"

dir.create(outfolder, showWarnings = FALSE)

ggsave(
plot = multi, filename = paste0(outfolder, "/citations.png"),
plot = multi, filename = paste0(outfolder, "/extended_figure_1.png"),
width = 9, height = 10, units = "in", dpi = 600
)

ggsave(
plot = multi, filename = paste0(outfolder, "/citations.svg"),
plot = multi, filename = paste0(outfolder, "/extended_figure_1.svg"),
width = 9, height = 10, units = "in", dpi = 600
)

ggsave(
plot = multi, filename = paste0(outfolder, "/citations.pdf"),
plot = multi, filename = paste0(outfolder, "/extended_figure_1.pdf"),
width = 9, height = 10, units = "in", device = cairo_pdf
)

Expand Down
564 changes: 564 additions & 0 deletions bin/citations-graphs.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file?

Large diffs are not rendered by default.

Binary file added bin/microGalaxy-tools.xlsx
Binary file not shown.
11 changes: 6 additions & 5 deletions bin/survey-figure.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library(stringr)
## Input data

```{r}
df <- "https://raw.githubusercontent.com/paulzierep/microgalaxy-survey/refs/heads/main/data/modified_answers.csv" |> fread()
df <- "https://raw.githubusercontent.com/usegalaxy-eu/microgalaxy_technical_paper_2024/refs/heads/main/docs/supplementary/supplementary_table_2.tsv" |> fread()
```

### Correct column names
Expand Down Expand Up @@ -221,6 +221,7 @@ library(ggh4x)

library(shadowtext)

library(paletteer)
library(tidytext)
```

Expand Down Expand Up @@ -299,13 +300,13 @@ gr <- df_plot |>
```{r}
# dir.create("survey-figure", showWarnings = FALSE)

outfolder <- "../results/survey"
outfolder <- "../docs/extended/"

dir.create(outfolder, showWarnings = FALSE)

ggsave(plot = gr, filename = paste0(outfolder, "/survey-results.png"), width = 9, height = 10, units = "in", dpi = 600)
ggsave(plot = gr, filename = paste0(outfolder, "/survey-results.pdf"), width = 9, height = 10, units = "in", device = cairo_pdf)
ggsave(plot = gr, filename = paste0(outfolder, "/survey-results.svg"), width = 9, height = 10, units = "in")
ggsave(plot = gr, filename = paste0(outfolder, "/extended_figure_2.png"), width = 9, height = 10, units = "in", dpi = 600)
ggsave(plot = gr, filename = paste0(outfolder, "/extended_figure_2.pdf"), width = 9, height = 10, units = "in", device = cairo_pdf)
ggsave(plot = gr, filename = paste0(outfolder, "/extended_figure_2.svg"), width = 9, height = 10, units = "in")
```


Expand Down
Loading