Giter VIP home page Giter VIP logo

aphylogeo's Introduction

Phylotree

Phylotree is a bioinformatics pipeline dedicated to the analysis of SARS-CoV-2. This tool can be used to obtain trees from climatic data of the regions where the samples have been collected. Those climatic trees are then used for topological comparison against phylogenetic trees from multiple sequence alignments (MSAs) using the Robinson-Foulds (RF) metric. MSAs that yield trees with a significant RF value are then saved in folders with their respective tree. The output.csv file contains the informations of all the significant MSAs informations.

Workflow

How to use?

Prerequisites

Before using this program, make sure that you have installed all the necessary libraries for it to work properly. To do this, simply type the following command:

pip install -r requirements.txt

Creation of climatic trees

In order to obtain the climatic data trees, you need to create a csv file containing the data to study ( see the example data.csv ).

This file should have a structure similar to the example file. A column containing the names of the specimens should be present since the name of this column will be requested when the program is launched. The column names should not contain parentheses!

The other columns should contain the climatic variables that are to be studied. The values must be numeric for the program to work properly.

Once the file is created with the data, it is now time to create the trees with this command:

make tree

Here is an example of what is displayed on the terminal and the entries entered according to the example file data.csv :

====================================================================================================================
Before running this script, please make sure there is a .csv file containing all the data to analyze in this repo
====================================================================================================================
Please enter the name of the csv file (this is a relative path): data/donnees.csv
Number of trees to create: 
5
Please enter the name of the colum containing the specimens names: Nom du specimen
Please enter the name of the column to analyze in your csv file (1): T min à 2m C
Please enter the name of the column to analyze in your csv file (2): T max à 2m C
Please enter the name of the column to analyze in your csv file (3): Humidité relative à 2m %
Please enter the name of the column to analyze in your csv file (4): Précipitation totale sur le mois mm
Please enter the name of the column to analyze in your csv file (5): Pression en surface kpa

Make sure that the column names are identical to the ones you entered so that the program can find them. The names of the sequences to be studied and the names of the specimens in this file must also match exactly.

The climatic trees should then be created in the current folder with the column names followed by newick (e.g. T_max_to_2m_C_newick).

Creating phylogenetic trees and phylogeographic analysis

  1. The .fasta sequence files must be put in the folder data. Note that the header of the sequence file must respect this format (Note: The sequences obtained on GISAID all respect this format):

>hCoV-19/Nigeria/S38/2020|EPI_ISL_2399462|2020-10-12

In order to be able to differentiate each sequence with a different name, this tool will isolate the 3rd word encountered in the header. In this example, the sequence will be named S38. In case this word is longer than 10 characters, the program will only take the first ten :

>hCoV-19/India/GJ-GBRC560b/2021|EPI_ISL_1677798|2021-01-12

In this case, the sequence name will only be GJ-GBRC560 since it is exactly 10 characters long. This is important to understand, especially for the names you will give to the sequences in the csv climatic data file, which must be identical to the single names.

  1. Once the sequences have been placed in the data folder, all you have to do is run the program with make command. Here is an example of what should appear on the terminal and an example of the entries:
How many climatic data tree will be used?: 1
Name of the tree file (1): T_max_à_2m_C_newick
Enter the bootstrap value threshold between 0 and 100%: 10
Enter the Robinson and Foulds distance threshold between 0 and 100%: 100
Sliding window size: 100
Step count: 10
===============================================
Please select an option among the following: 
===============================================
1. Use the whole DNA sequences
2. Study specific genes of SARS-CoV-2
Please enter 1 or 2: 2
================================================================================
Choose among the following genes to analyze seperated by spaces (ex: 1 8 11): 
================================================================================
1 : ORF1ab
2 : S
3 : ORF3a
4 : ORF3b
5 : E
6 : M
7 : ORF6
8 : ORF7a
9 : ORF7b
10 : ORF8
11 : N
12 : ORF10
7

Depending on the bootstrap value and the Robinson-Fould metric found for each MSA ( Multiple Sequence Alignment ), the climatic tree of interest with their corresponding MSA will be kept in the folders of each selected gene or in the reference folder if the complete sequence has been studied. Finally, the output.csv file will contain all the significant MSAs and their related informations such as their position on the sequence, the gene related to this position, their bootstrap value and their RF metric.

Potential problems encountered

  • For macOS users, it is likely that your computer is blocking access to the MUSCLE program. If this is the case, go to the privacy settings on your machine and give the program access

