The main goal of this project is to find the positional relationships between Transposable Elements (TEs) and genes along genome.
The Apricot genome annotation has been used to validate our strategy (raw data available on ENA PRJEB42606). This pipeline can be used with custom TE annotation as well as de novo assembled genome of any kind of species.
You can learn more about this subject in the Contribution Section.
Transposable elements are DNA fragment capable of moving from one place to another troughout the genome via a mecanism called transposition. There are different category/class of transposon. In this project we are going to focus on LTR (long terminal repeat). Learn more by clicking here
To use this programme please clone the repository. Make sure that Python3 and Rstudio are installed on your machine. If it's not the case, check out the following links :
Before running the programme for your own data, please use the testing data to check that everything works.
In the data
folder, there are 2 files, one with the data regarding each gene and one regarding each transposon displayed in the diagram above.
The python scripts are going to find for each transposable element the nearest gene before and after it. The script will also look for overlapping.
The result file of this test data is located in the result
folder.
The programme takes in consideration the columns name so before using them please verify that each files have those columns :
- Genome files
chromosome | source | feature | start | end | score | strand | phase | ID | Attributes |
---|
- TE files
Chromosome | Length_Chr | Type | X | Start | End | X | X | Strand | X | Attribute | X | Class | TE_name | X |
---|
- LTR files
species | ID | dfam_target_name | X | X | X | X | chromosome | start | end | strand | X | annotation | X | X | score |
---|
Scripts are time optimized using multiprocessing. Multiprocessing is a system that use multiple central processing units (CPUs) making the scripts run faster.
To run the script type the following line by replacing each file name by the real name.
To analyze general TE:
python3 Multiprocessing/Create_Data_multipro.py \
-g data/Gene_testing_data.tsv \
-te data/Transposon_testing_data.tsv \
-o result/output_TE.tsv
To analyze LTR:
python3 Multiprocessing/Create_Data_LTR_multiprocessing.py \
-g data/Gene_testing_data.tsv \
-te data/LTR_testing_data.tsv \
-o result/output_LTR.tsv
The script will take each file and extract all the data and put them in lists of dictionaries. Then for each TE, it will check the nearest gene whether it's subset,superset, upstream/downstream or whether it's an upstream/downstream overlap.
The script create a new output file (.tsv) which will be used to make the statistical analysis.
A prettier and easy reading table can be generated with:
python3 Multiprocessing/Create_Data_multipro_reformatted.py \
-g data/Gene_testing_data.tsv \
-te data/Transposon_testing_data.tsv \
-o result/output_TE.tsv
python3 Multiprocessing/Create_Data_LTR_multiprocessing_reformatted.py \
-g data/Gene_testing_data.tsv \
-te data/LTR_testing_data.tsv \
-o result/output_LTR.tsv
There are four R scripts allowing to report different kinds of information:
- Count the number of TEs
- Count the number of TEs with associated genes within a certain distance
- Overlap statistics, which show how many TEs have an overlap with gene, both upstream and downstream.
- Distance statistics, which show the number of each TE superfamily overlap with the closest gene (-i -1 -x 0) or within the distance of 0-500 bp (-i 0 -x 500), 500-1000 bp (-i 501 -x 1000), 1000-2000 bp (-i 1001 -x 2000) and more than 2000 bp. The subsets and supersets are not included in these counts. The input file is the result file obtained from the Python script.
The input file is the result file obtained with the Python script.
Rscript Rscript/number_te.r \
-f result/output_TE.tsv \
-o result/count_TE_transposons.pdf
Rscript Rscript/count_gene_associated_te.r \
-f result/output_TE.tsv \
-o result/count_TE_transposons.pdf \
-i 0 \
-x 2000
Rscript Rscript/Overlap_counting.r \
-f result/output_TE.tsv \
-p result/overlap_TE_results.pdf \
-o result/overlap_TE_results.csv
Rscript Rscript/Distance_counting.r \
-f result/output_TE.tsv \
-p result/distance_TE_results.pdf \
-o result/distance_TE_results.csv
Please note that the graph's legend will also need to be change according to the file and species.
This programme has been developped by Caroline Meguerditchian and Ayse Ergun under the supervision of Marie Lefebvre and Quynh Trang-Bui.