ConnectorSet/gse_probe.pm untested

filter: Statementstmt 0.0% 0 / 56 Branchbran 0.0% 0 / 34 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 100 CC 18 SCAR 56.8
CC
18
Cov
0%
parse_entry
342.0
BEGIN
2.0
BEGIN
2.0
CRAP 293.4
1 package Bio::ConnectDots::ConnectorSet::gse_probe;
2 use strict;
3 use vars qw(@ISA);
4 use Bio::ConnectDots::ConnectorSet;
5 @ISA = qw(Bio::ConnectDots::ConnectorSet);
6 my (%platforms, %ids, @ids, $geo);
7 my $flag = 0;
8
9 sub parse_entry {
10 my ($self) = @_;
11 my $input_fh=$self->input_fh;
12 while (<$input_fh>) {
13 chomp;
14 if (/^\!Platform_geo_accession\s*=\s*(GPL\d+)/) {
15 $geo = $1;
16 $flag = 1;
17 $flag = 0 if ($platforms{$geo});
18 $platforms{$geo} = 1;
19 next;
20 }
21 if (/^\^/ && $flag == 1) {
22 $flag = 0;
23 @ids = ();
24 next;
25 }
26 next unless ($flag == 1);
27 if (/^\W(.*?)\s/) {
28 my $i = $1;
29 push (@ids, uc $i);
30 $ids{(uc $i)}=1;
31 next;
32 }
33 my @vals = split('\t');
34 next if ($ids[0] eq $vals[0]);
35 $self->put_dot("PlatformID","$geo") if $geo;
36 my @pass = @ids;
37 my ($id, $acc);
38 foreach (@vals) {
39 my $key = shift @pass;
40 if ($key eq 'ID') { $id = $_;}
41 if ($key eq 'GI') { $acc = $_;}
42 if ($key eq 'GB_ACC') { $acc = $_;}
43 if ($key eq 'GB_LIST') {
44 if ($_ =~ /\w+/) {
45 $acc .= ",$_" if $acc;
46 }
47 }
48 $self->put_dot($key,$_) if $_;
49 }
50 if ($acc =~ /,/) {
51 my @acc = split(',', $acc);
52 foreach (@acc) {
53 $self->put_dot("AccessionID",$_) if $_;
54 }
55 } else {
56 $self->put_dot("AccessionID",$acc) if $acc;
57 }
58 return $self->have_dots;
59 }
60 }
61
62
63 1;
64
65