Skip to content

Commit

Permalink
Merge pull request #57 from Gregor-Mendel-Institute/1.3
Browse files Browse the repository at this point in the history
Merge 1.3 > master
  • Loading branch information
phue committed Jan 11, 2021
2 parents 409d199 + bf0d2c5 commit 749f4a2
Show file tree
Hide file tree
Showing 27 changed files with 254 additions and 170 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/docker_base.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Container (Base)
name: Container build (Base)

on:
push:
Expand All @@ -8,25 +8,20 @@ on:

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
name: Push to quay.io
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: beckerlab/aradeepopsis-base
path: containers/base
tag_with_ref: true
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: gregor-mendel-institute/aradeepopsis/aradeepopsis-base
path: containers/base
tag_with_ref: true

- name: Login to quay.io
env:
QUAY_USER: ${{ secrets.REGISTRY_USER }}
QUAY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: podman login -u ${QUAY_USER} -p ${QUAY_PASSWORD} quay.io

- name: Build container
run: podman build --tag beckerlab/aradeepopsis-base containers/base

- name: Push container
run: podman push beckerlab/aradeepopsis-base docker://quay.io/beckerlab/aradeepopsis-base:${GITHUB_REF##*/}
33 changes: 14 additions & 19 deletions .github/workflows/docker_dpp.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Container (DPP)
name: Container build (DPP)

on:
push:
Expand All @@ -8,25 +8,20 @@ on:

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
name: Push to quay.io
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: beckerlab/aradeepopsis-dpp
path: containers/addons/dpp
tag_with_ref: true
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: gregor-mendel-institute/aradeepopsis/aradeepopsis-dpp
path: containers/addons/dpp
tag_with_ref: true

- name: Login to quay.io
env:
QUAY_USER: ${{ secrets.REGISTRY_USER }}
QUAY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: podman login -u ${QUAY_USER} -p ${QUAY_PASSWORD} quay.io

- name: Build container
run: podman build --tag beckerlab/aradeepopsis-dpp containers/addons/dpp

- name: Push container
run: podman push beckerlab/aradeepopsis-dpp docker://quay.io/beckerlab/aradeepopsis-dpp:${GITHUB_REF##*/}
33 changes: 14 additions & 19 deletions .github/workflows/docker_shiny.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Container (Shiny)
name: Container build (Shiny)

on:
push:
Expand All @@ -8,25 +8,20 @@ on:

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
name: Push to quay.io
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: beckerlab/aradeepopsis-shiny
path: containers/shiny
tag_with_ref: true
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: gregor-mendel-institute/aradeepopsis/aradeepopsis-shiny
path: containers/shiny
tag_with_ref: true

- name: Login to quay.io
env:
QUAY_USER: ${{ secrets.REGISTRY_USER }}
QUAY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: podman login -u ${QUAY_USER} -p ${QUAY_PASSWORD} quay.io

- name: Build container
run: podman build --tag beckerlab/aradeepopsis-shiny containers/shiny

