Skip to content

EVidenceModeler (EVM)

Gemy George Kaithakottil edited this page Apr 29, 2026 · 5 revisions
Run EVM using EVidenceModeler command

Run EVM using EVidenceModeler command (<4 minutes)

cd /home/train/Annotation_workshop/EVM
(
/usr/bin/time -v EVidenceModeler \
    --sample_id Athaliana \
    --genome Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa \
    --gene_predictions Inputs/Models/gene_models_list_A.gff3 \
    --protein_alignments Inputs/Evidence/protein_alignments.gff3 \
    --transcript_alignments Inputs/Evidence/transcript_alignments.gff3 \
    --weights $PWD/Inputs/Configs/weights.txt \
    --segmentSize 500000 \
    --overlapSize 50000 \
    --search_long_introns 5000
mkdir -p Chr3
cp -a Athaliana.EVM.gff3 Chr3/evm.out.gff3
)

⚠️ Windows users:

/usr/bin/time -v EVidenceModeler --sample_id Athaliana --genome Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa --gene_predictions Inputs/Models/gene_models_list_A.gff3 --protein_alignments Inputs/Evidence/protein_alignments.gff3 --transcript_alignments Inputs/Evidence/transcript_alignments.gff3 --weights $PWD/Inputs/Configs/weights.txt --segmentSize 500000 --overlapSize 50000 --search_long_introns 5000 && mkdir -p Chr3 && cp -a Athaliana.EVM.gff3 Chr3/evm.out.gff3

Once the above task completes successfully, you can skip sections 1 to 6 and proceed directly to section 7) Generate the annotation stats for the EVM models

1) Partition the EVM inputs

cd /home/train/Annotation_workshop/EVM
(
partition_EVM_inputs.pl \
    --partition_dir . \
    --genome Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa \
    --gene_predictions Inputs/Models/gene_models_list_A.gff3 \
    --protein_alignments Inputs/Evidence/protein_alignments.gff3 \
    --transcript_alignments Inputs/Evidence/transcript_alignments.gff3 \
    --segmentSize 500000 \
    --overlapSize 50000 \
    --partition_listing partitions_list.out
)

⚠️ Windows users:

partition_EVM_inputs.pl --partition_dir . --genome Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa --gene_predictions Inputs/Models/gene_models_list_A.gff3 --protein_alignments Inputs/Evidence/protein_alignments.gff3 --transcript_alignments Inputs/Evidence/transcript_alignments.gff3 --segmentSize 500000 --overlapSize 50000 --partition_listing partitions_list.out

2) Extract just the partitions that contain genes in our example region

grep "Chr3_900001-1400000\|Chr3_1350001-1850000" partitions_list.out > my_partitions_list.out

3) Create the EVM commands file

(
write_EVM_commands.pl \
    --genome Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa \
    --gene_predictions Inputs/Models/gene_models_list_A.gff3 \
    --protein_alignments Inputs/Evidence/protein_alignments.gff3 \
    --transcript_alignments Inputs/Evidence/transcript_alignments.gff3 \
    --weights $PWD/Inputs/Configs/weights.txt \
    --search_long_introns 5000 \
    --output_file_name evm.out  \
    --partitions my_partitions_list.out > commands.list
)

⚠️ Windows users:

write_EVM_commands.pl --genome Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa --gene_predictions Inputs/Models/gene_models_list_A.gff3 --protein_alignments Inputs/Evidence/protein_alignments.gff3 --transcript_alignments Inputs/Evidence/transcript_alignments.gff3 --weights $PWD/Inputs/Configs/weights.txt --search_long_introns 5000 --output_file_name evm.out --partitions my_partitions_list.out > commands.list

4) We can run the EVM commands for the two partitions

Scripts/run.sh commands.list

5) Gather together the EVM outputs

recombine_EVM_partial_outputs.pl --partitions my_partitions_list.out --output_file_name evm.out

6) Convert the EVM output to gff3

