Skip to content

Commit

Permalink
publishing ok
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristianetaniguti committed Sep 16, 2022
1 parent 99257db commit e47b6c7
Show file tree
Hide file tree
Showing 62 changed files with 83 additions and 13,241 deletions.
71 changes: 55 additions & 16 deletions R/functions_upload.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,60 @@
#'
#' @keywords internal
prepare_examples <- function(example){
viewmap_tetra <- viewqtl_tetra <- NULL
if(example == "tetra_map"){
load(system.file("ext/viewmap_tetra.rda", package = "viewpoly"))
load(system.file("ext/viewqtl_tetra.rda", package = "viewpoly"))
if(example != "This will be updated"){
files <- list.files(system.file("ext/my_viewpoly_objects/", package = "viewpoly"))
ids <- read.csv(system.file("ext/info_data.csv", package = "viewpoly"), header = T)
idx <- which(ids$ID == example)
obj <- load(system.file(paste0("ext/my_viewpoly_objects/",ids$File[idx]), package = "viewpoly"))
obj <- get(obj)

structure(list(map=viewmap_tetra,
qtl=viewqtl_tetra,
fasta = "https://gesteira.statgen.ncsu.edu/files/genome-browser/Stuberosum_448_v4.03.fa.gz",
gff3 = "https://gesteira.statgen.ncsu.edu/files/genome-browser/Stuberosum_448_v4.03.gene_exons.gff3.gz",
vcf = NULL,
align = NULL,
wig = NULL,
version = packageVersion("viewpoly")),
class = "viewpoly")
}
# fasta
obj$fasta <- if(ids$fasta[idx] == "NULL") {
NULL
}else if(grepl("http", ids$fasta[idx])) {
ids$fasta[idx]
} else {
system.file(paste0("ext/my_genomes/",ids$fasta[idx]), package = "viewpoly")
}

#gff3
obj$gff3 <- if(ids$gff3[idx] == "NULL") {
NULL
}else if(grepl("http", ids$gff3[idx])) {
ids$gff3[idx]
} else {
system.file(paste0("ext/my_genomes/",ids$gff3[idx]), package = "viewpoly")
}

# vcf
obj$vcf <- if(ids$vcf[idx] == "NULL") {
NULL
}else if(grepl("http", ids$vcf[idx])) {
ids$vcf[idx]
} else {
system.file(paste0("ext/my_genomes/",ids$vcf[idx]), package = "viewpoly")
}

# align
obj$align <- if(ids$align[idx] == "NULL") {
NULL
}else if(grepl("http", ids$align[idx])) {
ids$align[idx]
} else {
system.file(paste0("ext/my_genomes/",ids$align[idx]), package = "viewpoly")
}

# wig
obj$wig <- if(ids$wig[idx] == "NULL") {
NULL
}else if(grepl("http", ids$wig[idx])) {
ids$wig[idx]
} else {
system.file(paste0("ext/my_genomes/",ids$wig[idx]), package = "viewpoly")
}

return(obj)
} else return(NULL)
}

#' Converts map information in custom format files to viewmap object
Expand Down Expand Up @@ -376,9 +415,9 @@ prepare_diaQTL <- function(scan1_list, scan1_summaries_list, fitQTL_list, BayesC
idx <- which(sapply(CI, is.null))
if(length(idx) != 0 | length(BayesCI_list_ord) != dim(qtl_info2)[1]){
if(length(idx) != 0)
CI[[idx]] <- c(NA, NA)
CI[[idx]] <- c(NA, NA)
else CI[[length(CI) + 1]] <- c(NA, NA)

}

CI <- do.call(rbind, CI)
Expand Down
18 changes: 15 additions & 3 deletions R/mod_upload.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ mod_upload_ui <- function(id){
column(width = 12,
fluidPage(
box(id= ns("box_example"), width = 12, solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, status="primary", title = actionLink(inputId = ns("exampleID"), label = tags$b("Available datasets")),
radioButtons(ns("example_map"), label = p("Selected dataset:"),
choices = c("Potato - Atlantic x B1829-5" = "tetra_map"),
selected = "tetra_map"), br(), br(), hr()
radioButtons(ns("example_map"), label = "Select dataset:",
choices = "This will be updated",
selected = "This will be updated"), br(), br(), hr()
)
)
)
Expand Down Expand Up @@ -59,6 +59,18 @@ mod_upload_server <- function(input, output, session, parent_session){
selected = "about")
})

# load datas
observe({
files <- list.files(system.file("ext/my_viewpoly_objects/", package = "viewpoly"))
ids <- read.csv(system.file("ext/info_data.csv", package = "viewpoly"), header = T)

choices <- as.list(ids$ID)
names(choices) <- ids$ID

updateRadioButtons(session, "example_map", label = "Select dataset:",
choices = choices,
selected = choices[[1]])
})

