ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/yamap/einverted_parse_artemis.pl
Revision: 1.2
Committed: Thu Sep 28 13:14:52 2006 UTC (9 years, 9 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 #################################################
6 # SCRIPT NAME: emboss_inverted_repeats_parser
7 # FUNCTION: converts emboss ouput to Artemis readable format
8 # AUTHOR: Adrian Tett (adet@ceh.ac.uk)
9 #################################################
10
11 my $file1 = $ARGV[0];
12 my $output = $ARGV[1];
13
14 my @lines;
15 my $line;
16 my $note;
17
18 open (IN, $file1) or die "ooops can't open file: $file1";
19 open OUT, "> $output" or die "can't open $output";
20
21 @lines = <IN>;
22 foreach $line(@lines) {
23 chomp ($line);
24 $line =~ s/^\s+//;
25 if ($line =~ /Score/) {
26 $note = $line;
27 print "$note\n";
28 }
29 if ($line =~ /^\d/) {
30 my ($start, $seq, $end) = split/\s+/, $line;
31 print "$seq\n";
32 print OUT "FT repeat_region $start..$end\n";
33 print OUT "FT \/REPEAT_TYPE=\"inverted\"\n";
34 print OUT "FT \/note\=\"from emboss einverted $note, sequence $seq\"\n";
35 }
36 }
37
38 close IN;
39 close OUT;