(
convert_EVM_outputs_to_GFF3.pl  \
    --partitions my_partitions_list.out \
    --output evm.out \
    --genome Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa
)

⚠️ Windows users:

convert_EVM_outputs_to_GFF3.pl --partitions my_partitions_list.out --output evm.out --genome Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa

7) Generate the annotation stats for the EVM models

mikado util stats Chr3/evm.out.gff3 evm.out.gff3.stats

8) Summarise the annotation stats

parse_mikado_stats evm.out.gff3.stats > evm.out.gff3.stats.summary

9) Compare annotation stats between the reference annotation and the EVM models

(
Scripts/paste_mikado_summary_stats.sh \
    Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf.stats.summary \
    evm.out.gff3.stats.summary |
    tabulate -s "\t"
)

⚠️ Windows users:

Scripts/paste_mikado_summary_stats.sh Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf.stats.summary evm.out.gff3.stats.summary | tabulate -s "\t"
--------------------------------  -----------------  -------
Metric                            Athaliana.regionA  evm
Number of genes                   122.00             106.00
Number of Transcripts             221.00             106.00
Transcripts per gene              1.78               1.00
Number of monoexonic genes        23.00              23.00
Monoexonic transcripts            29.00              23.00
Transcript mean size cDNA (bp)    1806.26            1332.25
Transcript median size cDNA (bp)  1714.00            1174.00
Min cDNA                          162.00             195.00
Max cDNA                          5588.00            5112.00
Total exons                       1579.00            645.00
Exons per transcript              7.14               6.08
Exon mean size (bp)               252.81             218.94
CDS mean size (bp)                190.14             218.94
Transcript mean size CDS (bp)     1288.83            1332.25
Transcript median size CDS (bp)   1209.00            1174.00
Min CDS                           108.00             195.00
Max CDS                           5112.00            5112.00
Intron mean size (bp)             155.22             149.45
5'UTR mean size (bp)              250.33             0.00
3'UTR mean size (bp)              267.10             0.00
--------------------------------  -----------------  -------

10) Run mikado compare to to see how well the EVM models match the reference annotation

(
mikado compare \
    -r Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf \
    -p Chr3/evm.out.gff3 \
    -o mikado_compare.evm
)

⚠️ Windows users:

mikado compare -r Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf -p Chr3/evm.out.gff3 -o mikado_compare.evm

11) Repeat, but limiting the comparison to just CDS features

(
mikado compare \
    -r Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf \
    -p Chr3/evm.out.gff3 \
    -eu \
    -o mikado_compare_eu.evm
)

⚠️ Windows users:

mikado compare -r Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf -p Chr3/evm.out.gff3 -eu -o mikado_compare_eu.evm

Add UTRs and splice variants using Mikado

12) Run Mikado configure

(
mikado configure \
    --full \
    --list Inputs/Configs/list.txt \
    --reference Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa \
    --scoring plant.yaml \
    --copy-scoring plant.yaml \
    --only-reference-update \
    configuration.toml
)

⚠️ Windows users:

mikado configure --full --list Inputs/Configs/list.txt --reference Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa --scoring plant.yaml --copy-scoring plant.yaml --only-reference-update configuration.toml

13) Run Mikado prepare

mikado prepare -p 1 --json-conf configuration.toml

14) Identify the models with no CDS features and generate a cDNA fasta file of these transcripts

(
gffread --nc -T \
    -o mikado_prepared.nc.gtf \
    -w mikado_prepared.nc.fasta \
    -g Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa \
    mikado_prepared.gtf
)

⚠️ Windows users:

gffread --nc -T -o mikado_prepared.nc.gtf -w mikado_prepared.nc.fasta -g Inputs/Reference/Athaliana_447_TAIR10_Chr3_clean.fa mikado_prepared.gtf

15) Run prodigal to call ORFs

prodigal -g 1 -f gff -i mikado_prepared.nc.fasta -o mikado_prepared.cds.gff

16) Load ORFs and junctions

