-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01-10-os-repos.qmd
50 lines (41 loc) · 2.45 KB
/
01-10-os-repos.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# OpenSAFELY repositories
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, fig.align = "center")
```
- OpenSAFELY is a system of Python packages (opensafely and cohortextractor) which run various Docker containers
- The main GitHub organisation page is [here](https://github.com/opensafely)
- All the core code is published in their opensafely-core organisation on GitHub [here](https://github.com/opensafely-core)
- And there is also their opensafely-actions organisation [here](https://github.com/opensafely-actions)
- A Docker container is a like a virtual machine
- It defines the operating system and programs running within it
- On my Windows 10 machine I can run an Ubuntu docker container
- Just because an R package is installed in the R installation on your machine does not mean that it is installed in the OpenSAFELY R Docker container
- See the list of packages in the R Docker container [here](https://github.com/opensafely-core/r-docker/blob/master/packages.txt)
## Demo repo
- Have a look at the demo repo [here](https://github.com/opensafely/os-demo-research)
## Getting started
- See OS page [here](https://docs.opensafely.org/getting-started/)
- If creating a new repo create from the OS template [here](https://github.com/opensafely/research-template)
```{r}
knitr::include_graphics("img/os-template.png")
```
- This is already Git initialized
- Important files
- `project.yaml`
- Defines the jobs and the order in which they run
- `/analysis/study_defintion.py`
- Defines the study population extracted from the OpenSAFELY database
- This should return `.csv` file/s of data to read into R
- `/analysis/##_R-scripts.R`
- Your analysis scripts (where `##` is the number of your script)
## Running jobs (on the dummy data)
There are a couple of ways to run jobs on the dummy data system.
- In your OpenSAFELY repo online
- Use Gitpod
- On your own machine, in which case please install the following free software
- If on Windows - Windows Subsystem for Linux version 2, using the instructions [here](https://learn.microsoft.com/en-us/windows/wsl/install)
- Docker Desktop, from [here](https://www.docker.com/products/docker-desktop/)
- Python (described on a previous page [here](09-installing-python-and-os.html))
- Git (described on previous page [here](02-installing-git.html))
- GitHub Desktop, from [here](https://desktop.github.com/)
- VSCode text editor, from [here](https://code.visualstudio.com/)