Browse files

testing streaming of CEL files, also parsing of MAS 5.0 scaled data

svn path=/bioperl-microarray/trunk/; revision=11847
  • Loading branch information...
1 parent 05f1bac commit bc124d5d97c7dfd2851fead21aaf9452427c7344 allenday committed Sep 17, 2003
Showing with 125 additions and 0 deletions.
  1. +62 −0 t/affy_u133a_stream.t
  2. +63 −0 t/affy_u133a_txt.t
View
62 t/affy_u133a_stream.t
@@ -0,0 +1,62 @@
+use strict;
+use vars qw($OK);
+
+BEGIN {
+ # to handle systems with no installed Test module
+ # we include the t dir (where a copy of Test.pm is located)
+ # as a fallback
+ eval { require Test; };
+ if( $@ ) {
+ use lib 't', '.';
+ }
+
+ eval {
+ require Class::MakeMethods;
+ require Class::MakeMethods::Emulator::MethodMaker;
+ require enum;
+ };
+
+ if( $@ ){
+ $OK = 0;
+ use Test;
+ plan tests => 1;
+ } else {
+ $OK = 1;
+ use Test;
+ plan tests => 9;
+ }
+}
+
+if(!$OK){ skip(1,1); exit }
+
+use Bio::Expression::Microarray::Affymetrix::Array;
+ok 1;
+use Bio::Expression::Microarray::Affymetrix::Data;
+ok 2;
+$Bio::Expression::Microarray::Affymetrix::Array::DEBUG = 1;
+ok 3;
+$Bio::Expression::Microarray::Affymetrix::Data::DEBUG = 1;
+ok 4;
+
+use Bio::Expression::MicroarrayIO;
+ok 5;
+
+open(STREAM, 'cat ./eg/133a.cel ./eg/133a.cel |');
+
+my $affx = Bio::Expression::MicroarrayIO->new(
+# -file => './eg/95av2_combo.cel',
+ -fh => \*STREAM,
+# -template => './eg/95av2.cdf',
+ -template => './eg/133a.cdf',
+ -format => 'affymetrix',
+ );
+ok 6;
+$affx->verbose(1);
+ok 7;
+my $array = $affx->next_array;
+ok 8;
+
+print STDERR "\n\nwoo\n\n";
+
+my $array = $affx->next_array;
+ok 9;
View
63 t/affy_u133a_txt.t
@@ -0,0 +1,63 @@
+use strict;
+use vars qw($OK);
+
+BEGIN {
+ # to handle systems with no installed Test module
+ # we include the t dir (where a copy of Test.pm is located)
+ # as a fallback
+ eval { require Test; };
+ if( $@ ) {
+ use lib 't', '.';
+ }
+
+ eval {
+ require Class::MakeMethods;
+ require Class::MakeMethods::Emulator::MethodMaker;
+ require enum;
+ };
+
+ if( $@ ){
+ $OK = 0;
+ use Test;
+ plan tests => 1;
+ } else {
+ $OK = 1;
+ use Test;
+ plan tests => 18;
+ }
+}
+
+if(!$OK){ skip(1,1); exit }
+
+use Bio::Expression::Microarray::Affymetrix::Array;
+ok 1;
+use Bio::Expression::Microarray::Affymetrix::Data;
+ok 2;
+$Bio::Expression::Microarray::Affymetrix::Array::DEBUG = 1;
+ok 3;
+$Bio::Expression::Microarray::Affymetrix::Data::DEBUG = 1;
+ok 4;
+
+use Bio::Expression::MicroarrayIO;
+ok 5;
+
+my $affx = Bio::Expression::MicroarrayIO->new(
+ -file => './eg/133a.txt',
+ -format => 'mas50txt',
+ -verbose => 0,
+ );
+ok 6;
+my $array = $affx->next_array;
+ok 7;
+
+my $featuregroup = undef;
+my $i = 0;
+foreach my $f ($array->each_featuregroup){
+ ok($f->id);
+ $featuregroup = $f;
+ $i++;
+ last if $i == 10;
+}
+
+ok(!scalar($featuregroup->each_feature));
+

0 comments on commit bc124d5

Please sign in to comment.