(
mikado serialise \
    -p 1 \
    --json-conf configuration.toml \
    --junctions Inputs/Mikado/portcullis.pass.junctions.regionA.bed \
    --orfs mikado_prepared.cds.gff
)

⚠️ Windows users:

mikado serialise -p 1 --json-conf configuration.toml --junctions Inputs/Mikado/portcullis.pass.junctions.regionA.bed --orfs mikado_prepared.cds.gff

17) Run Mikado pick to select gene models

mikado pick -p 4 --output-dir Mikado --json-conf configuration.toml

18) Run mikado compare to to see how well the EVM-mikado models match the reference annotation

(
mikado compare \
    -r Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf \
    -p Mikado/mikado.loci.gff3 \
    -o mikado_compare.evm-mikado
)

⚠️ Windows users:

mikado compare -r Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf -p Mikado/mikado.loci.gff3 -o mikado_compare.evm-mikado

19) Compare mikado compare results between EVM and EVM-mikado models

paste mikado_compare.evm.stats mikado_compare.evm-mikado.stats |expand -t 60
Mikado version 2.3.4; Command line:                         Mikado version 2.3.4; Command line:
/opt/conda/envs/mikado_env/bin/mikado compare -r Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf -p Chr3/evm.out.gff3 -o mikado_compare.evm                    /opt/conda/envs/mikado_env/bin/mikado compare -r Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf -p Mikado/mikado.loci.gff3 -o mikado_compare.evm-mikado
221 reference RNAs in 122 genes                             221 reference RNAs in 122 genes
106 predicted RNAs in  106 genes                            144 predicted RNAs in  106 genes
--------------------------------- |   Sn |   Pr |   F1 |    --------------------------------- |   Sn |   Pr |   F1 |
                        Base level: 61.58  97.72  75.55                             Base level: 78.74  93.10  85.32
            Exon level (stringent): 51.39  71.78  59.90                 Exon level (stringent): 53.83  67.55  59.91
              Exon level (lenient): 76.06  97.76  85.55                   Exon level (lenient): 81.59  93.45  87.12
                 Splice site level: 86.56  99.17  92.43                      Splice site level: 90.69  96.22  93.37
                      Intron level: 90.65  99.07  94.67                           Intron level: 93.52  95.60  94.55
                 Intron level (NR): 84.23  99.07  91.05                      Intron level (NR): 88.49  94.76  91.52
                Intron chain level: 38.54  86.75  53.37                     Intron chain level: 48.44  72.22  57.99
           Intron chain level (NR): 37.89  86.75  52.75                Intron chain level (NR): 47.89  72.22  57.59
      Transcript level (stringent): 0.90  1.89  1.22              Transcript level (stringent): 0.90  1.39  1.10
  Transcript level (>=95% base F1): 3.17  6.60  4.28          Transcript level (>=95% base F1): 29.41  44.44  35.40
  Transcript level (>=80% base F1): 26.24  53.77  35.27       Transcript level (>=80% base F1): 45.70  68.75  54.90
         Gene level (100% base F1): 1.64  1.89  1.75                 Gene level (100% base F1): 1.64  1.89  1.75
        Gene level (>=95% base F1): 5.74  6.60  6.14                Gene level (>=95% base F1): 46.72  53.77  50.00
        Gene level (>=80% base F1): 46.72  53.77  50.00             Gene level (>=80% base F1): 73.77  84.91  78.95

