Skip to content

Commit

Permalink
cleaner search panel + readme update with version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
bgpalmer committed Aug 16, 2023
1 parent 13ba6a1 commit 9452c7a
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 326 deletions.
1 change: 1 addition & 0 deletions R/ArchiveAndDeleteSamples.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

ArchiveAndDeleteSamples <- function(operation, data, comment, status, verification = TRUE){

print(data)
database <- Sys.getenv("SDB_PATH")
conn <- RSQLite::dbConnect(RSQLite::SQLite(), database)
RSQLite::dbBegin(conn)
Expand Down
5 changes: 4 additions & 1 deletion R/SearchSamples.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#' @export


SearchSamples <- function(sample_storage_type, filters = NULL, format = NULL, database = Sys.getenv("SDB_PATH"), config_yml = Sys.getenv("SDB_CONFIG"), include_internal_sample_id = FALSE) {
SearchSamples <- function(sample_storage_type, filters = NULL, format = "na", database = Sys.getenv("SDB_PATH"), config_yml = Sys.getenv("SDB_CONFIG"), include_internal_sample_id = FALSE) {

message("searching...")
db.results <- NULL
tryCatch({
container_tables <- list(
Expand Down Expand Up @@ -256,6 +258,7 @@ SearchSamples <- function(sample_storage_type, filters = NULL, format = NULL, da
dbmap$state <- "State"
dbmap$status <- "Status"


if (include_internal_sample_id) {

## Do date collection here because lubridate and purrr::map (used by dplyr sql backend) is not cooperating
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ A docker image for sampleDB can be pulled from [DockerHub](https://hub.docker.co
To pull from DockerHub, run the command below:

```bash
docker pull eppicenter/sampledb:v2.0.0
docker pull eppicenter/sampledb:v2.1.0
```

##### Option 2: Build the image

You can build the image instead of pulling from DockerHub. To do so, run the following command:

```bash
docker build -t eppicenter/sampledb:v2.0.0 .
docker build -t eppicenter/sampledb:v2.1.0 .
```

#### 3. Create your container

This is the final step. The host `localhost` and port `8080` will be used to access the application within the container, and all volumes needed to run the container are passed in on the command line. Notice that the sampleDB database volume is also include in the list of volumes.

```bash
docker run -d -p 8080:3838 -v /srv/shinyapps/:/srv/shiny-server -v /srv/shinylog/:/var/log/shiny-server -v sampledb_database:/usr/local/share/sampleDB --restart unless-stopped --name sampleDB eppicenter/sampledb:v2.0.0
docker run -d -p 8080:3838 -v /srv/shinyapps/:/srv/shiny-server -v /srv/shinylog/:/var/log/shiny-server -v sampledb_database:/usr/local/share/sampleDB --restart unless-stopped --name sampleDB eppicenter/sampledb:v2.1.0
```

#### 4. Access sampleDB
Expand Down Expand Up @@ -79,7 +79,7 @@ To install sampleDB at the site level, you can run the command below using an R
```R
remotes::install_github(
"https://github.com/EPPIcenter/sampleDB-rpackage",
ref = "v2.0.0",
ref = "v2.1.0",
lib = .libPaths()[1]
)
```
Expand All @@ -93,7 +93,7 @@ For a local install, the below command is sufficient within a regular RStudio or
```R
remotes::install_github(
"https://github.com/EPPIcenter/sampleDB-rpackage",
ref = "v2.0.0"
ref = "v2.1.0"
)
```

Expand Down
Loading

0 comments on commit 9452c7a

Please sign in to comment.