Skip to content

Commit

Permalink
Merge pull request #79 from viralemergence/add-image
Browse files Browse the repository at this point in the history
Add image
  • Loading branch information
colebrookson authored Oct 2, 2023
2 parents 6ff42f7 + 03d6c29 commit f27e7a3
Show file tree
Hide file tree
Showing 19 changed files with 869 additions and 11,189 deletions.
52 changes: 9 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,38 @@ on:
pull_request:
branches:
- main
# run once a week
# run once a week
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
workflow_dispatch:
jobs:
GenBank:
runs-on: ubuntu-latest
container: colebrookson/virion:latest
steps:
- uses: actions/checkout@v3
- uses: gautamkrishnar/keepalive-workflow@v1
- name: Setup Julia
uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v1
with:
version: 1.7
- name: Julia dependencies (DF)
run: julia -e 'using Pkg; Pkg.activate("."); Pkg.add("CSV"); Pkg.add("DataFrames")'
- name: NCBITaxonomy (version from MAIN branch!)
run: julia -e 'using Pkg; Pkg.activate("."); Pkg.add(PackageSpec(name="NCBITaxonomy", rev="main"))'
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Libraries for tidyverse
run: sudo apt-get install -y libharfbuzz-dev libfribidi-dev
- name: dependencies!!!!
- name: Download GenBank
run: |
sudo apt-get install libcurl4-openssl-dev libarchive-dev
sudo Rscript -e 'install.packages(c("taxize", "tidyverse", "RCurl", "readr", "vroom", "magrittr", "fs", "data.table", "zip", "rglobi", "lubridate", "R.utils"), repos = "http://cran.us.r-project.org")'
- name: Download GenBank
run: |
Rscript -e 'source("Code/02_1a_Download GenBank.R")'
Rscript -e 'source("Code/02_1a_Download GenBank.R")'
- name: Digest GenBank
run: |
Rscript -e 'source("Code/02_1b_Digest GenBank.R")'
- name: Format GenBank
run: |
Rscript -e 'source("Code/02_1c_Format GenBank.R")'
Rscript -e 'source("Code/02_1c_Format GenBank.R")'
- name: Save artifacts
uses: actions/upload-artifact@v2
with:
name: GenBankFormatted
path: Intermediate/Formatted/GenbankFormatted.csv.gz
Globi:
runs-on: ubuntu-latest
container: colebrookson/virion:latest
steps:
- uses: actions/checkout@v3
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Libraries for tidyverse
run: sudo apt-get install -y libharfbuzz-dev libfribidi-dev
- name: dependencies!!!!
run: |
sudo apt-get install libcurl4-openssl-dev libarchive-dev
sudo Rscript -e 'install.packages(c("taxize", "tidyverse", "RCurl", "readr", "vroom", "magrittr", "fs", "data.table", "zip", "devtools", "lubridate"), repos = "http://cran.us.r-project.org")'
sudo Rscript -e 'devtools::install_github("ropensci/rglobi")'
- name: Setup Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.7
- name: Julia dependencies (DF)
run: julia -e 'using Pkg; Pkg.activate("."); Pkg.add("CSV"); Pkg.add("DataFrames")'
- name: NCBITaxonomy (version from MAIN branch!)
run: julia -e 'using Pkg; Pkg.activate("."); Pkg.add(PackageSpec(name="NCBITaxonomy", rev="main"))'
- name: Download Globi
run: |
Rscript -e 'source("Code/02_3a_Download GLOBI.R")'
Expand All @@ -85,15 +56,10 @@ jobs:
path: Intermediate/Formatted/GLOBIFormatted.csv
Finish:
runs-on: ubuntu-latest
container: colebrookson/virion:latest
needs: [GenBank, Globi]
steps:
- uses: actions/checkout@v3
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: dependencies!!!
run: |
sudo apt-get install libcurl4-openssl-dev libarchive-dev libharfbuzz-dev libfribidi-dev
sudo Rscript -e 'install.packages(c("taxize", "tidyverse", "RCurl", "readr", "vroom", "magrittr", "fs", "data.table", "R.utils", "zip", "rglobi", "lubridate", "tidyft"), repos = "http://cran.us.r-project.org")'
- name: Get GenBank
uses: actions/download-artifact@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ Intermediate/Formatted/GenbankFormatted.csv
wc5/alt.bil
wc5/alt.hdr
Source/AllNuclMetadata.csv
Source/AllNuclMetadata.csv.gz
20 changes: 12 additions & 8 deletions Code/001_Julia functions.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
library(tidyverse)
#' Install Julia packages to use the functions for NCBI ========================
#'
#' Here we use the JuliaCall library to get the funcitons we need

# create install.ncbi() function ===============================================

install.ncbi <- function() {
library(JuliaCall)
julia_setup()
julia_install_package_if_needed("NCBITaxonomy")
julia_install_package_if_needed("DataFrames")
julia_install_package_if_needed("CSV")
julia_install_package_if_needed("ProgressMeter")
}

# install the packages if needed
JuliaCall::julia_install_package_if_needed("NCBITaxonomy")
JuliaCall::julia_install_package_if_needed("DataFrames")
JuliaCall::julia_install_package_if_needed("CSV")
JuliaCall::julia_install_package_if_needed("ProgressMeter")
}
Loading

0 comments on commit f27e7a3

Please sign in to comment.