TITLE: Additional information for the manual annotation of the terpene synthase gene family in Melaleuca alternifolia (tea tree)
AUTHORS: Julia Voelker

[DESCRIPTION]
This protocol was created to be read in conjunction with the publication about the manual annotation of the terpene synthase (TPS) gene family in Melaleuca alternifolia (tea tree). It provides additional information regarding the computational methods mentioned in the manuscript, especially concerning specific commands for reproducibility of the methodology. 

When using and citing this protocol, please also refer to the original article publication as mentioned in the metadata section of this protocol.

[STEPS]
SECTION: Manual terpene synthase (TPS) annotation
1. The genome of the tea tree reference genotype SCU01 (BioProject PRJNA702189) was used for the manual TPS annotation. Genes in the tea tree genome sequence were automatically predicted with Fgenesh++ v7.2.2 (RRID:SCR_018928) and GenemarkET+ v4.59 (RRID:SCR_011930). The methods for the Fgenesh++ prediction are explained in Voelker et al. (2021) and the accompanying protocol.For the Genemark prediction, the same NCBI nr-protein plant database and RNA-seq reads were used as evidence. The protein database was aligned to the genome assembly using ProtHint v2.5.0 (RRID:SCR_021167) and RNAseq spliced read alignments were created with STAR v2.7 (RRID:SCR_004463):

- Julia Voelker, Mervyn Shepherd, Ramil Mauleon, A high-quality draft genome for Melaleuca alternifolia (tea tree): a new platform for evolutionary genomics of myrtaceous terpene-rich species, Gigabyte, 2021  https://doi.org/10.46471/gigabyte.28
- Julia Voelker 2021. Additional information for the creation of a high-quality draft genome for Melaleuca alternifolia (tea tree). protocols.io https://dx.doi.org/10.17504/protocols.io.bwi2pcge
SECTION: Phylogenetic tree creation
2. A phylogenetic trees was created for the predicted M. alternifolia TPS protein sequences. For comparison to other species, the TPS amino acid sequences for A. thaliana, C. citriodora, E. grandis and E. globulus,  P. trichocarpa and V. vinifera were retrieved and used for the creation of an additional phylogenetic tree containing the TPS sequences of all mentioned species.
SECTION: Manual terpene synthase (TPS) annotation
1.2. GenemarkET+ gene prediction

Trimmed RNAseq reads and sequences in the NCBI nr-protein database were aligned to the genome assembly before running GenemarkET+
 


SECTION: Manual terpene synthase (TPS) annotation
1.3. Exonerate alignment of TPS sequences

As further evidence for exon-intron borders, TPS protein sequences were aligned to the genome assembly with Exonerate v2.4.0 (RRID:SCR_016088). First, protein sequences matching the ‘terpene synthase’ keyword search were retrieved from Phytozome v13 (accessed 20/05/2021) for A. thaliana ARAPORT11, C. citriodora v2.1, E. grandis v2.0, P. trichocarpa v4.1 and V. vinifera v2.1. These sequences were then aligned to the genome using the protein2genome mode of Exonerate. 

 

SECTION: Manual terpene synthase (TPS) annotation
1.1. RNAseq read trimming

M. alternifolia RNAseq data from three other individual trees of the same chemotype (BioProject PRJNA388506; SRR5630605, SRR5630611, SRR5630622) were downloaded and converted to fastq format with the NCBI SRA toolkit. Quality controls were undertaken with FastQC (RRID:SCR_014583) and reads were trimmed with Flexbar (RRID:SCR_013001).

 

SECTION: Phylogenetic tree creation
2.1. M. alternifolia tree and multi-species tree

The M. alternifolia TPS protein sequences were manually assessed in Unipro UGENE v39.0 (RRID:SCR_005579) and where possible, trimmed to the start of the RRx8W motif. Multiple-sequence alignment (MSA) was carried out with the inbuilt MUSCLE tool (RRID:SCR_011812), and columns with gaps >75% were removed from the alignment. The trimmed MSA output was converted into NEXUS format and used as input for phylogenetic tree construction using PhyML v3.3 (RRID:SCR_014629).

 

Similarly, the sequences for all species were loaded into Unipro UGENE and where possible, trimmed to the start of the RRx8W motif, as already done for M. alternifolia. Next, MSA was carried out for all species, using MUSCLE and trimming the resulting alignment to remove all columns with >75% gap representation. Phylogenetic tree construction was carried out with 100 bootstraps and settings as already mentioned for the M. alternifolia tree. After the whole tree was visualised and annotated in iTOL v6, different clades were exported into separated trees for a clearer visualisation of each subfamily.
SECTION: Manual terpene synthase (TPS) annotation
1.4. 
Manual adjustment of TPS gene structures

