Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
3c0bc11
add LD and fitQTL Breeding-Insight/BIGapp#36
Cristianetaniguti Sep 18, 2024
4d542c6
adjust tab name
Cristianetaniguti Sep 18, 2024
1db6323
check ploidy PCA
Cristianetaniguti Sep 19, 2024
9d56f8a
colors always categorical PCA 3D
Cristianetaniguti Sep 19, 2024
8be91b9
fix #62
Cristianetaniguti Sep 19, 2024
0c9aeee
Merge pull request #61 from Breeding-Insight/main
Cristianetaniguti Sep 19, 2024
a5a6852
Merge pull request #56 from Cristianetaniguti/main
alex-sandercock Sep 20, 2024
2414f1d
Updated version
alex-sandercock Sep 21, 2024
01bd5bc
Bug with phenotype file ids
alex-sandercock Sep 21, 2024
a635591
Merge pull request #64 from Breeding-Insight/geno_updates
Cristianetaniguti Sep 23, 2024
2afdbb4
Added Maximize option to results windows
alex-sandercock Sep 23, 2024
cc49743
Removed extra .vcf from output name if present
alex-sandercock Sep 23, 2024
86bbcbf
added tab summary info
alex-sandercock Sep 24, 2024
f8ef96e
Updated read depth input format
alex-sandercock Sep 24, 2024
1fd3f67
Sidebar updates
alex-sandercock Sep 25, 2024
8cb5ab1
Merge pull request #67 from Breeding-Insight/geno_updates
Cristianetaniguti Sep 25, 2024
48dada1
Merge pull request #17 from Breeding-Insight/development
Cristianetaniguti Sep 25, 2024
dd9e66c
Added data check warning
alex-sandercock Sep 25, 2024
6cabc78
organize GWAS tabs #70
Cristianetaniguti Sep 25, 2024
d38e38a
table with all QTL + only one model for fit.qtl #70
Cristianetaniguti Sep 25, 2024
32bc489
Merge pull request #71 from Cristianetaniguti/main
alex-sandercock Sep 25, 2024
8d8866e
Merge pull request #72 from Breeding-Insight/development
alex-sandercock Sep 25, 2024
09f001f
Updated QTL infobox
alex-sandercock Sep 25, 2024
6b89d01
Updates to GWAS output
alex-sandercock Sep 26, 2024
d9816ab
Merge pull request #18 from Breeding-Insight/geno_updates
Cristianetaniguti Sep 26, 2024
cb634c2
Merge pull request #73 from Breeding-Insight/geno_updates
Cristianetaniguti Sep 26, 2024
b250f93
Removed dosage2vcf button
alex-sandercock Oct 2, 2024
5500433
Generalized dosage2vcf tab
alex-sandercock Oct 15, 2024
c1c7b48
Updated Y-axis label
alex-sandercock Oct 25, 2024
96fde77
Merge pull request #76 from Breeding-Insight/geno_updates
alex-sandercock Nov 18, 2024
9b3adad
Update logo on README.md
alex-sandercock Nov 20, 2024
7045dac
function docs + input files exceptions
Cristianetaniguti Dec 6, 2024
2a613e8
Merge pull request #19 from Breeding-Insight/cris_bridge
Cristianetaniguti Dec 8, 2024
09fd245
UI and Logo Updates
alex-sandercock Dec 13, 2024
84582bf
Added Updates Info Button
alex-sandercock Dec 18, 2024
e3fe949
UI Updates
alex-sandercock Dec 19, 2024
37e67d6
Merge pull request #79 from Breeding-Insight/mvp_updates
Cristianetaniguti Dec 19, 2024
8d571e9
Merge pull request #80 from Breeding-Insight/development
Cristianetaniguti Dec 19, 2024
c7e6b1c
Merge pull request #20 from Breeding-Insight/cris_bridge
Cristianetaniguti Dec 19, 2024
f5b9f9a
update help #43
Cristianetaniguti Dec 19, 2024
afadbd7
adjusts
Cristianetaniguti Dec 19, 2024
5af8696
Merge pull request #81 from Cristianetaniguti/main
Cristianetaniguti Dec 19, 2024
d51c36f
Merge pull request #82 from Breeding-Insight/cris_bridge
alex-sandercock Dec 20, 2024
c586efd
Merge pull request #83 from Breeding-Insight/development
alex-sandercock Dec 20, 2024
9813e52
GS and UI updates
alex-sandercock Dec 20, 2024
1655ce5
Merge pull request #84 from Breeding-Insight/mvp_updates
alex-sandercock Dec 20, 2024
f6288fa
Check for Updates fix
alex-sandercock Dec 21, 2024
05ad664
Added PIC calculation
alex-sandercock Dec 21, 2024
15e81da
Suppressed console output and updated warnings
alex-sandercock Dec 22, 2024
0b06195
UI Updates
alex-sandercock Dec 22, 2024
adae187
Fixed GWAS bug
alex-sandercock Dec 22, 2024
b30e8dc
Updated Info Dropdowns
alex-sandercock Dec 22, 2024
d92cea3
Help Section Updates
alex-sandercock Dec 22, 2024
2958942
UI Updates
alex-sandercock Dec 22, 2024
4d75b7f
Merge pull request #88 from Breeding-Insight/mvp_updates
alex-sandercock Dec 22, 2024
af59936
Update README.md
alex-sandercock Dec 22, 2024
9fcb981
Merge branch 'main' into development
alex-sandercock Dec 22, 2024
656d8ba
Update test-diversity.R
alex-sandercock Dec 22, 2024
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
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: BIGapp
Title: Breeding Insight Genomics Shiny Application
Version: 0.6.1
Version: 1.0.0
Authors@R:
c(
person(c("Alexander", "M."), "Sandercock",
Expand All @@ -20,10 +20,9 @@ Authors@R:
role = "aut"),
person("Breeding Insight Team",
role = "aut"))
Description: This R shiny app provides a web-based user friendly way for our internal and
external collaborators to analyze genomic data without needing to use command-line tools.
Description: This R shiny app provides a web-based user friendly way for researchers to analyze genomic data without needing to use command-line tools.
Initial supported analyses will include the mature genomics/bioinformatics pipelines developed
within Breeding Insight, with additional analyses continuing to be added.
within Breeding Insight, with additional analyses continuing to be added. Both diploid and polyploid species are supported.
License: Apache License (== 2.0)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand All @@ -32,6 +31,7 @@ biocViews:
Imports:
vcfR (>= 1.15.0),
adegenet,
curl,
DT,
dplyr,
bs4Dash,
Expand All @@ -51,6 +51,7 @@ Imports:
GWASpoly,
AGHmatrix,
factoextra,
httr,
future,
shinycssloaders,
RColorBrewer,
Expand Down
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ importFrom(bs4Dash,updatebs4TabItems)
importFrom(bs4Dash,valueBox)
importFrom(bs4Dash,valueBoxOutput)
importFrom(config,get)
importFrom(curl,curl_fetch_memory)
importFrom(curl,new_handle)
importFrom(factoextra,get_eigenvalue)
importFrom(future,availableCores)
importFrom(golem,activate_js)
Expand All @@ -72,8 +74,12 @@ importFrom(graphics,strheight)
importFrom(graphics,strwidth)
importFrom(graphics,text)
importFrom(graphics,title)
importFrom(httr,GET)
importFrom(httr,content)
importFrom(httr,status_code)
importFrom(matrixcalc,is.positive.definite)
importFrom(plotly,add_markers)
importFrom(plotly,ggplotly)
importFrom(plotly,layout)
importFrom(plotly,plot_ly)
importFrom(plotly,plotlyOutput)
Expand Down
4 changes: 2 additions & 2 deletions R/GS_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ GBLUP_genomic_prediction <- function(pheno_dat, Geno.mat, cycles, folds, traits,
results[(((r-1)*5)+fold), (length(traits)+2)] <- fold

# Extract GEBVs
GEBVs_fold[, trait_idx] <- traitpred$g[test] #Confirm it is accuract to calculate the GEBVs for testing group from the trained model
GEBVs_fold[, trait_idx] <- traitpred$g[test]

# Calculate heritability (these are wrong)
# Calculate heritability (*confirm this calculation* - either way will not report to user)
Vu <- traitpred$Vg
Ve <- traitpred$Ve
heritability_scores[(((r-1)*5)+fold), trait_idx] <- Vu / (Vu + Ve)
Expand Down
6 changes: 3 additions & 3 deletions R/MyFun_BIC_Meng.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@

#' function for BIC calculation
#'
#' @param y describe documentation
#' @param PC describe documentation
#' @param K describe documentation
#' @param y length N vector
#' @param PC matrix of principal components with N rows and P columns
#' @param K kinship matrix with N rows and N columns
#'
#' @import rrBLUP
#' @importFrom MASS ginv
Expand Down
87 changes: 87 additions & 0 deletions R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#' @param input,output,session Internal parameters for {shiny}.
#' DO NOT REMOVE.
#' @import shiny
#' @importFrom httr GET content status_code
#' @importFrom curl new_handle curl_fetch_memory
#' @noRd
app_server <- function(input, output, session) {
# Your application server logic
Expand Down Expand Up @@ -68,6 +70,91 @@ app_server <- function(input, output, session) {
)
))
})

