gene_prediction_curation_with_igv
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gene_prediction_curation_with_igv [2023/02/02 11:35] – [Curation example] 134.190.232.140 | gene_prediction_curation_with_igv [2025/08/07 16:01] (current) – 134.190.145.228 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Joran Martijn (February 2023) | Joran Martijn (February 2023) | ||
| - | After applying one or more gene prediction algorithms on your genome, you would do well to manually | + | After applying one or more gene prediction algorithms on your genome, you would do well to curate the predicted gene models manually. Even the most advanced algorithms to date can still make mistakes that are otherwise obvious to the human eye. |
| The curation process described here aims to compile all the necessary information in a single screen in the graphical user interface of the Integrated Genomics Viewer ([[https:// | The curation process described here aims to compile all the necessary information in a single screen in the graphical user interface of the Integrated Genomics Viewer ([[https:// | ||
| Line 26: | Line 26: | ||
| Note that here two distinct RNAseq tracks are loaded. One for all the reads stemming from transcripts transcribed from the positive strand of the genome, and one for all those transcribed from the negative strand of the genome. This kind of strand-specificity information is only available when a RNAseq library protocol was used to retains this information, | Note that here two distinct RNAseq tracks are loaded. One for all the reads stemming from transcripts transcribed from the positive strand of the genome, and one for all those transcribed from the negative strand of the genome. This kind of strand-specificity information is only available when a RNAseq library protocol was used to retains this information, | ||
| - | If you used HISAT2 to map your RNAseq reads to your genome, all " | + | If you used HISAT2 |
| < | < | ||
| Line 35: | Line 35: | ||
| samtools index < | samtools index < | ||
| </ | </ | ||
| + | |||
| + | ==== GC content ==== | ||
| + | |||
| + | It may be nice to have a track in IGV that shows you per-window-size %GC. Here I generate a so-called '' | ||
| + | |||
| + | < | ||
| + | cat Ergobibamus_cyprinoides_CL.scaffolds.fa \ | ||
| + | | seqkit sliding -W 50 -s 25 \ | ||
| + | | seqkit fx2tab -n -g \ | ||
| + | | sed -e " | ||
| + | > ergo_gc_content.bedgraph | ||
| + | </ | ||
| + | |||
| + | You can play with the window size '' | ||
| ==== Loading into IGV ==== | ==== Loading into IGV ==== | ||
| Line 156: | Line 170: | ||
| " | " | ||
| " | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| } | } | ||
| + | |||
| ] | ] | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | Load a JSON file with '' | ||
| This has some advantages: | This has some advantages: | ||
| Line 175: | Line 202: | ||
| " | " | ||
| " | " | ||
| - | " | + | " |
| " | " | ||
| " | " | ||
| Line 186: | Line 213: | ||
| To color the RNAseq reads according to strandness, right-click on the track, then '' | To color the RNAseq reads according to strandness, right-click on the track, then '' | ||
| - | It may be useful to set a fixed y-scale of the coverage track. To do so, right-click on the coverage track, then '' | + | It may be useful to set a fixed y-scale of the coverage track. To do so, right-click on the coverage track, then '' |
| Line 202: | Line 229: | ||
| For some frustratingly unknow reason, IGV only displays the three forward frames, OR the three reverse frames. It is, as far as I know, not possible to display all six frames simultaneously. To swap between reverse and forward frames, click on small arrow of the // | For some frustratingly unknow reason, IGV only displays the three forward frames, OR the three reverse frames. It is, as far as I know, not possible to display all six frames simultaneously. To swap between reverse and forward frames, click on small arrow of the // | ||
| + | |||
| ==== Curating gene models ==== | ==== Curating gene models ==== | ||
| Line 258: | Line 286: | ||
| * GFF3 files are tab-delimited, | * GFF3 files are tab-delimited, | ||
| * Each line defines 1 feature. For example, gene, mRNA, exon, CDS, intron, etc | * Each line defines 1 feature. For example, gene, mRNA, exon, CDS, intron, etc | ||
| + | |||
| + | The 9 columns are as follows: | ||
| ^ Column | ^ Column | ||
| Line 270: | Line 300: | ||
| | Attributes | | Attributes | ||
| + | **Phase** is not the same as the reading frame. In short, | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Thus, the CDS corresponding to the first exon //always// has phase 0. CDSs of subsequent exons can have phases 0, 1 or 2. | ||
| + | |||
| + | For example, if the second exon of a gene has sequence '' | ||
| + | |||
| + | The **Attributes** field contains all other information regarding the feature and has a number of '' | ||
| + | |||
| + | As the name implies, IDs are identifiers of your features. An ID of a feature **must be unique** within the entire GFF3 file. Of special consideration are // | ||
| + | |||
| + | < | ||
| + | tig00000015 funannotate gene 617629 | ||
| + | tig00000015 funannotate mRNA 617629 | ||
| + | tig00000015 funannotate CDS 617629 | ||
| + | tig00000015 funannotate exon 617629 | ||
| + | tig00000015 funannotate CDS 617835 | ||
| + | tig00000015 funannotate exon 617835 | ||
| + | tig00000015 funannotate CDS 617937 | ||
| + | tig00000015 funannotate exon 617937 | ||
| + | </ | ||
| + | |||
| + | All CDS features here point to the same CDS. This makes sense, as a CDS is biologically speaking a single object. They thus all have the same ID ('' | ||
| + | |||
| + | The **Name** attribute simply determines the display name of the feature in a genome viewer like IGV. Names do not need to be unique. | ||
| + | |||
| + | **Parent** attributes describe the hierarchical relationship of features. For example, a '' | ||
| + | |||
| + | The '';'', | ||
| + | |||
| + | ^ Special character ^ Percent encoding sign ^ | ||
| + | | '';'' | ||
| + | | '' | ||
| + | | ''&'' | ||
| + | | '','' | ||
| + | | TAB | %09 | | ||
| + | | newline | ||
| + | | carriage return | ||
| + | | '' | ||
| + | |||
| + | ==== Validating curated gene models ==== | ||
| + | |||
| + | We are only human. | ||
| + | |||
| + | Despite our best efforts to curate errors made by the automated gene prediction tools, during the curation process, we humans are prone to make our own mistakes! To help detect at least some of these unintentional oversights, I wrote a script, '' | ||
| + | |||
| + | It will do some sanity checks on all gene models in the GFF3 file: | ||
| + | * Does the gene feature have any children features? | ||
| + | * Do gene coordinates match with mRNA & tRNA coordinates? | ||
| + | * Does the start coordinate of the first CDS/exon match with the gene start? | ||
| + | * Does the end coordinate of the last CDS/exon match with the gene end? | ||
| + | * Is the cumulative length of all exons a multiple of 3? | ||
| + | * Does the translate CDS start with an M and end with a * (STOP)? | ||
| + | * Are there any premature * (STOP) in the CDS? | ||
| + | * If Blastocystis genome, and there is no STOP, does it end with a TGTTTGTT motif? | ||
| + | |||
| + | < | ||
| + | validate_gene_models_in_gff3.py -g Ergobibamus_cyprinoides_CL.recurated.gff3 -f Ergobibamus_cyprinoides_CL.scaffolds.fa | ||
| + | </ | ||
| + | |||
| + | If everything is OK, it will report '' | ||
| + | |||
| + | If a certain feature did not pass a check, the script will prematurely terminate and report an error message. For example '' | ||
| + | |||
| + | You can also optionally print all protein CDS sequences in FASTA format with the '' | ||
| + | |||
| + | < | ||
| + | validate_gene_models_in_gff3.py -g Ergobibamus_cyprinoides_CL.recurated.gff3 -f Ergobibamus_cyprinoides_CL.scaffolds.fa --print_proteins > ergo_proteins.fasta | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | UPDATE (Jan 2025): It should now account for UTRs | ||
| + | |||
| + | ==== Re-streamlining gene names ==== | ||
| + | |||
| + | During your curation, you may be forced to make new gene names that stray from the original format. For example, if you found that gene '' | ||
| + | |||
| + | To re-streamline gene names, you can make use of the '' | ||
| + | |||
| + | < | ||
| + | funannotate util gff-rename \ | ||
| + | --gff3 Ergobibamus_curated.gff3 \ | ||
| + | --fasta Ergobibamus_contigs.fasta \ | ||
| + | --locus_tag PYV62 \ | ||
| + | --out Ergobibamus_curated_renamed.gff3 | ||
| + | </ | ||
| + | |||
| + | Note that I have also added a new locus tag here, '' | ||
gene_prediction_curation_with_igv.1675352104.txt.gz · Last modified: by 134.190.232.140