The GFF-file containing exons and splice sites from TPS alignments were visualised in Apollo (RRID:SCR_001936) together with RNAseq read alignments, the Fgenesh++ and the GenemarkET+ gene predictions and the genome sequence. Potential terpene synthases were identified based on TPS alignments and predicted protein sequences containing TPS Pfam domains. To identify the C-terminal (PF03936) and N-terminal (PF01397) TPS Pfam domains, the GenemarkET+ and Fgenesh++ protein sequence predictions were screened for PfamA domains (RRID:SCR_004726) using InterProScan (RRID:SCR_005829) in Galaxy Europe (RRID:SCR_006281). 
All lines of evidence were taken into consideration for the manual annotation of the terpene synthase gene structures using the genome annotation editor Apollo. 
SECTION: Manual terpene synthase (TPS) annotation
1.5. Quality control and removal of duplicates

The manually annotated TPS genes were named consecutively (MaltTPS001-MaltTPS73) based on their location on a scaffold, from lowest to highest scaffold number, and their location within the scaffold. Some TPS sequences, however, seemed to be highly similar, so percent sequence identity matrixes were calculated via multiple sequence alignment in Clustal Omega v2.1 (RRID:SCR_001591) with default settings, using the predicted protein, CDS and genomic TPS sequences as input, respectively. Furthermore, the scaffolds containing TPS were aligned in all-vs-all manner using NUCmer v3.1 (RRID:SCR_018171) and Minimap2, respectively. Each scaffold was manually assessed for overlaps with other scaffolds and potential assembly errors or scaffold duplications by going through the alignment outputs and also visualising alignments with Alvis.
. 

 

SECTION: Manual terpene synthase (TPS) annotation
1.6. Screen for conserved regions and organelle-targeting signal peptides

After the removal of scaffold duplications, the final set of manual annotations were screened for conserved amino acid motifs using patmatdb on Galaxy Australia. The NSE/DTE motif sequences for TPS-a, TPS-b and TPS-g proteins were extracted from multiple-sequence alignments with MUSCLE (RRID:SCR_011812) in Unipro UGENE v39.0 (RRID:SCR_005579). The extracted sequences with a length of 11 amino acids were then visualised with WebLogo v3.7.4 (RRID:SCR_010236).  
N-terminal transit peptides in the amino acid sequence of TPS were predicted using TargetP v2.0 (RRID:SCR_019022) and DeepLoc v1.0.
SECTION: Synonymous substitution rates among orthogroups
3. In addition to investigating the similarity of TPS sequences among M. alternifolia, E. grandis and C. citriodora via phylogenetic comparison, the overall similarity of their protein sequences were also compared by investigating single-copy orthologous genes shared among species and calculating their synonymous substitution rates.
SECTION: Synonymous substitution rates among orthogroups
3.1. OrthoFinder analysis

Protein sequences for primary transcripts of E. grandis v2, C. citriodora v2.1, Populus trichocarpa v4, Salix purpurea v1 and Vitis vinifera v2.1 were obtained from Phytozome v13. For M. alternifolia, protein sequences predicted by fgenesh++ and the manually predicted TPS sequences were used. 
The sequences of all species were input for OrthoFinder v2.5.2 to identify single-copy orthologues, i.e. orthogroups containing one orthologous gene per species, with all species present in the group.

 

SECTION: Synonymous substitution rates among orthogroups
3.2. Synonymous substitution rates

Orthofinder identified single-copy orthogroups and created fasta files containing one amino acid sequence per species for each orthogroup. The sequences withing each orthogroup were used for mutiple sequence alignment (MSA) in MUSCLE v5.1. A short script was created to take the sequences within each orthogoup fasta file for MSA, and output the alignments into a newly created alignment directory 

 

SECTION: Synonymous substitution rates among orthogroups
3.3. Translation of amino acid alignments into nucleotide sequences

To calculate synonymous substitution rates from the MSA, the protein sequence alignment had to be converted into coding sequence (CDS) alignments for each orthogroup with pal2nal v14. All coding sequences for the above mentioned species were downloaded from Phytozome v13. 
 In order to run pal2nal, the number of input sequences needed to be exactly the same as the number of output sequences. Therefore, the CDSs from all species had to be placed into separate fasta files corresponding to the orthogroups. 
To simplify further processing, the MSA files were also sorted alphabetically, so that sequences for each species were at the same position in all files. 


 

SECTION: Synonymous substitution rates among orthogroups
3.4. Calculation of synonymous substitution rates 

Once all orthogroup nucleotide sequences were aligned in separate files, PAML codeml v4.10.3 was run for each orthogroup, with pairwise substituion rate calculation (mode -2)


 

After the creation of the general codeml control file according to the manual, the file had to be edited to contain the correct file names for each orthogroup, which was then used to run PAML codeml on each orthogroup CDS alignment:

 

The pairwise values for synonymous substitution rates (Ks) between species were extracted from the output for each orthogroup. Ks values greater than 2 were filtered out to remove ortholog groups whose synonymous substitutions may be oversaturated. A density plot showing the pairwise Ks distribution was created using ggplot2 in R. 

The Ks mutatation rate/site/year (R) between species was calculated with the formula R = Ks/(2*divergence age), using the Ks value from the peak maximum of the Ks distribution. 

