Body: <p>I am trying to use a tool called RATT described in this <a href="https://academic.oup.com/nar/article/39/9/e57/1236534" rel="nofollow noreferrer">paper</a> and available <a href="http://ratt.sourceforge.net/" rel="nofollow noreferrer">here</a>. I ran the <a href="http://ratt.sourceforge.net/example.html" rel="nofollow noreferrer">example</a> using the following command:</p>
  
  <p><code>$RATT_HOME/start.ratt.sh embl F11.fasta F11 Strain</code></p>
  
  <p><code>embl</code> is a folder containing the file <code>Tb_H37Rv.embl</code>, which is an annotation file in EMBL format of the <em>Mycobacterium tuberculosis</em> genome. F11.fasta contains the genome in FASTA sequence of the strain F11 of <em>Mycobacterium tuberculosis</em>. This example provided by the RATT developers runs smoothly:</p>
  
  <pre><code>Of the reference chromosome Tb_H37Rv    2.66 per cent   has no synteny with the query
  Of the query chromosome gi_148821191_ref_NC_009565.1_    3.03 per cent  has no synteny with the reference
  </code></pre>
  
  <p>...</p>
  
  <pre><code>Please see the file F11.gi_148821191_ref_NC_009565.1_.Report.txt for reporting the errors and the file F11.gi_148821191_ref_NC_009565.1_.Report.gff for reporting the error in Artemis or other sequence viewer.
  ************************ 
  If you want to start artemis on this replicon:
  art F11.gi_148821191_ref_NC_009565.1_.final.embl + F11.gi_148821191_ref_NC_009565.1_.Report.gff  + Query/F11.gi_148821191_ref_NC_009565.1_.Mutations.gff
  </code></pre>
  
  <p>Then, I tried it on the genome of <em>E. coli</em> and it worked:</p>
  
  <pre><code>$RATT_HOME/start.ratt.sh embl bact1.fa bact1 Species
  </code></pre>
  
  <p>I used the embl file from <em>Mycobacterium</em> so not much annotation was transferred due to the large genetic differences between <em>Mycobacterium</em> and <em>E. coli</em>. </p>
  
  <p>Then, I tried to transfer the annotation from the reference genome of <em>C. elegans</em> to a new assembly I have generated. The way I generated the embl annotation file is by running <code>seqret</code> on the fasta file of <em>C. elegans</em> and its corresponding annotation file found in GTF format:</p>
  
  <pre><code>seqret -sequence c_elegans.PRJNA13758.WS263.genomic.fa -feature -fformat gff -fopenfile c_elegans.PRJNA13758.WS263.annotations.gff3 -osformat embl -auto -outseq c_elegans.PRJNA13758.WS263.embl
  </code></pre>
  
  <p>I got the following error:</p>
  
  <pre><code>RATT_HOME/start.ratt.sh embl scaffolds.fa scaffolds Strain
  
  ERROR: Reference input does not match delta file
  Assertion failed: (Len - Coord + 1 &gt; 0), function revC, file show-coords.cc, line 1118.
  /Users/user/Documents/project/output/software/ratt-code/start.ratt.sh: line 73: 85325 Abort trap: 6           show-coords -clHT $name.delta &gt; $name.coords
  Assertion failed: (Len - Coord + 1 &gt; 0), function revC, file show-coords.cc, line 1118.
  /Users/user/Documents/project/output/software/ratt-code/start.ratt.sh: line 73: 85326 Abort trap: 6           show-coords -clHT $name.filter.delta &gt; $name.filter.coords
  Use of uninitialized value $stats in print at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 82.
  Nucmer is done. Now transfer the annotation.
  perl /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl embl nucmer.scaffolds.snp nucmer.scaffolds.filter.coords scaffolds
  working on c_elegans.PRJNA13758.WS263
  Use of uninitialized value in split at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 1140.
  Can't use an undefined value as an ARRAY reference at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 229.
  6 Sequences where generated
  Done.
  Nucmer is done. Now Correct the annotation for chromosome .
  work on I
  If you want to start artemis on this replicon:
  art scaffolds.I.final.embl + scaffolds.I.Report.gff  + Query/scaffolds.I.Mutations.gff
  work on II
  If you want to start artemis on this replicon:
  art scaffolds.II.final.embl + scaffolds.II.Report.gff  + Query/scaffolds.II.Mutations.gff
  work on III
  If you want to start artemis on this replicon:
  art scaffolds.III.final.embl + scaffolds.III.Report.gff  + Query/scaffolds.III.Mutations.gff
  work on IV
  If you want to start artemis on this replicon:
  art scaffolds.IV.final.embl + scaffolds.IV.Report.gff  + Query/scaffolds.IV.Mutations.gff
  work on V
  If you want to start artemis on this replicon:
  art scaffolds.V.final.embl + scaffolds.V.Report.gff  + Query/scaffolds.V.Mutations.gff
  work on X
  If you want to start artemis on this replicon:
  art scaffolds.X.final.embl + scaffolds.X.Report.gff  + Query/scaffolds.X.Mutations.gff
  rm: scaffolds*embl.tmp.BBA.embl: No such file or directory
  </code></pre>
  
  <p>I downloaded the FASTA file <a href="ftp://ftp.wormbase.org/pub/wormbase/releases/WS263/species/c_elegans/PRJNA13758/c_elegans.PRJNA13758.WS263.genomic.fa.gz" rel="nofollow noreferrer">here</a> and the GTF file <a href="ftp://ftp.wormbase.org/pub/wormbase/releases/WS263/species/c_elegans/PRJNA13758/c_elegans.PRJNA13758.WS263.annotations.gff3.gz" rel="nofollow noreferrer">here</a>.</p>
  
  <p>I am working on Mac OSX.</p>
  
  <h3>Update 6th August 2018</h3>
  
  <p>I have also tried an alternative way of getting a <em>C. elegans</em> annotation in EMBL format. I downloaded it from the Ensembl FTP website:</p>
  
  <p>wget -m <a href="ftp://ftp.ensembl.org/pub/release-91/embl/caenorhabditis_elegans/" rel="nofollow noreferrer">ftp://ftp.ensembl.org/pub/release-91/embl/caenorhabditis_elegans/</a> --directory-prefix embl/</p>
  
  <p>Then, I cat-ed the .dat files (one for each chromosome) into one <code>ensembl.embl</code> file and used that for the RATT command:</p>
  
  <pre><code>$RATT_HOME/start.ratt.sh embl scaffolds.fa scaffolds Strain
  
  ERROR: Could not parse delta file, nucmer.scaffolds.delta
  error no: 402
  ERROR: Could not parse delta file, nucmer.scaffolds.filter.delta
  error no: 402
  ERROR: Could not parse delta file, nucmer.scaffolds.delta
  error no: 402
  ERROR: Could not parse delta file, nucmer.scaffolds.filter.delta
  error no: 402
  Use of uninitialized value $stats in print at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 82.
  Nucmer is done. Now transfer the annotation.
  perl /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl embl nucmer.scaffolds.snp nucmer.scaffolds.filter.coords scaffolds
  working on ensembl
  Use of uninitialized value in split at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 1140.
  Can't use an undefined value as an ARRAY reference at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 229.
  6 Sequences where generated
  Done.
  Nucmer is done. Now Correct the annotation for chromosome .
  work on I
  If you want to start artemis on this replicon:
  art scaffolds.I.final.embl + scaffolds.I.Report.gff  + Query/scaffolds.I.Mutations.gff
  </code></pre>
  
  <p>...</p>
  
  <pre><code>work on X
  If you want to start artemis on this replicon:
  art scaffolds.X.final.embl + scaffolds.X.Report.gff  + Query/scaffolds.X.Mutations.gff
  rm: scaffolds*embl.tmp.BBA.embl: No such file or directory
  
  Indeed, the nucmer delta file is empty. If that is the only problem, maybe I can run nucmer separately but then how can I run RATT without running nucmer?
  </code></pre>
  
  <p>The developer of RATT told me to not concatenate the EMBL files because there is no need to do so. So, here is the output of RATT on the .embl files, one for each chromosome. </p>
  
  <pre><code>$RATT_HOME/start.ratt.sh embl scaffolds.fa scaffolds Strain  
  
  Of the reference chromosome Caenorhabditis_elegans.WBcel235.91.chromosome.I 13.76 per cent  has no synteny with the query
  </code></pre>
  
  <p>...</p>
  
  <pre><code>Of the query chromosome X    15.29 per cent has no synteny with the reference
  Nucmer is done. Now transfer the annotation.
  perl /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl embl nucmer.scaffolds.snp nucmer.scaffolds.filter.coords scaffolds
  working on Caenorhabditis_elegans.WBcel235.91.chromosome.I
  Argument "11123466)" isn't numeric in sort at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 985, &lt;F&gt; line 2547.
  Argument "11123466)" isn't numeric in sort at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 985, &lt;F&gt; line 2555.
  Argument "5568506)" isn't numeric in sort at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 985, &lt;F&gt; line 2627.
  1474993 1480045 2526 1477519 
  14358883 14373963 7540 14366423 
  3204189 3216229 6020 3210209 
  3809476 3812106 1315 3810791 
  10232464 10233260 398 10232862 
  10491944 10506864 7460 10499404 
  11020347 11023081 1367 11021714 
  318712 361504 21396 340108 
  working on Caenorhabditis_elegans.WBcel235.91.chromosome.MtDNA
  Can't use an undefined value as an ARRAY reference at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 229.
  6 Sequences where generated
  Done.
  Nucmer is done. Now Correct the annotation for chromosome .
  work on I
  If you want to start artemis on this replicon:
  art scaffolds.I.final.embl + scaffolds.I.Report.gff  + Query/scaffolds.I.Mutations.gff
  </code></pre>
  
  <p>...</p>
  
  <pre><code>work on X
  If you want to start artemis on this replicon:
  art scaffolds.X.final.embl + scaffolds.X.Report.gff  + Query/scaffolds.X.Mutations.gff
  rm: scaffolds*embl.tmp.BBA.embl: No such file or directory
  </code></pre>
  
  <p>It is better than before because I get a reasonable delta file from nucmer. But the error <code>Argument "11123466)" isn't numeric</code> is a problem. It seems that is should be easy enough to solve this. It looks to me like the coordinates from the EMBL file are not parsed properly and the code stumbles on the coordiate followed by a <code>)</code>.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-03T13:15:41.443Z
