ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/yamap/palindrome_parse_artemis.pl
Revision: 1.2
Committed: Thu Sep 28 13:14:52 2006 UTC (9 years, 7 months ago) by knirirr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
Log Message:
Updated labels in parser scripts.

Line File contents
1 #!/usr/bin/perl
2 use strict;
3 #################################################
4 #################################################
5 # SCRIPT NAME: emboss_palindrome_repeats_parser
6 # FUNCTION: converts emboss ouput to Artemis readable format
7 # AUTHOR: Adrian Tett (adet@ceh.ac.uk)
8 #################################################
9
10 my $file1 = $ARGV[0];
11 my $output = $ARGV[1];
12 my @lines;
13 my $line;
14
15 open (IN, $file1) or die "ooops can't open file: $file1";
16 open OUT, "> $output" or die "can't open $output";
17
18 @lines = <IN>;
19 foreach $line(@lines) {
20 chomp ($line);
21 $line =~ s/^\s+//;
22 if ($line =~ /^\d/) {
23 my ($start, $seq, $end) = split/\s+/, $line;
24 print "$seq\n";
25 print OUT "FT repeat_region $start..$end\n";
26 print OUT "FT \/REPEAT_TYPE=\"palindrome\"\n";
27 print OUT "FT \/note\=\"from emboss palindrome, sequence $seq\"\n";
28 }
29 }
30
31 close IN;
32 close OUT;