#Check for updates from GitHub for BIGapp
get_latest_github_commit <- function(repo, owner) {
url <- paste0("https://api.github.com/repos/", owner, "/", repo, "/releases/latest")
response <- GET(url)
content <- content(response, "parsed")

if (status_code(response) == 200) {
tag_name <- content$tag_name
clean_tag_name <- sub("-.*", "", tag_name)
clean_tag_name <- sub("v", "", clean_tag_name)
return(clean_tag_name)
} else {
return(NULL)
}
}

is_internet_connected <- function() {
handle <- new_handle()
success <- tryCatch({
curl_fetch_memory("https://www.google.com", handle = handle)
TRUE
}, error = function(e) {
FALSE
})
return(success)
}

observeEvent(input$updates_info_button, {
# Check internet connectivity
if (!is_internet_connected()) {
# Display internet connectivity issues message
showModal(modalDialog(
title = "No Internet Connection",
easyClose = TRUE,
footer = tagList(
modalButton("Close")
),
"Please check your internet connection and try again."
))
return()
}

package_name <- "BIGapp"
repo_name <- "BIGapp" # GitHub repo name
repo_owner <- "Breeding-Insight" # User or organization name

# Get the installed version
installed_version <- as.character(packageVersion(package_name))

# Get the latest version from GitHub (can be tag version or latest commit)
latest_commit <- get_latest_github_commit(repo_name, repo_owner)

# Compare versions and prepare message
if (latest_commit > installed_version) {
update_status <- "A new version is available. Please update your package."
# Prepare styled HTML text for the modal
message_html <- paste(
"Installed version:", installed_version, "<br>",
#"Latest version commit SHA:", latest_commit, "<br>",
"<span>A new version is available on GitHub!</span><br>",
"<span style='color: red;'>Please update your package.</span>"
)
} else {
update_status <- "Your package is up-to-date!"
# Prepare non-styled text for no update needed
message_html <- paste(
"Installed version:", installed_version, "<br>",
#"Latest version commit SHA:", latest_commit, "<br>",
update_status
)
}

# Display message in a Shiny modal
showModal(modalDialog(
title = "BIGapp Updates",
size = "m",
easyClose = TRUE,
footer = tagList(
modalButton("Close")
),
# Use HTML to format the message and include styling
HTML(message_html)
))
})