SECTION: References
4. References for tools mentioned in the sections above:
Fgenesh++: 
Solovyev V, Kosarev P, Seledsov I, Vorobyev D (2006) Automatic annotation of eukaryotic genes, pseudogenes and promoters. Genome Biol 7 Suppl 1 (Suppl 1):S10.11-12. doi:https://doi.org/10.1186/gb-2006-7-s1-s10
GenemarkET+: 
Lomsadze A, Burns PD, Borodovsky M (2014) Integration of mapped RNA-Seq reads into automatic training of eukaryotic gene finding algorithm. Nucleic acids research 42 (15):e119-e119. doi:https://doi.org/10.1093/nar/gku557
ProtHint:
Brůna T, Lomsadze A, Borodovsky M (2020) GeneMark-EP+: eukaryotic gene prediction with self-training in the space of genes and proteins. NAR Genomics and Bioinformatics 2 (2). doi:https://doi.org/10.1093/nargab/lqaa026
STAR:
Dobin A, Davis CA, Schlesinger F, Drenkow J, Zaleski C, Jha S, Batut P, Chaisson M, Gingeras TR (2012) STAR: ultrafast universal RNA-seq aligner. Bioinformatics 29 (1):15-21. doi:https://doi.org/10.1093/bioinformatics/bts635
Flexbar:
Dodt M, Roehr JT, Ahmed R, Dieterich C (2012) FLEXBAR-Flexible Barcode and Adapter Processing for Next-Generation Sequencing Platforms. Biology (Basel) 1 (3):895-905. doi:https://doi.org/10.3390/biology1030895
BBtools:
Bushnell B BBMap. sourceforge.net/projects/bbmap/.
Exonerate:
Slater GSC, Birney E (2005) Automated generation of heuristics for biological sequence comparison. BMC bioinformatics 6:31. doi:https://doi.org/10.1186/1471-2105-6-31
Apollo:
Dunn NA, Unni DR, Diesh C, Munoz-Torres M, Harris NL, Yao E, Rasche H, Holmes IH, Elsik CG, Lewis SE (2019) Apollo: Democratizing genome annotation. PLOS Computational Biology 15 (2):e1006790. doi:https://doi.org/10.1371/journal.pcbi.1006790
Clustal Omega:
Madeira F, Pearce M, Tivey ARN, Basutkar P, Lee J, Edbali O, Madhusoodanan N, Kolesnikov A, Lopez R (2022) Search and sequence analysis tools services from EMBL-EBI in 2022. Nucleic acids research. doi:https://doi.org/10.1093/nar/gkac240
NUCmer:
Marçais G, Delcher AL, Phillippy AM, Coston R, Salzberg SL, Zimin A (2018) MUMmer4: A fast and versatile genome alignment system. PLOS Computational Biology 14 (1):e1005944. doi:https://doi.org/10.1371/journal.pcbi.1005944
Minimap2:
Li H (2018) Minimap2: pairwise alignment for nucleotide sequences. Bioinformatics 34 (18):3094-3100. doi:https://doi.org/10.1093/bioinformatics/bty191
Alvis:
Martin S, Leggett RM (2021) Alvis: a tool for contig and read ALignment VISualisation and chimera detection. BMC Bioinformatics 22 (1):124. doi:https://doi.org/10.1186/s12859-021-04056-0
Unipro UGENE:
Okonechnikov K, Golosova O, Fursov M, team tU (2012) Unipro UGENE: a unified bioinformatics toolkit. Bioinformatics 28 (8):1166-1167. doi:https://doi.org/10.1093/bioinformatics/bts091
TargetP:
Almagro Armenteros JJ, Salvatore M, Emanuelsson O, Winther O, von Heijne G, Elofsson A, Nielsen H (2019) Detecting sequence signals in targeting peptides using deep learning. Life Science Alliance 2 (5):e201900429. doi:https://doi.org/10.26508/lsa.201900429
DeepLoc:
Almagro Armenteros JJ, Sønderby CK, Sønderby SK, Nielsen H, Winther O (2017) DeepLoc: prediction of protein subcellular localization using deep learning. Bioinformatics 33 (21):3387-3395. doi:https://doi.org/10.1093/bioinformatics/btx431
PhyML:
Guindon S, Dufayard J-F, Lefort V, Anisimova M, Hordijk W, Gascuel O (2010) New Algorithms and Methods to Estimate Maximum-Likelihood Phylogenies: Assessing the Performance of PhyML 3.0. Systematic Biology 59 (3):307-321. doi:https://doi.org/10.1093/sysbio/syq010
Orthofinder:
Emms DM, Kelly S (2019) OrthoFinder: phylogenetic orthology inference for comparative genomics. Genome Biology 20 (1):238. doi:https://doi.org/10.1186/s13059-019-1832-y
pal2nal:
Suyama M, Torrents D, Bork P (2006) PAL2NAL: robust conversion of protein sequence alignments into the corresponding codon alignments. Nucleic acids research 34 (suppl_2):W609-W612. doi:https://doi.org/10.1093/nar/gkl315
PAML:
Yang Z (2007) PAML 4: Phylogenetic Analysis by Maximum Likelihood. Molecular Biology and Evolution 24 (8):1586-1591. doi:https://doi.org/10.1093/molbev/msm088