References

  1. Sequence alignment tool : MUSCLE
  1. Phylip Package: Seqboot, DNADist, Neighbor, Consense J. Felsenstein. 1989. PHYLIP - Phylogeny Inference Package (Version 3.2) . Cladistics. 5: 164-166.

  2. Calculation of distance between phylogenetic tree: Robinson-Foulds metric Robinson, D.F. and Foulds, L.R., 1981. Comparison of phylogenetic trees. Mathematical biosciences, 53(1-2), pp.131-147.

  3. Phylogenetic analysis: RAxML A. Stamatakis: "RAxML Version 8: A tool for Phylogenetic Analysis and Post-Analysis of Large Phylogenies". In Bioinformatics, 2014


Alors que la pandémie mondiale causée par le SARS-CoV-2 bat encore son plein, les efforts concertés des chercheurs nous permettent d’en apprendre davantage sur ce virus quotidiennement. Sur la base de données GISAID, plus d’un million de séquences sont rendus disponibles afin d’accélérer les recherches. Plus que jamais, les outils bioinformatiques mis à la disposition des chercheurs sont cruciaux à l'analyse de cette masse de données.

La phylogénie est l’études des relations qui existent entre des espèces apparentées. Elle permet de retracer un ancêtre commun aux espèces et de les classer selon les liens de parenté qui les relient ensemble. La phylogénie permet donc d’étudier l’évolution des espèces et de proposer des modèles qui tentent d’expliquer la biodiversité actuelle. Les analyses phylogénétiques peuvent s’appuyer sur des données diverses :

  • Des données morphologiques, c’est-à-dire des caractéristiques physiques observables chez les espèces.

  • Des données macromoléculaires comme les acides nucléiques qui sont à la base de l’ADN et de l’ARN et les protéines qui occupent un rôle central au fonctionnement des vivants.

L’outil le plus utilisé pour représenter les relations et les ancêtres communs des organismes sont les arbres phylogénétiques.

D’un côté, la phylogénie étudie les relations entre les espèces en observant les différences au niveau de macromolécules tel que l’ADN. Néanmoins, ces observations offrent souvent une image incomplète de l’évolution de ces espèces. C’est là que la phylogéographie s’avère intéressante puisqu’elle offre une explication à l’évolution des espèces puisqu'elle offre une explication micro-évolutive aux observations macro-évolutive des espèces. La phylogéographie s'intéresse aux processus et aux phénomènes qui expliquent la distribution géographique des lignées génétiques. Elle permet donc de corréler des conditions climatiques ou géographiques avec l'évolution génétique.

Phylotree est un pipeline bioinformatique dédié à l'analyse du SARS-CoV-2. D'une part, il permet d'obtenir des arbres issus de données climatiques des régions où les échantillons du SARS-CoV-2 ont été récoltés. D'autre part, cet outil permet de comparer topologiquement des arbres phylogénétiques aux arbres issus des données climatiques à l'aide du calcul de la distance de Robinson-Foulds (RF). Les ASM (Alignement de Séquences Multiples) qui donnent des arbres avec une valeur RF significative sont conservés dans des dossiers avec leur arbre phylogénétique. Le fichier output.csv servira à conserver tous les ASM avec les informations pertinentes.

Workflow

Comment l'utiliser?

Pré-requis

Avant d'utiliser ce programme, assurez-vous d'avoir installé toutes les librairies nécessaires à son bon fonctionnement. Pour se faire, simplement taper la commande suivante :

pip install -r requirements.txt

Création des arbres issus des données climatiques