- name: Push container
run: podman push beckerlab/aradeepopsis-shiny docker://quay.io/beckerlab/aradeepopsis-shiny:${GITHUB_REF##*/}
2 changes: 1 addition & 1 deletion .github/workflows/minimal_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
nxf_ver: ["20.01.0", ""]
nxf_ver: ["20.07.1", ""]
steps:
- uses: actions/checkout@v2

Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [v1.3](https://github.com/Gregor-Mendel-Institute/aradeepopsis/releases/tag/v1.3) - 2021-01-11

* changed container registry from docker.io to quay.io
* improved image visualization and plot rendering in Shiny app (see [#54](https://github.com/Gregor-Mendel-Institute/aradeepopsis/issues/54)) thanks @dschneiderch for input
* updated `scikit-image` `0.17.2` > `0.18.1`
* updated `imagemagick` dependency `7.0.10_23` > `7.0.10_28`
* updated `shinycssloaders` dependency `0.3` > `1.0.0`
* updated `slickr` dependency `0.4.9` > `0.5.0`
* added publication doi to pipeline manifest
* changed (back) download links in pipeline to fetch pretrained models from Dropbox instead of Zenodo ([#53](https://github.com/Gregor-Mendel-Institute/aradeepopsis/issues/53#issue-779431868))
* added charliecloud profile (needs nextflow >= 20.12.0-edge)
* fixed plotting of leaf states over time in Shiny app (when appropriate metadata are provided)
* added config for LRZ coolmuc2

## [v1.2.1](https://github.com/Gregor-Mendel-Institute/aradeepopsis/releases/tag/v1.2.1) - 2020-07-23

* updated pipeline to fetch trained models from the deposited [Zenodo record](https://doi.org/10.5281/zenodo.3946321) instead of Dropbox
Expand Down Expand Up @@ -30,4 +44,4 @@

## [v1.0](https://github.com/Gregor-Mendel-Institute/aradeepopsis/releases/tag/v1.0) - 2020-04-02

Initial pipeline release
Initial pipeline release
3 changes: 0 additions & 3 deletions Jenkinsfile

This file was deleted.

9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,9 @@
![Latest Release](https://img.shields.io/github/v/release/Gregor-Mendel-Institute/aradeepopsis?sort=semver)
![License](https://img.shields.io/github/license/Gregor-Mendel-Institute/aradeepopsis)
[![DOI](https://zenodo.org/badge/240287274.svg)](https://zenodo.org/badge/latestdoi/240287274)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A520.01.0-important.svg)](https://www.nextflow.io/)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A520.07.1-important.svg)](https://www.nextflow.io/)
[![conda](https://img.shields.io/badge/install%20with-conda-brightgreen.svg)](https://conda.io/)

| Container | Image size | Pulls | Latest version |
| :---: | :---: | :---: | :---: |
| ![Docker Container (Base)](https://github.com/Gregor-Mendel-Institute/aradeepopsis/workflows/Docker%20Container%20(Base)/badge.svg?branch=master) | ![Docker Size (Base)](https://img.shields.io/docker/image-size/beckerlab/aradeepopsis-base?sort=semver) | ![Pulls](https://img.shields.io/docker/pulls/beckerlab/aradeepopsis-base) | ![Image Tag](https://img.shields.io/docker/v/beckerlab/aradeepopsis-base?sort=semver) |
| ![Docker Container (Shiny)](https://github.com/Gregor-Mendel-Institute/aradeepopsis/workflows/Docker%20Container%20(Shiny)/badge.svg?branch=master) | ![Docker Size (Shiny)](https://img.shields.io/docker/image-size/beckerlab/aradeepopsis-shiny?sort=semver) | ![Pulls](https://img.shields.io/docker/pulls/beckerlab/aradeepopsis-shiny) | ![Image Tag](https://img.shields.io/docker/v/beckerlab/aradeepopsis-shiny?sort=semver) |
| ![Docker Docker (DPP)](https://github.com/Gregor-Mendel-Institute/aradeepopsis/workflows/Docker%20Container%20(DPP)/badge.svg?branch=master) | ![Docker Size (DPP)](https://img.shields.io/docker/image-size/beckerlab/aradeepopsis-dpp?sort=semver) | ![Pulls](https://img.shields.io/docker/pulls/beckerlab/aradeepopsis-dpp) | ![Image Tag](https://img.shields.io/docker/v/beckerlab/aradeepopsis-base?sort=semver) |


# Introduction

`ARADEEPOPSIS` is a software tool that enables plant researchers to non-invasively score plant growth, biomass accumulation and senescence from image data in a highly parallelized, high throughput, yet easy to use manner.
Expand Down
53 changes: 28 additions & 25 deletions assets/shiny/app.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Copyright (C) 2019-2020 Patrick Hüther
# Copyright (C) 2019-2021 Patrick Hüther
#
# This file is part of araDeepopsis.
# araDeepopsis free software: you can redistribute it and/or modify
# This file is part of ARADEEPOPSIS.
# ARADEEPOPSIS is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# araDeepopsis is distributed in the hope that it will be useful,
# ARADEEPOPSIS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with araDeepopsis. If not, see <https://www.gnu.org/licenses/>.
# along with ARADEEPOPSIS. If not, see <https://www.gnu.org/licenses/>.

library(shiny)
library(slickR)
Expand Down Expand Up @@ -42,10 +42,10 @@ traitcount <- ncol(data) - 2 # exclude filename and suffix
imagecount <- nrow(data)

# Define UI
ui <- navbarPage(title="aradeepopsis", id="nav", theme = shinytheme("flatly"),
ui <- navbarPage(title=a("aradeepopsis", href="https://github.com/Gregor-Mendel-Institute/aradeepopsis", target="_blank"), windowTitle = "ARADEEPOPSIS", id="nav", theme = shinytheme("flatly"), collapsible=TRUE,
tabPanel("Rosette Carousel",
sliderInput("chunk", label = "Select chunk:", min = 1, max = ceiling(imagecount/60), value = 1, width = '100%', step = 1),
slickROutput("slickr",width='100%',height='400px') %>% withSpinner()
slickROutput("slickr", width='auto', height='auto') %>% withSpinner()
),
tabPanel("Rosette Explorer",
sidebarPanel(
Expand Down Expand Up @@ -92,7 +92,7 @@ ui <- navbarPage(title="aradeepopsis", id="nav", theme = shinytheme("flatly"),
div(style = "overflow-x:scroll;", tableOutput("meta")),
varSelectizeInput("file","Select column containing the filename", data = NULL),
varSelectizeInput("date","Select column containing the timestamp", data = NULL),
textInput("date_format","Enter timestamp format",value="%y-%m-%d"),
textInput("date_format",HTML('Enter timestamp <a href="https://rdrr.io/r/base/strptime.html">format</a>'),value="%y-%m-%d"),
varSelectizeInput("groupvar","Select column to group by", data = NULL),
actionButton("merge_data", "Analyze!"),
conditionalPanel(
Expand Down Expand Up @@ -129,18 +129,18 @@ server <- function(input, output, session) {
updateSelectizeInput(session, "explorer_files", choices = c(imagenames), server = TRUE)

output$mask <- renderImage(deleteFile=FALSE,{
list(src = glue::glue("diagnostics/mask/mask_{input$explorer_files}.png"),width=400,height=400)
list(src = glue::glue("diagnostics/mask/mask_{input$explorer_files}.png"),width=600,height="auto")
})
output$hull <- renderImage(deleteFile=FALSE,{
list(src = glue::glue("diagnostics/convex_hull/hull_{input$explorer_files}.png"),width=400,height=400)
list(src = glue::glue("diagnostics/convex_hull/hull_{input$explorer_files}.png"),width=600,height="auto")
})
output$rosette <- renderImage(deleteFile=FALSE,{
list(src = glue::glue("diagnostics/crop/crop_{input$explorer_files}.jpeg"),width=400,height=400)
list(src = glue::glue("diagnostics/crop/crop_{input$explorer_files}.jpeg"),width=600,height="auto")
})
output$overlay <- renderImage(deleteFile=FALSE,{
list(src = glue::glue("diagnostics/overlay/overlay_{input$explorer_files}.jpeg"),width=400,height=400)
list(src = glue::glue("diagnostics/overlay/overlay_{input$explorer_files}.jpeg"),width=600,height="auto")
})
output$color <- renderPlot({
output$color <- renderPlot(width=600,height=600,{
img <- readJPEG(glue::glue("diagnostics/crop/crop_{input$explorer_files}.jpeg"))

r <- img[,,1] %>% as_tibble() %>% pivot_longer(everything()) %>% mutate(name=1)
Expand Down Expand Up @@ -214,26 +214,27 @@ server <- function(input, output, session) {
joined() %>%
select(dateVar,groupVar,trait := !!input$exp_traits) %>%
ggplot(aes(x=dateVar,y=trait,colour=groupVar)) +
stat_summary(geom="line") +
stat_summary(geom="line", size=1.5) +
stat_summary(geom="pointrange") +
scale_color_viridis_d(option="A") +
scale_color_viridis_d(option="A", end=0.9) +
labs(x="time",y="trait value",colour=element_blank()) +
theme_bw()
})
output$leafstates <- renderPlot({
joined() %>%
select(file_name,groupVar,dateVar,matches("norm_area|antho_area|senesc_area")) %>%
select(file,groupVar,dateVar,matches("norm_area|antho_area|senesc_area")) %>%
pivot_longer(starts_with("class_"),names_to = "state") %>%
group_by(groupVar,dateVar,file_name) %>%
group_by(groupVar,dateVar,file) %>%
mutate(relativeFrac=value/sum(value)) %>%
ggplot(aes(x = dateVar, y = relativeFrac, colour=state)) +
stat_summary(geom="line") +
stat_summary(geom="line", size=1.5) +
stat_summary(geom="pointrange") +
scale_color_manual(values = c("class_norm_area" = rgb(31,158,137, maxColorValue = 255),
"class_antho_area" = rgb(72,40,120, maxColorValue = 255),
"class_senesc_area" = rgb(253,231,37, maxColorValue = 255))) +
scale_y_continuous(labels = scales::percent) +
labs(x="time",y="% of plant area",colour=element_blank()) +
facet_wrap(~groupVar) +
theme_bw()
})
# show a description if Rosette Experiment is selected
Expand All @@ -243,12 +244,14 @@ server <- function(input, output, session) {
modalDialog(
title="Experimental feature!",
HTML("This feature is meant to add metadata to the pipeline result, allowing to visualize traits over time.<br>
It requires a table with metadata in csv format.<br>
Such metadata has to contain one row per input image and columns with the following information:<br>
- filename of the original image<br>
- timestamp when the image was recorded<br>
- <a href='https://rdrr.io/r/base/strptime.html'>format</a> of the timestamp<br>
- variable by which the result should be grouped (such as a genotype ID)")
It requires a csv table with metadata that is then joined with the pipeline result.<br>
<br>
Such metadata has to contain one row per input image and the following columns:<br>
- Filenames of the original images <br>
- Timestamps when the images were recorded<br>
- Variable(s) by which the result should be grouped (such as genotype or accession ID)<br>
<br>
Note: If the 'file' column of aradeepopsis_traits.csv is used to extract such metadata, trait columns should be removed before uploading")
)
)
}
Expand All @@ -262,7 +265,7 @@ server <- function(input, output, session) {
# this drastically improves page loading time
chunks <- if (imagecount > 60) split(imagenames$file, ceiling(seq_along(imagenames$file)/60)) else split(imagenames$file, 1)

opts <- settings(slidesToShow = 6, slidesToScroll = 6)
opts <- settings(slidesToShow=6, slidesToScroll=6, responsive=htmlwidgets::JS("[{breakpoint: 1440,settings: {slidesToShow: 3,slidesToScroll: 3}},{breakpoint: 680,settings: {slidesToShow: 1,slidesToScroll: 1}}]"))

overlay <- slickR(glue::glue("diagnostics/overlay/overlay_{chunks[[input$chunk]]}.jpeg"), height = 200) + opts
mask <- slickR(glue::glue("diagnostics/mask/mask_{chunks[[input$chunk]]}.png"), height = 200) + opts + settings(arrows = F)
Expand Down
8 changes: 4 additions & 4 deletions bin/data_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

# Copyright (C) 2019-2020 Patrick Hüther
#
# This file is part of araDeepopsis.
# araDeepopsis free software: you can redistribute it and/or modify
# This file is part of ARADEEPOPSIS.
# ARADEEPOPSIS is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# araDeepopsis is distributed in the hope that it will be useful,
# ARADEEPOPSIS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with araDeepopsis. If not, see <https://www.gnu.org/licenses/>.
# along with ARADEEPOPSIS. If not, see <https://www.gnu.org/licenses/>.

import tensorflow as tf

Expand Down
8 changes: 4 additions & 4 deletions bin/frozen_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

# Copyright (C) 2019-2020 Patrick Hüther
#
# This file is part of araDeepopsis.
# araDeepopsis free software: you can redistribute it and/or modify
# This file is part of ARADEEPOPSIS.
# ARADEEPOPSIS is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# araDeepopsis is distributed in the hope that it will be useful,
# ARADEEPOPSIS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with araDeepopsis. If not, see <https://www.gnu.org/licenses/>.
# along with ARADEEPOPSIS. If not, see <https://www.gnu.org/licenses/>.
# ======================================================================
# Portions of this code are modifications based on work created and
# shared by Google and used according to terms described in the
Expand Down
Loading

0 comments on commit 749f4a2

Please sign in to comment.