# Wait system for the uploads
loadExample = reactive({
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ It is optional to upload also:

### Documentation

Access the [tutorial](https://cristianetaniguti.github.io/viewpoly_vignettes/VIEWpoly_tutorial.html).
* Access the [tutorial](https://cristianetaniguti.github.io/viewpoly_vignettes/VIEWpoly_tutorial.html).

We also presented the app main features in [this video](https://www.youtube.com/watch?v=OBt_jebhfeY)
* We also presented the app main features in [this video](https://www.youtube.com/watch?v=OBt_jebhfeY)

If you would like to contribute to develop `VIEWpoly`, please check our [Contributing Guidelines](https://cristianetaniguti.github.io/viewpoly_vignettes/Contributing_guidelines.html).
* If you would like to contribute to develop `VIEWpoly`, please check our [Contributing Guidelines](https://cristianetaniguti.github.io/viewpoly_vignettes/Contributing_guidelines.html).

### References

Expand Down
8 changes: 5 additions & 3 deletions inst/ext/about.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ See more about this population [here](https://www.nature.com/articles/s41437-021

### Documentation

Access more information about how to make your data sets available through VIEWpoly [here](https://cristianetaniguti.github.io/viewpoly_vignettes/Publish_data_VIEWpoly.html).
* Access more information about how to make your data sets available through VIEWpoly [here](https://cristianetaniguti.github.io/viewpoly_vignettes/Publish_data_VIEWpoly.html).

Access VIEWpoly tutorial [here](https://cristianetaniguti.github.io/viewpoly_vignettes/VIEWpoly_tutorial.html).
* Access VIEWpoly tutorial [here](https://cristianetaniguti.github.io/viewpoly_vignettes/VIEWpoly_tutorial.html).

VIEWpoly main features are also presented in this [video](https://www.youtube.com/watch?v=OBt_jebhfeY).
* VIEWpoly main features are also presented in this [video](https://www.youtube.com/watch?v=OBt_jebhfeY).

* If you would like to contribute to develop `VIEWpoly`, please check our [Contributing Guidelines](https://cristianetaniguti.github.io/viewpoly_vignettes/Contributing_guidelines.html).

### References

Expand Down
Binary file removed inst/ext/beta.hat.tsv.gz
Binary file not shown.
Binary file removed inst/ext/blups.tsv.gz
Binary file not shown.
Binary file removed inst/ext/dosage.tsv.gz
Binary file not shown.
Binary file removed inst/ext/effects.tsv.gz
Binary file not shown.
93 changes: 0 additions & 93 deletions inst/ext/functions4tests.R

This file was deleted.

4 changes: 4 additions & 0 deletions inst/ext/info_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
File,ID,fasta,gff3,vcf,align,wig
example_data.RData,Potato - Atlantic x B1829-5 (genome links),https://gesteira.statgen.ncsu.edu/files/genome-browser/Stuberosum_448_v4.03.fa.gz,https://gesteira.statgen.ncsu.edu/files/genome-browser/Stuberosum_448_v4.03.gene_exons.gff3.gz,NULL,NULL,NULL
example_data.Rdata,Potato - Atlantic x B1829-5 (genome files),Stuberosum_sub.fa.gz,Stuberosum_sub.sorted.gff3.gz,NULL,NULL,NULL
example_data.RData,Potato - Atlantic x B1829-5 (without genome info),NULL,NULL,NULL,NULL,NULL
Binary file removed inst/ext/map.tsv.gz
Binary file not shown.
Binary file added inst/ext/my_genomes/Stuberosum_sub.fa.gz
Binary file not shown.
1 change: 1 addition & 0 deletions inst/ext/my_genomes/Stuberosum_sub.fa.gz.fai
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ST4.03ch01 349930 12 70 71
Binary file added inst/ext/my_genomes/Stuberosum_sub.fa.gz.gzi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added inst/ext/my_viewpoly_objects/example_data.RData
Binary file not shown.
Binary file removed inst/ext/phases.tsv.gz
Binary file not shown.
Binary file removed inst/ext/probs.tsv.gz
Binary file not shown.
Binary file removed inst/ext/profile.tsv.gz
Binary file not shown.
Binary file removed inst/ext/qtl_info.tsv.gz
Binary file not shown.
Binary file removed inst/ext/selected_mks.tsv.gz
Binary file not shown.
Binary file removed inst/ext/viewmap_tetra.rda
Binary file not shown.
Binary file removed inst/ext/viewqtl_tetra.rda
Binary file not shown.
3 changes: 0 additions & 3 deletions inst/tests/shinytest.R

This file was deleted.

29 changes: 0 additions & 29 deletions inst/tests/shinytest/github_actions_tests.R

This file was deleted.

Loading

0 comments on commit e47b6c7

Please sign in to comment.