Skip to content

Commit

Permalink
1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
agouy committed Feb 2, 2021
1 parent 605ce91 commit f987815
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
33 changes: 21 additions & 12 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ suppressPackageStartupMessages({
library(hierfstat)
library(DT)
library(car)
library(plotly)
})

shinyServer(function(input, output) {
Expand Down Expand Up @@ -514,7 +515,7 @@ shinyServer(function(input, output) {
})

# plot in the reactive UI
output$plotIndices <- renderPlot({
output$plotIndices <- renderPlotly({

if(is.null(input$selectPop2)) return(NULL)
else taB <- reacIndices()[[input$selectPop2]]
Expand All @@ -525,21 +526,29 @@ shinyServer(function(input, output) {
if(is.null(input$plotIndicesFOR)) return(NULL)

par(mar=rep(input$margin,4))
barplot(
dat[,input$plotIndicesFOR],
names.arg = dat[,"locus"],
horiz = TRUE,
las = 1,
col = transp(input$barplotcolor, input$transparency),
border = as.numeric(input$borderbarplot),
cex.axis = input$cexaxis,
cex.names = input$cexaxis,
xlab = input$plotIndicesFOR
library(plotly)

fig <- plot_ly(
x = dat[, input$plotIndicesFOR],
y = dat[, "locus"],
name = "bp_for",
type = "bar",
text = paste0(
"Locus: ", dat[, "locus"],
"\nValue: ", round(dat[, input$plotIndicesFOR], 4)
),
hoverinfo = 'text',
marker = list(color = transp(input$barplotcolor, input$transparency))
) %>% layout(
xaxis = list(title = input$plotIndicesFOR, zeroline = FALSE),
yaxis = list(title = "Locus")
)

(fig)
})

output$plotFOR <- renderUI({
plotOutput('plotIndices', width=paste(input$width,"%",sep=""),
plotlyOutput('plotIndices', width=paste(input$width,"%",sep=""),
height=input$height)
})

Expand Down
13 changes: 10 additions & 3 deletions ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ shinyUI(

navbarPage(

"STRAF 1.3.2: STR Analysis for Forensics",
"STRAF 1.3.3: STR Analysis for Forensics",

##### ANALYSIS TAB ----------------------------------------------------------
tabPanel(
Expand All @@ -20,6 +20,12 @@ shinyUI(
theme = "bootstrap.css",
tags$head(includeHTML(("./www/googleanalytics.html"))),
tags$head(tags$style(type="text/css", ".container-fluid {max-width: 1200px}")),
tags$head(tags$style('body {font-family: Arial;}')),
tags$head(tags$style('table {font-family: Arial;}')),
tags$head(tags$style('h1 {font-family: Arial;}')),
tags$head(tags$style('h2 {font-family: Arial;}')),
tags$head(tags$style('h3 {font-family: Arial;}')),
tags$head(tags$style('h4 {font-family: Arial;}')),

sidebarLayout(

Expand Down Expand Up @@ -60,8 +66,8 @@ shinyUI(
condition="input.hidegraph",

p("Barplot color"),
colourInput("barplotcolor", NULL, "#AEA79F", showColour = "background"),
checkboxInput("borderbarplot", "Bar border", TRUE),
colourInput("barplotcolor", NULL, "#36648B", showColour = "background"),
checkboxInput("borderbarplot", "Bar border", FALSE),
sliderInput("transparency", "Tranparency", 0, 1, 0.8, ticks = FALSE),
sliderInput("width", "Plot width", 40, 100, 100, ticks = FALSE, post = "%"),
sliderInput("height", "Plot height", 300, 800, 500, ticks = FALSE, post = "px"),
Expand Down Expand Up @@ -450,6 +456,7 @@ shinyUI(
h3("Updates"),

tags$ul(
tags$li("1.3.3 (03/02/2021) – Minor bug fixes in file conversion and PIC computation. Improved graphics."),
tags$li("1.3.0 (01/02/2021) – STRAF can convert files to the Genepop and Familias formats. A File conversion tab has been added."),
tags$li("1.2.2 (09/01/2021) – STRAF has moved to an AWS server (without any changes in the License)."),
tags$li("1.1.2 (03/10/2020) – Preparation for integration to Tercen; few minor updates"),
Expand Down

0 comments on commit f987815

Please sign in to comment.