ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/yamap/rbs_parse_artemis.pl
Revision: 1.1.1.1 (vendor branch)
Committed: Thu Sep 7 15:35:21 2006 UTC (10 years ago) by knirirr
Branch: MAIN, cehox
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
Log Message:
Imported sources

Line File contents
1 #!/usr/bin/perl -w
2
3
4 ##################################################
5 # Creates artemis tab file from rbsfinder output #
6 ##################################################
7
8 use strict;
9
10 unless (@ARGV ==2) {
11 die "\n\nUsage:\n ./rbs_parse_artemis.pl path2rbs path2output\nPlease try again.\n\n\n";}
12
13 my $path2rbs = shift;
14 my $path2output = shift;
15
16
17 my ($header, @lines, $rs, $line, @temp, $start, $stop, $codon);
18
19 open (IN, "$path2rbs");
20 @lines = <IN>;
21 close IN;
22 open (OUT, ">$path2output");
23
24 $header = 0;
25 $rs = "\t";
26
27 foreach $line (@lines)
28 {
29 $header++;
30 if ($header > 2)
31 {
32 $line =~s/\s+/$rs/g;
33 # print "$line\n";
34 @temp = split /$rs/, $line;
35 $start = $temp[2];
36 $stop = $temp[3];
37 $codon = $temp[6];
38 if ($start > $stop)
39 {
40 print OUT "FT CDS complement($stop"."..$start)\n";
41 print OUT "FT /colour=5\n";
42 print OUT "FT /note=\"predicted using RBSfinder from Glimmer output\"\n";
43 }
44 else
45 {
46 print OUT "FT CDS $start"."..$stop\n";
47 print OUT "FT /colour=5\n";
48 print OUT "FT /note=\"predicted using RBSfinder from Glimmer output\"\n";
49 }
50 }
51 }