-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextstrain_setup_run.sh
executable file
·51 lines (35 loc) · 2 KB
/
nextstrain_setup_run.sh
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
#!/bin/bash
# Script: nextstrain_setup_run.sh
# This file is shell script that sets up the NextStrain environment, runs the test NextStrain build, and then copies files for a custom build used to generate images in the paper
#Following the guidelines from the NextStrain site
# https://nextstrain.github.io/ncov/
#Clone the NextStrain ncov and setup environment
git clone https://github.com/nextstrain/ncov.git
#Change into directory
cd ncov
#If NextStrain has not been installed, will need to follow these steps
#Download conda environment setup
curl http://data.nextstrain.org/nextstrain.yml --compressed -o nextstrain.yml
conda env create -f nextstrain.yml
conda activate nextstrain
#Install auspice (for visualization of results)
npm install --global auspice #npm is a JavaScript pacakage manager
#Unzip the sample data set
gzip -d -c data/example_sequences.fasta.gz > data/example_sequences.fasta
#Run the snakemake pipeline for the example
snakemake --cores 4 --profile ./my_profiles/getting_started
#Running the example serves as a check that all is installed and running properly
#Drag-and-drop the file from ./auspice/sarscov2_global.json onto the page at https://auspice.us.
#To visualize results, point web-browser to https://auspice.us/ and drag-and-drop ./auspice/sarscov2_global.json onto the page
#Now will copy the build an other the files to replicate the images included in the paper. Details on the code for generating these files is in the coding notebook (ncov_ucdh_env.Rmd, Line 1113).
#Copy profile for UCDMC-focused build used to generate images in the paper:
cd ..
cp -R data/nextstrain/ucdmc_ca ncov/my_profiles/
#Copy (and replace) the default include file
cp data/nextstrain/include.txt ncov/defaults/include.txt
#Copy FASTA data and metadata
cp data/nextstrain/first_try_samples* ncov/data/
#Run pipeline with the build/profile "ucdmc_ca"
cd ncov
snakemake --cores 8 --profile my_profiles/ucdmc_ca -p
#Copy paste file ncov/auspice/ncov_north-america_usa_ca_sacramento.json into https://auspice.us/