Afin d'obtenir les arbres phylogéographiques, il faut créer un fichier csv contenant les données à l'étude (voir l'exemple donnees.csv).

Ce fichier devrait avoir une structure similaire au fichier exemple. Une colonne contenant les noms des spécimens devrait être présente puisque le nom de cette colonne sera demandé au lancement du programme. Les noms des colonnes ne doivent pas contenir de parenthèses!

Ensuite, les autres colonnes devraient contenir les données climatiques qui sont à étudier. Les valeurs doivent être numériques pour que le programme puisse fonctionner correctement.

Une fois le fichier créé avec les données, il est maintenant temps de créer les arbres avec cette commande :

make tree

Voici un exemple de ce qui s'affiche sur le terminal et les saisies entrées selon le fichier exemple donnees.csv :

====================================================================================================================
Before running this script, please make sure there is a .csv file containing all the data to analyze in this repo
====================================================================================================================
Please enter the name of the csv file (this is a relative path): data/donnees.csv
Number of trees to create: 
5
Please enter the name of the colum containing the specimens names: Nom du specimen
Please enter the name of the column to analyze in your csv file (1): T min à 2m C
Please enter the name of the column to analyze in your csv file (2): T max à 2m C
Please enter the name of the column to analyze in your csv file (3): Humidité relative à 2m %
Please enter the name of the column to analyze in your csv file (4): Précipitation totale sur le mois mm
Please enter the name of the column to analyze in your csv file (5): Pression en surface kpa

Assurez-vous que les noms des colonnes soient identiques à celles que vous avez saisies pour que le programme puisse les retrouvés! Les noms des séquences à étudier ainsi que les noms des spécimens dans ce fichier doivent également correspondre exactement.

Les arbres phylogéographiques seront alors créés dans le dossier courant avec le nom des colonnes suivi de _newick (ex: T_max_à_2m_C_newick).

Création des arbres phylogénétiques et analyses phylogéographiques

  1. Les fichiers .fasta à analyser doivent être mis dans le dossier data. À noter que l'entête des fichiers de séquences doivent respecter ce format ( les séquences obtenues sur GISAID respectent tous ce format ) :

>hCoV-19/Nigeria/S38/2020|EPI_ISL_2399462|2020-10-12

Afin de pouvoir différencier chaque séquence avec un nom différent, cet outil va isoler le 3e mot rencontré dans l'entête. Dans cet exemple, la séquence sera alors nommée S38. Dans le cas où ce mot serait plus long que 10 caractères, le programme ne prendra que les 10 premiers. Par exemple, si nous avons ceci comme entête:

>hCoV-19/India/GJ-GBRC560b/2021|EPI_ISL_1677798|2021-01-12

Dans ce cas, le nom de la séquence sera seulement GJ-GBRC560 puisqu'il est composé d'exactement 10 caractères. Ceci est important à comprendre, surtout pour les noms que vous donnerez aux séquences dans le fichier csv qui doivent être identiques à ces noms isolés en question.

  1. Une fois les séquences bien placées dans le dossier data, il suffit maintenant de lancer le programme avec la commande make. Voici un exemple de ce qui devrait apparaître sur le terminal ainsi qu'un exemple des saisies :
How many climatic data tree will be used?: 1
Name of the tree file (1): T_max_à_2m_C_newick
Enter the bootstrap value threshold between 0 and 100%: 10
Enter the Robinson and Foulds distance threshold between 0 and 100%: 100
Sliding window size: 100
Step count: 10
===============================================
Please select an option among the following: 
===============================================
1. Use the whole DNA sequences
2. Study specific genes of SARS-CoV-2
Please enter 1 or 2: 2
================================================================================
Choose among the following genes to analyze seperated by spaces (ex: 1 8 11): 
================================================================================
1 : ORF1ab
2 : S
3 : ORF3a
4 : ORF3b
5 : E
6 : M
7 : ORF6
8 : ORF7a
9 : ORF7b
10 : ORF8
11 : N
12 : ORF10
7

Une fois le programme lancé, selon la valeur bootstrap calculée et la distance rf seuil, les arbres phylogénétiques d'intérêts avec leur ASM correspondant seront gardés dans les dossiers de chaque gène sélectionnés ou dans le dossier référence si la séquence complète a été étudiée. Finalement, le fichier output.csv contiendra tous les ASM significatifs retenus avec la position de l'ASM, le gène en question, l'arbre climatique avec lequel cet arbre à été comparé, la valeur bootstrap de l'arbre ainsi que la distance RF calculée entre les deux arbres.

Potentiels problèmes rencontrés

  • Pour les utilisateurs de macOS, il est probable que votre ordinateur bloque l'accès au programme MUSCLE. Si c'est le cas, simplement aller dans les paramètres de confidentialité de votre machine et donner l'accès au programme.

Références

  1. Programme pour l'alignement des séquences: MUSCLE
  1. Paquet Phylip: Seqboot, DNADist, Neighbor, Consense J. Felsenstein. 1989. PHYLIP - Phylogeny Inference Package (Version 3.2) . Cladistics. 5: 164-166.

  2. Calcul de la distance topologique entre les arbres: Distance de Robinson-Foulds Robinson, D.F. and Foulds, L.R., 1981. Comparison of phylogenetic trees. Mathematical biosciences, 53(1-2), pp.131-147.

  3. Outil pour les analyses phylogénétiques : RAxML A. Stamatakis: "RAxML Version 8: A tool for Phylogenetic Analysis and Post-Analysis of Large Phylogenies". In Bioinformatics, 2014

aphylogeo's People

Contributors

my-linh-luu avatar tahirinadia avatar wanlinli2021 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.