# Détecter les anomalies de structures

## Installation de Sniffles 2

Pour ce faire sniffles 2 doit avoir une version de Python supérieur ou égal à la 3.10. Afin de ne pas affecter nos autres programmes, nous allons créer un environnment virtuel pour installer Python dedans sans affecter nos autres outils.

### Installation de l'environnement virtuel

#### Installez les dépendances nécessaires :

```sh
sudo apt-get update
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncurses5-dev libncursesw5-dev xz-utils tk-dev \
libffi-dev liblzma-dev python-openssl git
```

**Installez pyenv** :

```sh
curl https://pyenv.run | bash
```

**Ajoutez pyenv à votre shell** :

Ajoutez les lignes suivantes à votre fichier de configuration du shell (`~/.bashrc` pour `bash` ou `~/.zshrc` pour `zsh`) :

Pour `bash` :

```sh
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
```

Pour `zsh` :

```sh
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init --path)"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
```

**Recharger le fichier de configuration du shell** :

```sh
source ~/.bashrc
```

ou

```sh
source ~/.zshrc
```

**Installez pyenv-virtualenv** :

```sh
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
```

**Recharger de nouveau le shell pour s'assurer que toutes les configurations sont prises en compte** :

```shell
source ~/.bashrc
```

ou

```sh
source ~/.zshrc
```

### Installation de Python 3.10 et Création de l'Environnement Virtuel

**Installez Python 3.10** :

```sh
pyenv install 3.10.12
```

**Créez un environnement virtuel avec la nouvelle version de Python** :

```sh
pyenv virtualenv 3.10.12 sniffles-env
```

**Activez l'environnement virtuel** :

```sh
pyenv activate sniffles-env
```

### Installation de Sniffles 2 dans l'Environnement Virtuel

**Naviguez dans le répertoire cloné de Sniffles 2** :

```sh
cd path/to/Sniffles
```

**Installez Sniffles 2 en utilisant `setup.py`** :

```sh
pip install .
```

**Vérifiez l'installation** :

```sh
sniffles --version
```

### Exécution de Sniffles 2

```sh
sniffles --input alignments_sorted.bam --vcf output.vcf
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aleksandre80.gitbook.io/stage/detecter-les-anomalies-de-structures.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
