Mercurial > repos > matces > carpet_toolsuite
annotate carpet-src-1/tools/CARPET/MapToExon_RefSeqMat_new.pl @ 1:78770028dcf1 default tip
Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
| author | matces | 
|---|---|
| date | Tue, 07 Jun 2011 16:59:33 -0400 | 
| parents | cdd489d98766 | 
| children | 
| rev | line source | 
|---|---|
| 0 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 1 #!/usr/bin/perl | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 2 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 3 # Copyright 2009 Matteo Cesaroni, Lucilla Luzi | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 4 # | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 5 # This program is free software; ; you can redistribute it and/or modify | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 6 # it under the terms of the GNU Lesser General Public License as published by | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 7 # the Free Software Foundation; either version 3 of the License, or (at your | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 8 # option) any later version. | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 9 # | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 10 # This program is distributed in the hope that it will be useful, | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 13 # GNU General Public License for more details. | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 14 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 15 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 16 $|=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 17 my $infile = $ARGV[0]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 18 my $infile2=$ARGV[1]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 19 my $definition_pro=$ARGV[2]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 20 my $definition_tre=$ARGV[3]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 21 my $priority=$ARGV[4]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 22 my $file_output=$ARGV[5]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 23 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 24 open (INFILE, "<$infile"); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 25 open (INFILE2, "<$infile2"); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 26 open (OUTFILE1, ">$file_output") or die "Cannot find file $file_output\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 27 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 28 $campi_t=0; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 29 $definition_out=$definition_pro-2000; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 30 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 31 while (defined (my $line_down = <INFILE2>)) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 32 $line_down=~ s/\#//g; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 33 chomp($line_down); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 34 $campi_t++; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 35 my @tmp_down=split(/\s+/, $line_down); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 36 if($campi_t==1){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 37 $z=0; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 38 foreach $campo_t(@tmp_down){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 39 if(($campo_t eq "name") || ($campo_t eq "qName") || ($campo_t eq "repClass")){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 40 $zRef=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 41 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 42 if(($campo_t eq "txStart") || ($campo_t eq "tStart") || ($campo_t eq "chromStart")|| ($campo_t eq "genoStart")){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 43 $ztxStart=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 44 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 45 if(($campo_t eq "txEnd") || ($campo_t eq "tEnd") || ($campo_t eq "chromEnd")|| ($campo_t eq "genoEnd")){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 46 $ztxEnd=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 47 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 48 if($campo_t eq "strand"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 49 $zstrand=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 50 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 51 if(($campo_t eq "chrom") || ($campo_t eq "tName")|| ($campo_t eq "genoName")){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 52 $zchrom=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 53 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 54 if(($campo_t eq "exonStarts") || ($campo_t eq "tStarts")){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 55 $zexonstart=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 56 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 57 if($campo_t eq "exonEnds"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 58 $zexonend=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 59 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 60 if($campo_t eq "blockSizes"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 61 $zblocksize=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 62 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 63 if(($campo_t eq "name2") || ($campo_t eq "repFamily")){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 64 $zname=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 65 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 66 if(($campo_t eq "exonCount")||($campo_t eq "blockCount")){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 67 $zcount=$z; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 68 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 69 $z++; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 70 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 71 if(!$zname){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 72 $zname=$zRef; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 73 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 74 if(!$zexonstart){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 75 $zexonstart=$ztxStart; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 76 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 77 if(!$zexonend){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 78 $zexonend=$ztxEnd; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 79 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 80 if(($zRef eq "") || ($ztxStart eq "") || ($zstrand eq "") || ($zchrom eq "")){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 81 print "Annotation file is not in the accepted format\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 82 exit; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 83 }else{print "promoter=$definition_pro, priority=$priority";} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 84 next; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 85 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 86 chomp $tmp_down[$zchrom]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 87 $tab_ann{$tmp_down[$zchrom]}.="$line_down\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 88 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 89 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 90 while (defined (my $line_down = <INFILE>)) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 91 my @tmp_down = split("\t", $line_down); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 92 chomp $tmp_down[0]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 93 $tab_probe{$tmp_down[0]}.=$line_down; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 94 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 95 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 96 @chrom_probes= keys(%tab_probe); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 97 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 98 &chip; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 99 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 100 exit 0; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 101 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 102 ########### | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 103 #subrutine# | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 104 ########### | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 105 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 106 sub chip | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 107 { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 108 foreach $chromosoma (@chrom_probes){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 109 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 110 @file1=split("\n", $tab_probe{$chromosoma}); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 111 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 112 foreach $line(@file1) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 113 chomp $line; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 114 #chop $line; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 115 if ($line=~/track/g){next;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 116 if ($line=~/#/g){next;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 117 if ($line=~/^\s+$/g){next;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 118 my @Line=split(/\t/, $line); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 119 my $Chrom=$Line[0]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 120 my $Start=$Line[3]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 121 my $Stop=$Line[4]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 122 #my $value=$Line[5]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 123 my $ProbeName=$Line[5]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 124 my $feature="ciccio"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 125 my $check=0; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 126 my $relative_dist=10000000; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 127 $double_check=0; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 128 @file2=split("\n", $tab_ann{$chromosoma}); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 129 foreach $linea(@file2) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 130 chomp $linea; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 131 $linea=~ s/\#//g; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 132 my @kEle=split("\t", $linea); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 133 $ref=$kEle[$zRef]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 134 $chrom=$kEle[$zchrom]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 135 $strand=$kEle[$zstrand]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 136 $transcriptStart=$kEle[$ztxStart]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 137 $transcriptStop=$kEle[$ztxEnd]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 138 if($zcount){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 139 $exoncount=$kEle[$zcount]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 140 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 141 else | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 142 { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 143 $exoncount=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 144 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 145 $geneName=$kEle[$zname]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 146 $exonStartref=$kEle[$zexonstart]; | 
| 1 
78770028dcf1
Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
 matces parents: 
