ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/yamap/etandem_parse_artemis.pl
Revision: 1.2
Committed: Thu Sep 28 13:14:52 2006 UTC (9 years, 10 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_repeat_tandem_parser
6 # FUNCTION: coverts Emboss results to artemis readable file
7 # Author: Adrian Tett (adet@ceh.ac.uk)
8 ####################################
9
10 my $file = $ARGV[0];
11 my $output = $ARGV[1];
12 my @lines;
13 my $line;
14 open (IN, $file) or die "Can't open file $file: $!";
15 open OUT, ">$output" or die "Can't open $output: $!";
16
17 # read lines, clear white space at the start and at the end of a string
18
19 @lines = <IN>;
20 foreach $line(@lines) {
21 chomp ($line);
22 $line =~ s/^\s+//;
23 if ($line =~ /^\d/) {
24 my ($start, $end, $score, $size, $count, $identity, $consensus) = split/\s+/, $line;
25 print "$start, $end, $score, $size, $count, $identity, $consensus\n";
26 print OUT "FT repeat_region $start..$end\n";
27 print OUT "FT \/REPEAT_TYPE=\"tandem\"\n";
28 print OUT "FT \/score\=$score\n";
29 print OUT "FT \/id\=\"$identity\"\n";
30 print OUT "FT \/note\=\"from emboss etandem, size $size, count $count, consensus $consensus\"\n";
31 }
32 }
33
34 close IN;
35 close OUT;