Comments.Text: The seqret didn't give any error?  It seems like the expectation of ratt and the output of seqret differ. Maybe it needs a specific version or the problem is only on the RATT program
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-03T14:37:22.023Z
Comments.Text: seqret did not give an error.
Comments.UserDisplayName: Biomagician
Tags: <sequence-annotation><embl>
Title: RATT works on example bacterial sequence and other bacterial genome but not on C. elegans genome and annotation
ThreadText: # RATT works on example bacterial sequence and other bacterial genome but not on C. elegans genome and annotation
  
  (Asked by: username_0 on 2018-08-02)
  
  I am trying to use a tool called RATT described in this [paper](https://academic.oup.com/nar/article/39/9/e57/1236534) and available [here](http://ratt.sourceforge.net/). I ran the [example](http://ratt.sourceforge.net/example.html) using the following command:
  
  `$RATT_HOME/start.ratt.sh embl F11.fasta F11 Strain`
  
  `embl` is a folder containing the file `Tb_H37Rv.embl`, which is an annotation file in EMBL format of the *Mycobacterium tuberculosis* genome. F11.fasta contains the genome in FASTA sequence of the strain F11 of *Mycobacterium tuberculosis*. This example provided by the RATT developers runs smoothly:
  
  ```
  Of the reference chromosome Tb_H37Rv    2.66 per cent   has no synteny with the query
  Of the query chromosome gi_148821191_ref_NC_009565.1_    3.03 per cent  has no synteny with the reference
  
  ```
  
  ...
  
  ```
  Please see the file F11.gi_148821191_ref_NC_009565.1_.Report.txt for reporting the errors and the file F11.gi_148821191_ref_NC_009565.1_.Report.gff for reporting the error in Artemis or other sequence viewer.
  ************************ 
  If you want to start artemis on this replicon:
  art F11.gi_148821191_ref_NC_009565.1_.final.embl + F11.gi_148821191_ref_NC_009565.1_.Report.gff  + Query/F11.gi_148821191_ref_NC_009565.1_.Mutations.gff
  
  ```
  
  Then, I tried it on the genome of *E. coli* and it worked:
  
  ```
  $RATT_HOME/start.ratt.sh embl bact1.fa bact1 Species
  
  ```
  
  I used the embl file from *Mycobacterium* so not much annotation was transferred due to the large genetic differences between *Mycobacterium* and *E. coli*.
  
  Then, I tried to transfer the annotation from the reference genome of *C. elegans* to a new assembly I have generated. The way I generated the embl annotation file is by running `seqret` on the fasta file of *C. elegans* and its corresponding annotation file found in GTF format:
  
  ```
  seqret -sequence c_elegans.PRJNA13758.WS263.genomic.fa -feature -fformat gff -fopenfile c_elegans.PRJNA13758.WS263.annotations.gff3 -osformat embl -auto -outseq c_elegans.PRJNA13758.WS263.embl
  
  ```
  
  I got the following error:
  
  ```
  RATT_HOME/start.ratt.sh embl scaffolds.fa scaffolds Strain
  
  ERROR: Reference input does not match delta file
  Assertion failed: (Len - Coord + 1 > 0), function revC, file show-coords.cc, line 1118.
  /Users/user/Documents/project/output/software/ratt-code/start.ratt.sh: line 73: 85325 Abort trap: 6           show-coords -clHT $name.delta > $name.coords
  Assertion failed: (Len - Coord + 1 > 0), function revC, file show-coords.cc, line 1118.
  /Users/user/Documents/project/output/software/ratt-code/start.ratt.sh: line 73: 85326 Abort trap: 6           show-coords -clHT $name.filter.delta > $name.filter.coords
  Use of uninitialized value $stats in print at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 82.
  Nucmer is done. Now transfer the annotation.
  perl /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl embl nucmer.scaffolds.snp nucmer.scaffolds.filter.coords scaffolds
  working on c_elegans.PRJNA13758.WS263
  Use of uninitialized value in split at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 1140.
  Can't use an undefined value as an ARRAY reference at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 229.
  6 Sequences where generated
  Done.
  Nucmer is done. Now Correct the annotation for chromosome .
  work on I
  If you want to start artemis on this replicon:
  art scaffolds.I.final.embl + scaffolds.I.Report.gff  + Query/scaffolds.I.Mutations.gff
  work on II
  If you want to start artemis on this replicon:
  art scaffolds.II.final.embl + scaffolds.II.Report.gff  + Query/scaffolds.II.Mutations.gff
  work on III
  If you want to start artemis on this replicon:
  art scaffolds.III.final.embl + scaffolds.III.Report.gff  + Query/scaffolds.III.Mutations.gff
  work on IV
  If you want to start artemis on this replicon:
  art scaffolds.IV.final.embl + scaffolds.IV.Report.gff  + Query/scaffolds.IV.Mutations.gff
  work on V
  If you want to start artemis on this replicon:
  art scaffolds.V.final.embl + scaffolds.V.Report.gff  + Query/scaffolds.V.Mutations.gff
  work on X
  If you want to start artemis on this replicon:
  art scaffolds.X.final.embl + scaffolds.X.Report.gff  + Query/scaffolds.X.Mutations.gff
  rm: scaffolds*embl.tmp.BBA.embl: No such file or directory
  
  ```
  
  I downloaded the FASTA file [here](ftp://ftp.wormbase.org/pub/wormbase/releases/WS263/species/c_elegans/PRJNA13758/c_elegans.PRJNA13758.WS263.genomic.fa.gz) and the GTF file [here](ftp://ftp.wormbase.org/pub/wormbase/releases/WS263/species/c_elegans/PRJNA13758/c_elegans.PRJNA13758.WS263.annotations.gff3.gz).
  
  I am working on Mac OSX.
  
  ### Update 6th August 2018
  
  I have also tried an alternative way of getting a *C. elegans* annotation in EMBL format. I downloaded it from the Ensembl FTP website:
  
  wget -m <ftp://ftp.ensembl.org/pub/release-91/embl/caenorhabditis_elegans/> --directory-prefix embl/
  
  Then, I cat-ed the .dat files (one for each chromosome) into one `ensembl.embl` file and used that for the RATT command:
  
  ```
  $RATT_HOME/start.ratt.sh embl scaffolds.fa scaffolds Strain
  
  ERROR: Could not parse delta file, nucmer.scaffolds.delta
  error no: 402
  ERROR: Could not parse delta file, nucmer.scaffolds.filter.delta
  error no: 402
  ERROR: Could not parse delta file, nucmer.scaffolds.delta
  error no: 402
  ERROR: Could not parse delta file, nucmer.scaffolds.filter.delta
  error no: 402
  Use of uninitialized value $stats in print at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 82.
  Nucmer is done. Now transfer the annotation.
  perl /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl embl nucmer.scaffolds.snp nucmer.scaffolds.filter.coords scaffolds
  working on ensembl
  Use of uninitialized value in split at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 1140.
  Can't use an undefined value as an ARRAY reference at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 229.
  6 Sequences where generated
  Done.
  Nucmer is done. Now Correct the annotation for chromosome .
  work on I
  If you want to start artemis on this replicon:
  art scaffolds.I.final.embl + scaffolds.I.Report.gff  + Query/scaffolds.I.Mutations.gff
  
  ```
  
  ...
  
  ```
  work on X
  If you want to start artemis on this replicon:
  art scaffolds.X.final.embl + scaffolds.X.Report.gff  + Query/scaffolds.X.Mutations.gff
  rm: scaffolds*embl.tmp.BBA.embl: No such file or directory
  
  Indeed, the nucmer delta file is empty. If that is the only problem, maybe I can run nucmer separately but then how can I run RATT without running nucmer?
  
  ```
  
  The developer of RATT told me to not concatenate the EMBL files because there is no need to do so. So, here is the output of RATT on the .embl files, one for each chromosome.
  
  ```
  $RATT_HOME/start.ratt.sh embl scaffolds.fa scaffolds Strain  
  
  Of the reference chromosome Caenorhabditis_elegans.WBcel235.91.chromosome.I 13.76 per cent  has no synteny with the query
  
  ```
  
  ...
  
  ```
  Of the query chromosome X    15.29 per cent has no synteny with the reference
  Nucmer is done. Now transfer the annotation.
  perl /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl embl nucmer.scaffolds.snp nucmer.scaffolds.filter.coords scaffolds
  working on Caenorhabditis_elegans.WBcel235.91.chromosome.I
  Argument "11123466)" isn't numeric in sort at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 985, <F> line 2547.
  Argument "11123466)" isn't numeric in sort at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 985, <F> line 2555.
  Argument "5568506)" isn't numeric in sort at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 985, <F> line 2627.
  1474993 1480045 2526 1477519 
  14358883 14373963 7540 14366423 
  3204189 3216229 6020 3210209 
  3809476 3812106 1315 3810791 
  10232464 10233260 398 10232862 
  10491944 10506864 7460 10499404 
  11020347 11023081 1367 11021714 
  318712 361504 21396 340108 
  working on Caenorhabditis_elegans.WBcel235.91.chromosome.MtDNA
  Can't use an undefined value as an ARRAY reference at /Users/user/Documents/project/output/software/ratt-code/main.ratt.pl line 229.
  6 Sequences where generated
  Done.
  Nucmer is done. Now Correct the annotation for chromosome .
  work on I
  If you want to start artemis on this replicon:
  art scaffolds.I.final.embl + scaffolds.I.Report.gff  + Query/scaffolds.I.Mutations.gff
  
  ```
  
  ...
  
  ```
  work on X
  If you want to start artemis on this replicon:
  art scaffolds.X.final.embl + scaffolds.X.Report.gff  + Query/scaffolds.X.Mutations.gff
  rm: scaffolds*embl.tmp.BBA.embl: No such file or directory
  
  ```
  
  It is better than before because I get a reasonable delta file from nucmer. But the error `Argument "11123466)" isn't numeric` is a problem. It seems that is should be easy enough to solve this. It looks to me like the coordinates from the EMBL file are not parsed properly and the code stumbles on the coordiate followed by a `)`.
  
  **Tags:** sequence-annotation, embl
  
  > **Comments:**
  > **username_1**: The seqret didn't give any error?  It seems like the expectation of ratt and the output of seqret differ. Maybe it needs a specific version or the problem is only on the RATT program  
  > **username_0**: seqret did not give an error.  
  
  ---
  
  ## 0 answers
  
  