-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallation.qmd
More file actions
101 lines (67 loc) · 4.54 KB
/
installation.qmd
File metadata and controls
101 lines (67 loc) · 4.54 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
title: "Installation"
execute:
eval: false
---
## Install Julia
To install [Julia](https://julialang.org/), follow the [Getting Started](https://docs.julialang.org/en/v1/manual/getting-started/) instructions.
## Install Quarto (optional)
These tutorials are written in [Quarto](https://quarto.org/). You don't need Quarto if you only want to play with the notebooks, but you will need it if you want to reprodcue this website locally. See the [Get Started](https://quarto.org/docs/get-started/) page for installation instructions.
## Install the Julia extension for your favourite editor/IDE (optional)
Extensions or plugins for [VS Code](https://www.julia-vscode.org/), [Emacs](https://github.com/JuliaEditorSupport/julia-emacs), and [VIM](https://github.com/JuliaEditorSupport/julia-vim) are linked from the [Julia homepage](https://julialang.org/)
## Install IJulia
To run the tutorial notebooks, you need [IJulia](https://github.com/JuliaLang/IJulia.jl). If you installed Quarto, follow [these instructions](https://quarto.org/docs/computations/julia.html#installation) to make sure Quarto can use IJulia to render documents with embedded Julia code.
## Install BioFindr
[BioFindr][1] is a [registered Julia package](https://github.com/JuliaRegistries/General). To install it, open a Julia console and enter the Pkg REPL by pressing `]` from the Julia REPL. Then:
```julia
pkg> add BioFindr
```
See the [Pkg documentation](https://pkgdocs.julialang.org/v1/managing-packages/#Adding-packages) for more information. If you're new to using [Pkg](https://pkgdocs.julialang.org/v1/), Julia's package manager, see the [Getting Started](https://pkgdocs.julialang.org/v1/getting-started/) notes.
[BioFindr][1] is still under development and new features are added regularly. Make sure to update your installation regularly:
```julia
pkg> up BioFindr
```
## Install the BioFindrTutorials repository
The [BioFindrTutorials repository](https://github.com/tmichoel/BioFindrTutorials) uses [DrWatson](https://juliadynamics.github.io/DrWatson.jl/stable/)
to make a reproducible scientific project named
> BioFindrTutorials
To (locally) reproduce this project, do the following:
1. Download this code base. Notice that raw data are not in
```
julia> using Pkg
julia> Pkg.add("DrWatson") # install globally, for using `quickactivate`
julia> Pkg.activate("path/to/this/project")
julia> Pkg.instantiate()
```
This will install all necessary packages for you to be able to run the scripts and
everything should work out of the box, including correctly finding local paths.
You may notice that most scripts start with the commands:
```julia
using DrWatson
@quickactivate "BioFindrTutorials"
```
which auto-activate the project and enable local path handling from DrWatson.
## Download and preprocess data
The `scripts` folder of the project contains a number of files named `process_data_*`. After downloading the initial data files (see below), you can then run the script to produce processed data files in the [Apache Arrow](https://arrow.apache.org/) format, which will be stored in the `exp_pro` folder.
### GEUVADIS data
1. Download [preprocessed data files][2] from the [GEUVADIS study][3].
2. Save all files in the folder `exp_raw/findr-data-geuvadis`.
3. Concatenate the transcript files:
```
$ cat dt1.csv.gz dt2.csv.gz > dt.csv.gz
```
4. Unzip all `.gz` files.
5. Create a folder `exp_pro/findr-data-geuvadis` (sorry, not very clean that this isn't automated).
6. Run the script `process_data_findr-data-geuvadis.jl`. You can either run it from the command line:
```
$ julia scripts/process_data_findr-data-geuvadis.jl
```
or open the file and run it interactively in your editor/IDE of choice. See [Running Code](https://www.julia-vscode.org/docs/stable/userguide/runningcode/) for more information about how to this in VS Code.
7. Verify that the directory `exp_pro/findr-data-geuvadis` contains matched `.arrow` files for each `.csv` file in the `exp_raw/findr-data-geuvadis` folder.
## Run the tutorials
You are now all set up to run the tutorials. You can either work directly with the `*.qmd` files in the `website` folder, or use the [jupyter](https://jupyter.org/) notebooks (`*.ipynb` files) in the `notebooks` folder. Make sure to have [IJulia](https://julialang.github.io/IJulia.jl/stable/) installed if using the latter option.
[1]: https://github.com/tmichoel/BioFindr.jl
[2]: https://github.com/lingfeiwang/findr-data-geuvadis
[3]: https://doi.org/10.1038/nature12531
[4]: https://dataframes.juliadata.org/stable/
[5]: https://doi.org/10.1371/journal.pcbi.1005703