-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeast2.qmd
137 lines (93 loc) · 2.68 KB
/
beast2.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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
title: "Install, setup, and run BEAST2 on Atlas HPC"
description: "Using BEAST, TreeAnnotator, and other beastily things"
date: "2024-08-23"
about:
template: marquee
format:
gfm:
toc: true
toc-depth: 2
code-fold: show
code-summary: "Hide code"
preview-mode: raw
editor_options:
chunk_output_type: console
---
## Initiate Conda
### **1. Open a Shell**
Open a shell on Atlas and navigate to your project directory.
### **2. Load the Miniconda3 Module**
```bash
module load miniconda3
```
### **3. Initialize Conda**
Initialize Conda to work with your shell:
```bash
conda init
```
### **4. Close and Reopen Your Shell**
You may need to restart your shell session. Close your terminal window and open a new one.
## Create Conda Environment
### **5. Create a New Conda Environment for BEAST2**
Creating an environment helps manage dependencies. In the code below, replace `beast2_env` with any name of your choosing.
```bash
conda create -n beast2_env
```
- When prompted, type `Y` to proceed with the environment creation.
### **6. Activate the Conda Environment**
```bash
conda activate beast2_env
```
You should see the environment name prefixed in your shell prompt (before your username).
### **7. Configure Conda Channels**
Add the necessary channels to install BEAST2 and its dependencies.
```bash
conda config --add channels conda-forge
conda config --add channels bioconda
conda config --add channels defaults
```
```bash
conda config --show channels
```
You should see:
```
channels:
- conda-forge
- bioconda
- defaults
```
---
## Install BEAST2
### **8. Install BEAST2 via Conda**
Now, install BEAST2 using Conda:
```bash
conda install -c bioconda beast2
```
- Type `Y` when prompted to proceed with the installation.
- Conda will resolve dependencies and install BEAST2 along with the appropriate Java version.
### **9. Verify the Installation**
```bash
beast -help
```
You should see usage information for BEAST2.
### **10. Ensure `treeannotator` Is Available**
```bash
which treeannotator
```
If the path to `treeannotator` is displayed, it means the command is available.
## Test Run
### **11. Run `treeannotator`**
Now you can run `treeannotator` using the alias or the command.
##### **Example Command:**
Assuming that the `fmd-viet-treelog.trees` file are
```bash
treeannotator -burnin 10 -heights median fmd-viet-treelog.trees atlas_test.tre
```
*Ensure that you are in the directory containing your input file `fmd-viet-treelog.trees` or provide the full path to the file.*
## End Session
### **12. Deactivate the Conda Environment When Done**
After you're finished, you can deactivate the environment:
```bash
conda deactivate
```