diff --git a/README.md b/README.md index 5b70a02..8399d02 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ copy credentials.json gen3-augur/config ## Using Conda An `environment.yml` file is provided and can be used to build a virtual environment containing all dependencies. Create the environment using: ``` -conda env create -f enviroment.yml +conda env create -f environment.yml ``` Then activate the environment for use: ``` diff --git a/config/credentials.json b/config/credentials.json new file mode 100644 index 0000000..5ffe5b7 --- /dev/null +++ b/config/credentials.json @@ -0,0 +1,4 @@ +{ + "api_key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImZlbmNlX2tleV8yMDIwLTAzLTE4VDE4OjIwOjI3WiJ9.eyJwdXIiOiJhcGlfa2V5IiwiYXVkIjpbImRhdGEiLCJ1c2VyIiwiZmVuY2UiLCJvcGVuaWQiXSwic3ViIjoiMjkiLCJpc3MiOiJodHRwczovL2NoaWNhZ29sYW5kLnBhbmRlbWljcmVzcG9uc2Vjb21tb25zLm9yZy91c2VyIiwiaWF0IjoxNjEwOTIyNzY0LCJleHAiOjE2MTM1MTQ3NjQsImp0aSI6ImU5YzZmZTU3LTNlZjUtNDNhZi04MjRiLWM4MTc3ODhjMjdiYyIsImF6cCI6IiJ9.TFJ11LtZ4RRM6WTnO4k1P1z0cPrm-nEI0eE1sr6F45VFY9g4ohFcEASJEzUOzdmIqsF0JlHj9RhPvvRlxejxhZSS1Zd9OWvCvZfUE5DRFqWR8hCAbto00Th0H3qf_mwXNI6rw2oDCJ-YgH13KX0xQA7ANgaa99LQX_B0fTaTZTijZd1YAPxSAQXJwp4uhlMsR94ldDao4YDVJSPU5kae96QvMY5kNxeOkSmFR65DCky7RiPXvZx2K4vyPDdZ89oir81wWBedtZ7wW3g8GFcUdNsUsXY8OLbPM8XOicdk6e-i4KRCgfrk2nU5BiqyE8-A78op_LUGUygytq_U8dPI9Q", + "key_id": "e9c6fe57-3ef5-43af-824b-c817788c27bc" +} \ No newline at end of file diff --git a/gen3-augur-fasta.sh b/gen3-augur-fasta.sh new file mode 100755 index 0000000..2c7ad24 --- /dev/null +++ b/gen3-augur-fasta.sh @@ -0,0 +1,41 @@ +#!/bin/sh +set -ex + +today=$(date +'%m%d%y') + +# Run Augur pipeline +# Filter +echo "Filter fasta files" +augur filter --sequences data/covid19_Gagnon_Chicago_${today}.fasta --metadata data/covid19_Gagnon_Chicago_${today}.csv --output results/covid19_${today}_filter.fasta && + +# Alignment(default mafft tool) +echo "Run alignment" +augur align --sequences results/covid19_${today}_filter.fasta --reference-sequence config/sequence.gb --output results/covid19_${today}_aligned.fasta --fill-gaps --nthreads auto && + +# Create raw tree +echo "Create raw tree" +augur tree --alignment results/covid19_${today}_aligned.fasta --output results/covid19_${today}_tree_raw.nwk --nthreads auto && + +# Refine tree +echo "Refine tree" +augur refine --tree results/covid19_${today}_tree_raw.nwk --alignment results/covid19_${today}_aligned.fasta --metadata data/covid19_Gagnon_Chicago_${today}.csv --output-tree results/covid19_${today}_tree.nwk --output-node-data results/covid19_${today}_branch_lengths.json --timetree --coalescent opt --date-confidence --date-inference marginal --clock-filter-iqd 4 && + +# Refine traits +echo "Refine traits" +augur traits --tree results/covid19_${today}_tree.nwk --metadata data/covid19_Gagnon_Chicago_${today}.csv --output results/covid19_${today}_traits.json --columns location --confidence && + +# Ancestry Inference +echo "Infer ancestry" +augur ancestral --tree results/covid19_${today}_tree.nwk --alignment results/covid19_${today}_aligned.fasta --output-node-data results/covid19_${today}_nt_muts.json --inference joint && + +# Mutation Translate +echo "Mutation translation" +augur translate --tree results/covid19_${today}_tree.nwk --ancestral-sequences results/covid19_${today}_nt_muts.json --reference-sequence config/sequence.gb --output results/covid19_${today}_aa_muts.json && + +# Labeling clades as specified in config/clades.tsv +augur clades --tree results/covid19_${today}_tree.nwk --mutations results/covid19_${today}_nt_muts.json results/covid19_${today}_aa_muts.json --clades config/clades.tsv --output results/covid19_${today}_clade.json + + +# Export json +echo "Export json" +augur export v2 --tree results/covid19_${today}_tree.nwk --metadata data/covid19_Gagnon_Chicago_${today}.csv --node-data results/covid19_${today}_branch_lengths.json results/covid19_${today}_traits.json results/covid19_${today}_nt_muts.json results/covid19_${today}_aa_muts.json results/covid19_${today}_clade.json --colors config/color_schemes.tsv --lat-longs config/latitude_longitude.tsv --auspice-config config/auspice_config.json --output auspice/covid19_${today}.json diff --git a/gen3-augur.sh b/gen3-augur.sh index a63b13b..0a83abc 100755 --- a/gen3-augur.sh +++ b/gen3-augur.sh @@ -57,6 +57,9 @@ augur ancestral --tree results/covid19_${today}_tree.nwk --alignment results/cov echo "Mutation translation" augur translate --tree results/covid19_${today}_tree.nwk --ancestral-sequences results/covid19_${today}_nt_muts.json --reference-sequence config/sequence.gb --output results/covid19_${today}_aa_muts.json && +# Labeling clades as specified in config/clades.tsv +augur clades --tree results/covid19_${today}_tree.nwk --mutations results/covid19_${today}_nt_muts.json results/covid19_${today}_aa_muts.json --clades config/clades.tsv --output results/covid19_${today}_clade.json + # Export json echo "Export json" -augur export v2 --tree results/covid19_${today}_tree.nwk --metadata data/covid19_${today}_genbank.csv --node-data results/covid19_${today}_branch_lengths.json results/covid19_${today}_traits.json results/covid19_${today}_nt_muts.json results/covid19_${today}_aa_muts.json --colors config/color_schemes.tsv --lat-longs config/latitude_longitude.tsv --auspice-config config/auspice_config.json --output auspice/covid19_${today}.json +augur export v2 --tree results/covid19_${today}_tree.nwk --metadata data/covid19_${today}_genbank.csv --node-data results/covid19_${today}_branch_lengths.json results/covid19_${today}_traits.json results/covid19_${today}_nt_muts.json results/covid19_${today}_aa_muts.json results/covid19_${today}_clade.json --colors config/color_schemes.tsv --lat-longs config/latitude_longitude.tsv --auspice-config config/auspice_config.json --output auspice/covid19_${today}.json