0diff
changeset | 147 #my $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand"; | 
| 0 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 148 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 149 my @exonStart=split(",", $exonStartref); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 150 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 151 if (!$zblocksize){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 152 $exonEndref=$kEle[$zexonend]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 153 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 154 else { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 155 @blockStop=split(",", $kEle[$zblocksize]); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 156 $exonEndref=""; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 157 for ($jj=0; $jj<=$#exonStart; $jj++){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 158 $end_block=$exonStart[$jj]+$blockStop[$jj]; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 159 $exonEndref.="$end_block,"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 160 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 161 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 162 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 163 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 164 my @exonStop=split(",", $exonEndref); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 165 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 166 #print "$ref / $chrom / $strand / $transcriptStart/$transcriptStop/$exoncount/$geneName [$#exonStop]\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 167 #print "pippo $exonStart[0] - $exonStop[0],$exonStart[1] - $exonStop[1],$exonStart[2] - $exonStop[2] \n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 168 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 169 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 170 if ($Chrom eq $chrom) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 171 #print "cazzo"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 172 if ($strand eq "+"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 173 $promotore=$transcriptStart+$definition_pro; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 174 $distanzaTSS=int((($Start+$Stop)/2)-$transcriptStart); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 175 $trepr=$transcriptStop+$definition_tre; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 176 $rel_start=$promotore; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 177 $rel_stop=$trepr; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 178 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 179 if ($strand eq "-"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 180 $promotore=$transcriptStop-$definition_pro; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 181 $distanzaTSS=int($transcriptStop-(($Start+$Stop)/2)); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 182 $trepr=$transcriptStart-$definition_tre; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 183 $rel_start=$trepr; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 184 $rel_stop=$promotore; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 185 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 186 #print OUTFILE1 "$ref\t$distanzaTSS\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 187 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 188 #if(($Start<=$transcriptStart && $Stop>$transcriptStart) || ($Start>=$promotore && $Stop<=$transcriptStart) || ($Start>=$transcriptStop && $Stop<=$promotore) || ($Start<=$promotore && $Stop>$promotore) || ($Start<$transcriptStop && $Stop>=$transcriptStop) || ($Start>=$transcriptStart && $Stop<=$transcriptStop) ){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 189 #print "sono entrato con start $Start stop $Stop e $transcriptStart e $transcriptStop\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 190 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 191 if($Start<=$rel_stop && $rel_start<=$Stop){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 192 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 193 for(my $i=0;$i<=$#exonStart;$i++) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 194 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 195 if ($strand eq "+"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 196 $exoncount1=$i+1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 197 $exoncount2=$exoncount1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 198 $introncount=$exoncount1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 199 if($i==$#exonStart) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 200 $exoncount2="last"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 201 $introncount="last"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 202 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 203 if($i==$#exonStart-1) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 204 $introncount="last"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 205 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 206 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 207 if ($strand eq "-"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 208 $exoncount1=($#exonStart+1)-$i; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 209 $exoncount2=$exoncount1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 210 $introncount=$exoncount1-1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 211 #if(($i==0) && ($#exonStart != 0)) {$exoncount2="last";} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 212 if($i==0) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 213 $exoncount2="last"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 214 $introncount="last"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 215 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 216 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 217 #print "esone start $exonStart[$i] e $exonStop[$i] e start $Start\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 218 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 219 #print OUTFILE1 "$ref\t$exonStart[$i]\t$exonStop[$i]\t$Start\t$Stop\t$i\t$#exonStart\t$priority\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 220 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 221 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 222 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 223 #if($priority eq "prom" && $check==1){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 224 # last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 225 #} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 226 #if($priority eq "gene" && $check==2){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 227 # next; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 228 #} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 229 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 230 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 231 if(($Start<=$exonStart[$i]) && ($Stop>$exonStart[$i])){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 232 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\tintronexon $exoncount2\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 233 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 234 $check=2; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 235 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 236 else{ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 237 $check=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 238 #last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 239 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 240 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 241 if(($Start>=$exonStart[$i]) && ($Stop<=$exonStop[$i])){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 242 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\texon $exoncount2\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 243 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 244 $check=2; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 245 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 246 else{ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 247 $check=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 248 #last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 249 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 250 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 251 if(($Start<$exonStop[$i]) && ($Stop>$exonStop[$i])){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 252 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\texonintron $introncount\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 253 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 254 $check=2; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 255 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 256 else{ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 257 $check=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 258 #last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 259 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 260 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 261 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 262 if(($Start>=$exonStop[$i]) && ($Stop<=$exonStart[$i+1]) && ($check==0)){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 263 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\tintron $introncount\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 264 #print "intron\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 265 $check=2; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 266 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 267 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 268 else{ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 269 if(($Start>=$exonStop[$i]) && ($Stop<=$exonStart[$i+1])){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 270 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\tintron $introncount\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 271 #print "intron\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 272 $check=2; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 273 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 274 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 275 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 276 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 277 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 278 if (($strand eq "+") && ($Start>=$transcriptStop)) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 279 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\t3_prime\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 280 $distanzaTSS=int($transcriptStop-(($Start+$Stop)/2)); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 281 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 282 $check=2; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 283 #last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 284 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 285 else{$check=1;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 286 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 287 if (($strand eq "-") && ($Stop<=$transcriptStart)) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 288 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\t3_prime\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 289 $distanzaTSS=int((($Start+$Stop)/2)-$transcriptStart); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 290 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 291 $check=2; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 292 #last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 293 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 294 else{$check=1;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 295 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 296 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 297 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 298 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 299 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 300 if (($strand eq "+") && (($Start<=$promotore && $Stop>$promotore) || ($Start>$promotore && $Stop<=$transcriptStart))) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 301 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\tpromoter\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 302 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 303 $check=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 304 #last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 305 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 306 else{$check=2;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 307 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 308 if (($strand eq "-") && (($Start<=$promotore && $Stop>=$promotore) || ($Start>=$transcriptStop && $Stop<$promotore))) { | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 309 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\tpromoter\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 310 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 311 $check=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 312 #last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 313 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 314 else{$check=2;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 315 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 316 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 317 if(($Start<=$exonStart[$i]) && ($i==0) && ($strand eq "+") && ($Stop>=$exonStart[$i])){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 318 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\tprom_exon $exoncount2\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 319 #print "prom-exon e $exoncount1\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 320 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 321 $check=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 322 #last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 323 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 324 else{$check=2;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 325 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 326 if(($Start<=$exonStop[$i]) && ($i==$#exonStart) && ($strand eq "-") && ($Stop>=$exonStop[$i])){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 327 $feature="$ref\t$geneName\t$transcriptStart\t$transcriptStop\t$strand\t$exoncount\tprom_exon $exoncount2\t$distanzaTSS"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 328 if($priority eq "prom"){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 329 $check=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 330 #last; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 331 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 332 else{$check=2;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 333 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 334 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 335 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 336 #if ($check==1){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 337 # print "$chrom\t$Start\t$Stop\t$geneName\t$exoncount\t$ref\t$strand\t$feature\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 338 #} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 339 }else{next;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 340 #exit; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 341 }else{next;} | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 342 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 343 #print OUTFILE1 "$ref\t$feature\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 344 #print "$geneName\t$transcriptStart\t$Chrom\t$Start\t$Stop\t$distanzaTSS\t$feature\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 345 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 346 if (($priority eq "gene") && ($relative_dist>abs($distanzaTSS))){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 347 $relative_dist=abs($distanzaTSS); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 348 $stampa="$Chrom\t$Start\t$Stop\t$ProbeName\t$feature\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 349 $double_check=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 350 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 351 if (($check==1) && ($priority eq "prom") && ($relative_dist>abs($distanzaTSS))){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 352 $relative_dist=abs($distanzaTSS); | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 353 $double_check=1; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 354 $stampa="$Chrom\t$Start\t$Stop\t$ProbeName\t$feature\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 355 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 356 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 357 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 358 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 359 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 360 if($double_check==1){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 361 print OUTFILE1 "$stampa"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 362 next; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 363 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 364 if (($check==2) && ($priority eq "prom")){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 365 print OUTFILE1 "$Chrom\t$Start\t$Stop\t$ProbeName\t$feature\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 366 next; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 367 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 368 if($check==0){ | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 369 print OUTFILE1 "$Chrom\t$Start\t$Stop\t$ProbeName\tintergenic\tintergenic\t$Start\t$Stop\t+\t0\tOUT\t$definition_out\n"; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 370 next; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 371 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 372 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 373 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 374 close INFILE; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 375 close INFILE2; | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 376 } | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 377 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 378 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 379 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 380 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 381 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 382 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 383 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 384 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 385 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 386 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 387 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 388 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 389 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 390 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 391 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 392 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 393 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 394 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 395 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 396 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 397 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 398 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 399 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 400 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 401 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 402 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 403 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 404 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 405 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 406 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 407 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 408 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 409 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 410 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 411 | 
| 
cdd489d98766
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
 matces parents: diff
changeset | 412 | 
