ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/scripts/mapgffback.pl
Revision: 24
Committed: Tue Jul 26 21:46:39 2011 UTC (13 years, 1 month ago) by gpertea
File size: 558 byte(s)
Log Message:
Line User Rev File contents
1 gpertea 23 #!/usr/bin/perl
2    
3     use strict;
4     my ($file,$addcoord)=@ARGV;
5    
6     open(F,$file) || die ("Error opening file $file\n");
7     my $p='';
8     if ($file=~m/\.(\d+)$/) {
9     $p=$1;
10     # -- only needed for correct naming of gff3 entitied
11     # produced by gmap ran on separate parts
12    
13     }
14     while(<F>) {
15     chomp;
16     if (substr($_,0,1) eq "#") { print $_."\n";}
17     else {
18     if ($p) {
19     s/\.cds(\d+)/\.cds$p\_$1/g;
20     s/\.path(\d+)/\.p$p\_$1/g;
21     }
22     my @a=split;
23     $a[3]+=$addcoord;
24     $a[4]+=$addcoord;
25     print join("\t", @a)."\n";
26     }
27     }
28     close(F);

Properties

Name Value
svn:executable *