Skip to content

Commit 1d4023e

Browse files
Update README.md
1 parent 11834bb commit 1d4023e

1 file changed

Lines changed: 51 additions & 11 deletions

File tree

README.md

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,28 @@ sudo apt install libboost-all-dev
8080
Clone the repository with recursive option:
8181

8282
```shell
83-
git clone --recursive https://github.com/phylo42/sherpas.git #do not forget the --recursive !!!
83+
git clone --recurse-submodules git@github.com:phylo42/sherpas.git #do not forget the --recurse-submodules !!!
8484
cd sherpas
85-
mkdir release-build && cd release-build
86-
cmake --target SHERPAS ..
87-
make -j4
85+
cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 . #do not forget the dot at the end !!!
86+
make -j8
87+
```
88+
89+
This will build several essential binaries :
90+
```shell
91+
sherpas/SHERPAS # the SHERPAS binary
92+
lib/xpas/build/xpas-build-dna # the binary to build a database from DNA sequences
93+
lib/xpas/build/xpas-build-aa # the binary to build a database from Amino Acid sequences
8894
```
8995

9096
**Rapid test:**
9197

9298
A rapid prediction of HBV (Hepathitis B Virus) recombinants can be performed.
93-
From the `release-build` repository in which you compiled sources, execute the following commands.
99+
From the directory in which you compiled sources, execute the following commands.
94100

95101
*If you used conda:*
96102
```shell
97-
# download a phylo-kmer database pre-built from HBV pure types:
98-
wget https://www.dropbox.com/s/m75hfo4mem4eb46/pkDB-HBV-full.zip
103+
# download a phylo-kmer database pre-built from HBV pure types from
104+
# https://datadryad.org/downloads/file_stream/537187 => pkDB-HBV-full.zip
99105
unzip pkDB-HBV-full.zip
100106
# download queries
101107
wget https://raw.githubusercontent.com/phylo42/sherpas/master/examples/HBV_all/queries-3000.fasta
@@ -104,8 +110,8 @@ SHERPAS -d DB_k10_o1.5.rps -q queries-3000.fasta -o output -g ref-groups.csv -c
104110
```
105111
*If you built from sources:*
106112
```shell
107-
# download a phylo-kmer database pre-built from HBV pure types:
108-
wget https://www.dropbox.com/s/m75hfo4mem4eb46/pkDB-HBV-full.zip
113+
# download a phylo-kmer database pre-built from HBV pure types from
114+
# https://datadryad.org/downloads/file_stream/537187 => pkDB-HBV-full.zip
109115
unzip pkDB-HBV-full.zip
110116
# launch a prediction for 3000 HBV queries, using the pre-built HBV database
111117
# queries were already downloaded (via your git clone)
@@ -123,10 +129,44 @@ res-queries-3000.txt
123129
queries-3000-circ300.fasta
124130
```
125131

126-
# Execution
132+
# Preparing your own database
133+
134+
To use SHERPAS with your own viral model, you will need to prepare the following:
135+
* A multiple alignement of COMPLETE viral genomes. And only "pure" types shouldbe alignedd, meaning that there should be no recombinant genomes in this dataset. Of course, this notion is relative to time, as all sequenced genomes are likely recombinant of past types. But aim for a clear segragation of your genomes based on types. Discard any genomes already known to be a recombinant of selected types.
136+
* A phylogeny built from this alignment, using ML reconstruction (any software : phyml, raxml, iq-tree...). Avoid distance-based reconstruction, such as NJ-based constructions.
137+
* The `phyml` software installed and accessible via command-line (see instructions below). Recommended version is 3.3.20190909 from Bioconda.
138+
139+
## Example of database creation for HBV
140+
141+
Building your own database currently require to build SHERPAS from sources !
142+
See instructions above.
143+
144+
```shell
145+
# install phyml using conda
146+
conda create -n phyml_3.3.20190909
147+
conda activate phyml_3.3.20190909
148+
conda install -c bioconda phyml=3.3.20190909
149+
150+
# download the HBV genome alignment and corresponding tree
151+
TODO
152+
# download the corresponding tree from https://datadryad.org/downloads/file_stream/537187 => pkDB-HBV-full.zip
153+
unzip pkDB-HBV-full.zip
154+
# you will get this file: HBV_tree.tree
155+
156+
# we will now build the phylo-k-mer databse using xpas binaries
157+
# from the cloned repo in which you built sources
158+
lib/xpas/build/xpas-build-dna --ar-binary $(which phyml) --refalign hbv_genome_alignment.fas --reftree HBV_tree.tree -k 8
159+
```
160+
Option `k` is the k-mer size. Default is k=8, and here are some general recommendations :
161+
* for recombination detection we recommend to set at least k=10, which should be OK for most viral species.
162+
* longer k will require longer computation and will produce heavy databases.
163+
* smaller k will result to fast computations but may produce less accurate prediction
164+
* if you genome alignement shows regions full of gaps, longer k may be counterproductive as phylo-k-mer are hard to compute for these regions.
165+
166+
# SHERPAS Execution
127167

128168
```shell
129-
sherpas/SHERPAS [options]
169+
SHERPAS [options]
130170
```
131171

132172
Command-line options are the following (see detailed description below):

0 commit comments

Comments
 (0)