ThomasDOtto / ratt

Rapid Annotation Transfer Tool
GNU General Public License v3.0
8 stars 4 forks source link

mRNA transfer fails if < or > are present in the positions #10

Open Lenascha opened 2 years ago

Lenascha commented 2 years ago

RATT does not transfer mRNA features if they include < or > in their positions. This can be fixed by applying the following changes: main.ratt.pl 739a740

          $ar[$i] =~ /(\d+)\.\.\>(\d+)/;

ratt_correction.pm

2122a2123,2157

elsif (/^(-\d+)..>(-\d+)$/) { $a1=$1; $b1=$2;

    if ($a1<1) {
          if ($b1<10) {
            $a1=$newPos;
          }
          else {
            $a1=($b1-9)
          }
          $newPos+=$newPos
    }
    if ($b1>$seqLength) {

          $b1=$seqLength;

    }
    if ($a1>$seqLength) {

          $a1=($b1-3)
    }

    if ($b1<1) {
          $b1=($a1+9);
          $newPos+=$newPos
    }

    if ($a1>$b1) {
          $tmp{$b1}="$b1..$a1"
    }
    else {
          $tmp{$a1}="$a1..$b1"
    }
  }