Home
  • User Guide
  • Code Reference
  • Articles
  1. Installation
  • Home
  • User Guide
  • Installation

On this page

  • Prerequisites
  • Installation
    • Run Code with Github Codespace
  • Usage
    • Variables
  • Contributing
  • License
  • View source
  • Edit this page
  • Report an issue

Installation

Clone and install the software needed to run the scripts
  • Installation
  • Usage
  • Contributing
  • License
Tip

Below there are two ways to install this software, either on your local machine (see installation) or via a Github Codespace which does not require any software to be installed on your personal machine (see Github Codespace)

Prerequisites

  • R version 4.0.0 or higher
  • Windows, macOS, or Linux operating system

Installation

  1. Clone the repository:
Code
terminal
git clone https://github.com/NW-PaGe/private-lineages.git
  1. Navigate to the repo folder
Code
terminal
cd private-lineages
  1. Open up the lineages_test.Rproj R project:

Can double click on the file or open in a terminal window by typing

Code
terminal
lineages_test.Rproj
  1. Install renv

In the Rstudio window’s console, execute

Code
R console
install.packages('renv')
  1. Install all the packages in the root directory:
Code
R console
renv::restore()

Run Code with Github Codespace

If you want to run the code but don’t want to install anything on your local machine, use a Github Codespace.

  1. At the root of the repo, click on the Code drop down button
    • On the right there is a tab called Codespaces.
    • If there is an existing Codespace, use that one
    • If there are no Codespaces, you can create a new one. The default codespace configuration has R and Rstudio set up for it (so probably use that one)



  1. You can run Rstudio within a Codespace by:
    • Go into the VS Code section called “Ports” in the Codespace
    • Find the Rstudio port
    • Click the Open in Browser button





  1. Troubleshooting
    • If you make a new Codespace you may need to install the R packages onto the machine again
    • The easiest way is to open the Rstudio port (see point 2 above)
    • In the Rstudio console execute renv::restore() and follow its instructions. It should download all the packages in the renv folder in this repo

Now you can run this code in a browser window without needing to install any software on your computer 😎

Usage

The repo will output a .csv file called lineages.csv that will be updated whenever new lineages are updated from the CDC. You can refresh/fetch this git repo for new changes and the .csv file will be updated

To run the process:

  1. Run lineages script:
Code
R console
source("scripts/lineages_public_repo.R")
  1. Run the lineages classification script:
Code
R console
source("scripts/lineages_classification_for_test_repo.R")

Variables

The variables produced by the scripts are used in the Sequencing and Variants Report. Here’s a list:

Variables Description
cdc_class Variable indicating VOC (variant of concern) or VBM (variant being monitored)
who_name Variable indicating the WHO name
doh_variant_name Grouping variable in WA DOH Sequencing and Variant report
hex_code Hex color for doh_variant_name group
lineage_reporting_group Variable indicating reporting group of lineage coded as: 1: Currently monitoring 2: Formerly monitoring 3: Formerly circulating, not monitored
report_table_name Variable name in numerical/pango form for table outputs

Contributing

For details on how to contribute to this project, please read the NW-PaGe contributing guide

License

This repo uses an MIT license

🍦

 
  • View source
  • Edit this page
  • Report an issue