#   Matching: in prediction; matched: in reference.         #   Matching: in prediction; matched: in reference.

            Matching intron chains: 72                                  Matching intron chains: 91
             Matched intron chains: 74                                   Matched intron chains: 93
   Matching monoexonic transcripts: 14                         Matching monoexonic transcripts: 15
    Matched monoexonic transcripts: 14                          Matched monoexonic transcripts: 16
        Total matching transcripts: 86                              Total matching transcripts: 106
         Total matched transcripts: 88                               Total matched transcripts: 109

          Missed exons (stringent): 438/901  (48.61%)                 Missed exons (stringent): 416/901  (46.17%)
           Novel exons (stringent): 182/645  (28.22%)                  Novel exons (stringent): 233/718  (32.45%)
            Missed exons (lenient): 192/802  (23.94%)                   Missed exons (lenient): 148/804  (18.41%)
             Novel exons (lenient): 14/624  (2.24%)                      Novel exons (lenient): 46/702  (6.55%)
                    Missed introns: 100/634  (15.77%)                           Missed introns: 73/634  (11.51%)
                     Novel introns: 5/539  (0.93%)                               Novel introns: 31/592  (5.24%)

       Missed transcripts (0% nF1): 25/221  (11.31%)               Missed transcripts (0% nF1): 24/221  (10.86%)
        Novel transcripts (0% nF1): 3/106  (2.83%)                  Novel transcripts (0% nF1): 5/144  (3.47%)
             Missed genes (0% nF1): 19/122  (15.57%)                     Missed genes (0% nF1): 18/122  (14.75%)
              Novel genes (0% nF1): 3/106  (2.83%)                        Novel genes (0% nF1): 2/106  (1.89%)

20) Generate the annotation stats for the EVM-mikado models

mikado util stats Mikado/mikado.loci.gff3 mikado.loci.gff3.stats

21) Summarise the annotation stats

parse_mikado_stats mikado.loci.gff3.stats > mikado.loci.gff3.stats.summary

22) Compare annotation stats between the reference, EVM and EVM-mikado annotations

(
Scripts/paste_mikado_summary_stats.sh \
    Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf.stats.summary \
    evm.out.gff3.stats.summary \
    mikado.loci.gff3.stats.summary |
    tabulate -s "\t"
)

⚠️ Windows users:

Scripts/paste_mikado_summary_stats.sh Inputs/Ref_Annotation/Athaliana_447_Araport11.gene_exons.regionA.gtf.stats.summary evm.out.gff3.stats.summary mikado.loci.gff3.stats.summary | tabulate -s "\t"
--------------------------------  -----------------  -------  -------
Metric                            Athaliana.regionA  evm      mikado
Number of genes                   122.00             106.00   106.00
Number of Transcripts             221.00             106.00   144.00
Transcripts per gene              1.78               1.00     1.36
Number of monoexonic genes        23.00              23.00    17.00
Monoexonic transcripts            29.00              23.00    18.00
Transcript mean size cDNA (bp)    1806.26            1332.25  1826.08
Transcript median size cDNA (bp)  1714.00            1174.00  1712.00
Min cDNA                          162.00             195.00   243.00
Max cDNA                          5588.00            5112.00  5609.00
Total exons                       1579.00            645.00   963.00
Exons per transcript              7.14               6.08     6.69
Exon mean size (bp)               252.81             218.94   273.06
CDS mean size (bp)                190.14             218.94   213.85
Transcript mean size CDS (bp)     1288.83            1332.25  1348.43
Transcript median size CDS (bp)   1209.00            1174.00  1209.00
Min CDS                           108.00             195.00   195.00
Max CDS                           5112.00            5112.00  5112.00
Intron mean size (bp)             155.22             149.45   152.85
5'UTR mean size (bp)              250.33             0.00     214.93
3'UTR mean size (bp)              267.10             0.00     262.72
--------------------------------  -----------------  -------  -------

After the above commands to clean up, i.e. return to only the original files.

IMPORTANT: Before deleting, please make sure that you are in the EVM folder under /home/train/Annotation_workshop/EVM. Otherwise, other data files will be deleted

cd /home/train/Annotation_workshop/EVM
rm -rf -v !("Inputs"|"Scripts"|"commands.txt"|"Example_output")

⚠️ Windows users:

cd /home/train/Annotation_workshop/EVM && rm -rf -v !("Inputs"|"Scripts"|"commands.txt"|"Example_output")

Clone this wiki locally