DOI: 10.6084/m9.figshare.27187977
title: <b>Dataset for manuscript: </b><b>Phylogenetic and genomic insights into the evolution of terpenoid biosynthesis genes in diverse plant lineages</b>

description: This is the dataset for the manuscript entitled: Phylogenetic and genomic insights into the evolution of terpenoid biosynthesis genes in diverse plant lineages<br><b>1 "Species name.xlsx": </b>This Excel file includes species name abbreviations and their full names.<br><b>2 "Phylogeny" Folder:(Supplemental Figures S2–S25)</b> This folder contains files related to the phylogenetic analyses for genes, including phylogenetic trees and corresponding amino acid sequences. <b>2.1 Folder Content:</b> Phylogenetic tree files (*.raxml_bs.tre): These files are the phylogenetic trees of each gene, generated using RAxML. Amino acid sequence files (*.fa): These files contain the amino acid sequences used to construct the phylogenetic trees. <b>2.2 The step to construct phylogenetic trees:</b> you can use the following command in a Linux environment: python2 fasta_to_tree.py ./input_dir/ 4 aa y # Place amino acid sequence files (*.fa) in the 'input_dir' directory. The script 'fasta_to_tree.py' is available at: https://bitbucket.org/yanglab/phylogenomic_dataset_construction/src/master/scripts/<br><b>3 "Expression" Folder:(Figures 5A and 5B; Supplemental Figures S33 and S34)</b> This folder is used for analyzing gene expression levels, including extracting, processing, and visualizing expression level. In this study, gene expression levels are represented using Transcripts Per Million (TPM). <b>3.1 Folder Content:</b> '1total-TPM' and '2total-TPM': RNA-seq reads for each species were mapped to CDSs of each species using Salmon v1.3.0. The sequence IDs and TPM values in the output files 'quant.sf' of each species were extracted and combined into 'total_TPM'. As the file size of 'total_TPM' exceeded the allowed size in Excel, we split it into '1total-TPM' and '2total-TPM'. Both the two files are in format with two columns: ID: A unique identifier for each gene. TPM: The normalized expression value for the corresponding gene. These files were used to extract the expression levels of target genes. 'input/' directory: This directory contains the gene ID files for which the expression levels need to be extracted. The gene IDs are derived from the amino acid sequence files in the "Phylogeny" folder. From these sequence files, the gene IDs for the target species are extracted. For example, you can use the following command in a Linux environment: grep '&gt;' DXR-MEP.fa &gt; DXR.xlsx #'DXR-MEP.fa' is the input file from the "Phylogeny" folder in this case. 'DXR.xlsx' is the output file, which contains the extracted gene IDs. After extracting the gene IDs, make sure to add a column header named "ID" in the output file (DXR.xlsx). Python Scripts (.py): These three scripts are executed in Visual Studio Code, using Python 3.10.4 as the runtime environment. 'gene_expression-average.py': The processed data generated by this script is used for downstream visualization tasks, such as creating heatmaps (Figure 5A) and raincloud plots (Figure 5B). Extracts the gene expression levels from '1total-TPM' and '2total-TPM' for the gene IDs in the 'input' directory. Calculates the average expression level of terpenoid biosynthesis genes for each species and the results will be stored in the summary file 'average-expression.xlsx'. 'gene_expression-3highest-average.py': The processed data generated by this script is used for downstream visualization tasks, such as creating heatmaps (Supplemental Figure S33A) and raincloud plots (Supplemental Figure S33B). Extracts the expression levels for the top three highest-expressed genes of terpenoid biosynthesis genes for each species. Calculates the average of the top three values and the results will be stored in the summary file '3highest-average-expression.xlsx'. 'gene_expression-sum.py': The processed data generated by this script is used for downstream visualization tasks, such as creating heatmaps (Supplemental Figure S34A) and raincloud plots (Supplemental Figure S34B). Extracts the gene expression levels from 1total-TPM and 2total-TPM for the gene IDs in the 'input' directory. Calculates the sum of expression levels of terpenoid biosynthesis genes for each species and the results will be stored in the summary file 'sum-expression.xlsx'. CSV Files (.csv): These files are used as input for generating visualizations (e.g., heatmaps and raincloud plots). 'average-expression-log.csv': (Figure 5A and 5B) The file is generated by running the script 'gene_expression-average.py', which produces the file 'average-expression.xlsx'. The 'average-expression.xlsx' file is then converted to a CSV format and further processed with a log2 transformation to create 'average-expression-log.csv'. This file contains processed data for the average expression levels of genes. All values are log2-transformed for better visualization and analysis. '3highest-average-expression-log.csv': (Supplemental Figure S33A and S33B) The file is generated by running the script 'gene_expression-3highest-average.py', which produces the file 'average-expression.xlsx'. The 'average-expression.xlsx' file is then converted to a CSV format and further processed with a log2 transformation to create '3highest-average-expression-log.csv'. This file contains the top three highest average expression levels for each gene family. All values are log2-transformed. 'sum-expression-log.csv': (Supplemental Figure S34A and S34B) The file is generated by running the script 'gene_expression-sum.py', which produces the file 'sum-expression.xlsx'. The 'sum-expression.xlsx' file is then converted to a CSV format and further processed with a log2 transformation to create 'sum-expression-log.csv'. Contains the summed expression levels for genes across selected species. All values are log2-transformed. 'heatmap.r': This file is used to generate heatmaps for visualizing gene expression levels. The raincloud plots are generated by tvBOT (https://www.chiplot.online/). <b>3.2 Workflow:</b> <b>3.2.1. Preparation:</b> Place the reference files ('1total-TPM' and '2total-TPM') and the gene ID files ('input/') in the respective directories. <b>3.2.2. Run Python Scripts: </b> Use the following scripts based on the required analysis: Sum of expression levels: Run 'gene_expression-sum.py'. Average expression levels: Run 'gene_expression-average.py'. Top three highest averages: Run 'gene_expression-3highest-average.py'. Each script will generate a summary file in .xlsx format. <b>3.2.3. Post-process the Outputs:</b> Convert the summary file (.xlsx) into .csv format. Apply log2 transformation to all expression values in the .csv files. <b>3.2.4. Generate heatmaps and raincloud plots:</b> Use the R script (heatmap.r) to create heatmaps from the log2-transformed .csv files. (Figure 5A; Supplemental Figures S33A and S34A) Use the tvBOT (https://www.chiplot.online/) to create raincloud plots from the log2-transformed .csv files (Figure 5B; Supplemental Figures S33B and S34B).<br><b>4 "KaKs" Folder: (Figure 5C)</b> This folder is used to process Ka/Ks data for individual genes and generate boxplots to visualize the Ka/Ks distribution. <b>4.1 Folder Content:</b> Python Scripts (.py): 'cdhit.py': This script is executed in a Linux environment. It is run directly in the command: python3 cdhit.py This script is designed to remove redundant sequences using the CD-HIT tool. The input for this script is a FASTA file containing the sequences of terpenoid biosynthesis genes. These genes are identified using the gene IDs provided in the "Expression" folder. The gene IDs are used to retrieve the corresponding sequences, which are then organized into a FASTA file to serve as the input for cd-hit. The non-redundant sequences obtained from this script are used for downstream Ka/Ks calculations. 'gene_pair.py': This script is executed in a Linux environment. It is run directly in the command: python3 gene_pair.py This script generates all possible gene pairs (including reverse pairs and no self-pairs) such as 'DXR_pair.id' from a list of gene IDs provided in an input file. The gene IDs used as input for this script are obtained from the non-redundant sequences generated by the 'cdhit.py'. 'boxplot.py': This script is executed in Visual Studio Code, using Python 3.10.4 as the runtime environment. This script processes the data in the 'input/' directory and creates a boxplot for Ka/Ks distribution (Figure 5C). 'DXR_pair.id': This file is an example of gene pairs specifically for the DXR gene family in the target species. This file is generated using the 'gene_pair.py'. A text file containing all possible gene pairs, formatted as: Gene1 Gene2 Gene1 Gene3 Gene2 Gene1 ... 'input/' directory: Contains Excel files with Ka/Ks ratios for each species. The Ka/Ks ratios are calculated using ParaAT and KaKs_Calculator for gene pairs. The resulting data is organized into an Excel file for each gene family, which contains two columns: 'Species' and 'Ka/Ks'. The Excel file is stored in the 'input/' directory.<br> <b>4.2 Workflow:</b> 4.2.1. Preparation: Use 'cdhit.py' to process gene sequences and generate non-redundant sequences. The genes used here are the same as those in the "Expression" folder. Extract gene IDs from the non-redundant sequences. Use 'gene_pair.py' to generate gene pairs from the extracted gene IDs. Calculate Ka/Ks values for the gene pairs using ParaAT and KaKs_Calculator, and then organize the results. Pre-process the output of KaKs_Calculator into .xlsx files with the following structure: Species: The species name. Ka/Ks: The calculated Ka/Ks ratios. 4.2.2. Run the Script: 'boxplot.py' (Figure 5C) The script will generate a PDF file (gene_ka_ks_boxplot.pdf) in the same directory<br><b>5 "Correlation" Folder: (Figure 5D)</b> This folder is used for performing correlation analysis between Ka/Ks ratios and gene expression levels for various gene families. <b>5.1 Folder Content:</b> 'input/' directory: Same as the 'input/' directory in the "KaKs" folder. Python Scripts (.py): These three scripts are executed in Visual Studio Code, using Python 3.10.4 as the runtime environment. 'get_kaks_median.py': Calculates the median Ka/Ks ratio for each gene across species. Generates the file 'KaKs_Medians.xlsx'. 'get_TPM_median.py': Calculates the median TPM value for each gene. Generates the file 'TPM_Medians.xlsx'. 'correlation_analysis.py': Performs correlation analysis between 'KaKs_Medians.xlsx' and 'TPM_Medians.xlsx'. Calculates Pearson and Spearman correlation coefficients and p-values. Generates a scatter plot with a linear regression line and saves it as 'Correlation_Plot.pdf' (Figure 5D). Excel Files (.xlsx): 'average-expression-log.xlsx': This file is converted from 'average-expression-log.csv' in the "Expression" folder to an Excel (.xlsx) format for use in this folder. 'KaKs_Medians.xlsx': Median Ka/Ks values calculated by 'get_kaks_median.py'. 'TPM_Medians.xlsx': Median TPM values calculated by 'get_TPM_median.py'.<br> <b>5.2 Workflow:</b> 5.2.1. Preparation: Place Ka/Ks data in the 'input/' directory as .xlsx files. Place the TPM data in 'average-expression-log.xlsx'. 5.2.2. Run Median Calculation Scripts: Calculate the median Ka/Ks and TPM values using the following scripts: 'get_kaks_median.py' and 'get_TPM_median.py'. The two scripts will calculate median Ka/Ks values and median TPM values 5.2.3. Run Correlation Analysis: (Figure 5D) Use 'correlation_analysis.py' to analyze the correlation between Ka/Ks and TPM medians and generate a visualization of the results 'Correlation_Plot.pdf'.