#Download Session Info
output$download_session_info <- downloadHandler(
Expand Down
38 changes: 24 additions & 14 deletions R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,53 @@ app_ui <- function(request) {
href = "#",
"Session Info",
onclick = "Shiny.setInputValue('session_info_button', Math.random())"
),
tags$a(
class = "dropdown-item",
href = "#",
"Check for Updates",
onclick = "Shiny.setInputValue('updates_info_button', Math.random())"
)
)
)
),
help = NULL, #This is the default bs4Dash button to control the presence of tooltips and popovers, which can be added as a user help/info feature.
bs4DashSidebar(
skin="light", status = "info",
skin="light",
status = "info",
fixed=TRUE,
#minified = F,
expandOnHover = TRUE,
sidebarMenu(id = "MainMenu",
flat = FALSE,
tags$li(class = "header", style = "color: grey; margin-top: 10px; margin-bottom: 10px; padding-left: 15px;", "Menu"),
menuItem("Home", tabName = "welcome", icon = icon("house")),
menuItem("Home", tabName = "welcome", icon = icon("house"),startExpanded = FALSE),
tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "Genotype Processing"),
menuItem("DArT Report2VCF", tabName = "dosage2vcf", icon = icon("share-from-square")),
menuItem("Updog Dosage Calling", tabName = "updog", icon = icon("list-ol")),
menuItem("Convert to VCF", tabName = "dosage2vcf", icon = icon("share-from-square")),
menuItem("Dosage Calling", tabName = "updog", icon = icon("list-ol")),
menuItem("VCF Filtering", tabName = "filtering", icon = icon("filter")),
tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "Summary Metrics"),
menuItem("Genomic Diversity", tabName = "diversity", icon = icon("chart-pie")),
tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "Population Structure"),
menuItem("PCA", tabName = "pca", icon = icon("chart-simple")),
menuItem("DAPC", tabName = "dapc", icon = icon("circle-nodes")),
tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "Summary Metrics"),
menuItem("Genomic Diversity", tabName = "diversity", icon = icon("chart-pie")),
tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "GWAS"),
menuItem("GWASpoly", tabName = "gwas", icon = icon("think-peaks")),
menuItem("GWASpoly", tabName = "gwas", icon = icon("think-peaks")),
tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "Genomic Selection"),
menuItem(
span("Predictive Ability", bs4Badge("beta", position = "right", color = "success")),
span("Predictive Ability"),
tabName = "prediction_accuracy",
icon = icon("right-left")),
menuItem(
span("Genomic Prediction", bs4Badge("beta", position = "right", color = "success")),
span("Genomic Prediction"),
tabName = "prediction",
icon = icon("angles-right")),
tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "Information"),
menuItem("Source Code", icon = icon("circle-info"), href = "https://www.github.com/Breeding-Insight/Genomics_Shiny_App"),
menuItem(
span("Job Queue", bs4Badge("demo", position = "right", color = "warning")),
tabName = "slurm",
icon = icon("clock")),
#menuItem(
# span("Job Queue", bs4Badge("demo", position = "right", color = "warning")),
# tabName = "slurm",
# icon = icon("clock")),
menuItem("Help", tabName = "help", icon = icon("circle-question"))
)
),
Expand All @@ -94,7 +104,7 @@ app_ui <- function(request) {
),
left = div(
style = "display: flex; align-items: center; height: 100%;", # Center the version text vertically
"v0.6.1")
"v1.0.0")
),
dashboardBody(
disconnectMessage(), #Adds generic error message for any error if not already accounted for
Expand Down
Loading