TITLE: Structural and Functional Annotation of bee genome
AUTHORS: Rafael Rodrigues Ferrari, Thiago Mafra Batista

[DESCRIPTION]
This protocol provides detailed, step-by-step instructions for students and researchers to annotate nuclear genomes, using the genome of the Asian bee Colletes collaris as an example. We begin with the identification of repetitive regions, followed by gene prediction, functional annotation of protein-coding genes, and identification of non-coding RNAs (ncRNAs and tRNAs).

[STEPS]
SECTION: IDENTIFICATION OF REPETITIVE REGIONS
1. Identification of repetitive regions

****RepearModeler (on Kiko)****

***Building a database***
 
***Run RepeatModeler***
 
****RepeatMasker (on kiko)****

***Masking genome***

#Use the -families.fa
 
***Generating a summary***
 
***Generating a .gff3 for use in MAKER***

**Converting the .out into a .gff3**
 
**Isolating complex repeats**
 
**Reformatting the .complex.gff3**
 

SECTION: GENE PREDICTION (STRUCTURAL ANNOTATION)
2.1. Train Augustus (convert the combined .gff file into Augustus HMMs)

***Filter gff file***
 
***Produce a Genbank-formated file named collaris.gb***
 
#To check the number of genes in training set
 
***Create a new Augustus species name***
 
***Initiate training***
 
#The initial model should be in the directory below:
 
**Run a test set for evaluation before optimization**
 
*Predict the genes and check the results*
 
**Optimize model**
 
*Train again after optimization*
 
*Use the optionized model to evaluate again and check the results*
 

SECTION: GENE PREDICTION (STRUCTURAL ANNOTATION)
2. 
****MAKER2 (https://github.com/sujaikumar/assemblage/blob/master/README-annotation.md) (on kiko)****
***Generate control files***
 
***MAKER 1st pass***

**Edit file maker_opts.ctl**

**Run Maker**
 

SECTION: GENE PREDICTION (STRUCTURAL ANNOTATION)
2.2. ***MAKER 2nd pass***

**Generate new control files**
 
**Produce separate gffs**
 
**Edit file maker_opts.ctl**

**Run Maker**
 
**Combine all the fasta and GFFs**
 
**Check AED**
 
***Rename genes***
 

SECTION: FUNCTIONAL ANNOTATION
3. ****Diamond (https://github.com/bbuchfink/diamond/wiki)****

***Run the .maker.transcripts.fasta against Swiss-Prot***

**Prepare a .pbs file to run the analysis remotely on Sagarana**
 
**Convert de .daa output file into a .fmt6 file**
 
***Keep only best hits***
 
***Produce a list of identifiers that matched Swiss-Prot***
 
***Produce a .fasta file with the sequences that did not match Swiss-Prot***
 
***Run Diamond agains Trembl***

**Prepare a .pbs file to run the analysis remotely on Sagarana**
 
**Convert de .daa output file into a .fmt6 file**
 
***Keep only best hits***
 
***Merge output files***
 

SECTION: FUNCTIONAL ANNOTATION
3.1. ****InterProScan (https://github.com/ebi-pf-team/interproscan)****

***Identy protein domains***
 

SECTION: ANNOTATION PROCESSING
3.2. ***Add functional annotation to Maker outputs***

 

SECTION: ANNOTATION PROCESSING
3.3. *****ANNOTATION STATISTICS*****

****Count complete sequences (on kiko)****

***Genes***
 
***CDS***
 
***Exons***
 
***Introns***
 
****Count nucleotides in fasta files (on kiko)****
 
****Count evidence from interproscan (on sagarana)****
 
****Count evidence from UniProt****
 

SECTION: SEARCHING FOR NON-CODING RNAs (ncRNAs)
4. ****Infernal (https://github.com/EddyRivasLab/infernal)****

***Prepare a subject database***

**Download the Rfam database**
 
**Decompress the file**
 
**Merge all .cm files**
 
***Run Infernal***
 
***Prepare a list of identifiers for annotation***

**Go to https://rfam.org/search#tabview=tab5**

**Check all the boxes and then hit 'submit'**

**Go to the bottom of the page and click on 'Show the unformatted list'**

**Copy and paste the list onto a text editor and save the file as 'rfam-types.txt'**

**Produce a list of identifiers**
 
**Filter Infernal results**
 

SECTION: SEARCHING FOR TRANSPORTING RNAs (tRNAs) ONLY
5. ****tRNAscan-SE (https://github.com/UCSC-LoweLab/tRNAscan-SE)****

***Prepare a .pbs file to run the analysis remotely on Sagarana***
 
***Count the number of identified tRNAs***