[Bioperl-l] MicroarrayIO proposal

Allen Day allenday@ucla.edu
Fri, 11 Oct 2002 18:25:04 -0700 (PDT)


Steve,

> * IO classes typically indicate the format of the file. In this case,
> "affymetrix" is ambiguous since Affy produces more than one file type (e.g.,
> cdf, chp, cel, etc.) If you want, you could organize the modules within a
> subdir such as MicroarrayIO/affymetrix/cdf.pm, but this is probably not
> necessary.

affymetrix.pm is actually building an Affy/Array object based on the CDF 
file, and filling that object with values from the CEL file. I had at one 
point named the classes CDF and CEL, but thought it would make more sense 
to do it this way because future microarray formats will have different 
file extensions.  I was trying to be uniform.

As for the other file types... EXP, DCP, and friends, I haven't had a 
chance to deal with these yet.

> * ProbeI should extend PrimarySeqI (unless you're using containment).
> Inheritance seems right to me though. (This may be an example of where
> you'll have a sequence object without sequence data.) What does
> $probe->value return?

Okay, I'll inherit from there.  Could lighten up the class a bit.  
For Affy data, probe->value returns the quantitated, unnormalized value 
from a spot on CEL file.  Unless you've modified the CEL...

> * ProbeI appears twice, in Bio::Expression and Bio::Expression::Microarray.
> Or maybe, one is a subclass of the other? If so, I'd give it a different
> name, e.g., MicroarrayProbeI.pm. 

Yes, Bio::Expression::Microarray::ProbeI is a further subclass.  
Expression::ProbeI is planned to serve other expression classes in the
future, while Expression::Microarray::ProbeI is microarray specific.

> * Presumably, Affymetrix::Array ISA Bio::Expression::MicroarrayI. I think
> it's a good idea to make this relationship more obvious in the module name,
> e.g., Affymetrix::AffyMicroarray. Similarly for Affymetrix::AffyData and
> Affymetrix::AffyProbe. It may seem redundant, but it helps.

Great, thanks.

-Allen

> 
> Steve
> 
> > -----Original Message-----
> > From: Allen Day [mailto:allenday@ucla.edu] 
> > Sent: Friday, October 11, 2002 5:05 PM
> > To: Bioperl
> > Subject: [Bioperl-l] MicroarrayIO proposal
> > 
> > 
> > Hi all,
> > 
> > I'm getting ready to commit some MicroarrayIO classes to 
> > bioperl-live, but 
> > first I'd like to get some feedback on how I've set them up.  
> > See below:
> > 
> > Hierarchy is like this:
> > 
> > Bio/
> > 	Expression/
> > 		Microarray/
> > 			ProbeI.pm
> > 			Probeset.pm
> > 			Affymetrix/
> > 				Array.pm
> > 				Data.pm
> > 				Probe.pm
> > 		MicroarrayI.pm
> > 		MicroarrayIO.pm
> > 		MicroarrayIO/
> > 			affymetrix.pm
> > 		ProbeI.pm
> > 
> > 
> > 
> > 
> > And usage is like this:
> > 
> > use Bio::Expression::MicroarrayIO;
> > 
> > # create an IO object.  an array object is created
> > # based on -template
> > my $mio = Bio::Expression::MicroarrayIO->new(
> >              -file     => 'path/to/datafile',
> >              -format   => 'affymetrix',
> >              -template => 'path/to/template',
> >           );
> > 
> > # fill the array object created by the constructor
> > # with data from the next array.  returns a
> > # Bio::Expression::MicroarrayI compliant object
> > my $array = $mio->next_array;
> > 
> > # this will write affy-format files, given
> > # a MicroarrayI compliant object
> > my $out = Bio::Expression::MicroarrayIO->new(
> >              -file     => '>path/to/outputfile',
> >              -format   => 'affymetrix',
> >           );
> > 
> > #write $array to file
> > $out->write_array($array);
> > 
> > #print a list of outliers and masked probes
> > foreach my $probeset ($array->each_probeset){
> > 	foreach my $probe ($probeset->each_probe){
> > 		next unless $probe->is_outlier or $probe->is_masked;
> > 		print join "\t", (
> > 			$probeset->id,
> > 			$probe->x,
> > 			$probe->y,
> > 			$probe->value,
> > 			$probe->is_outlier,
> > 			$probe->is_masked,
> > 			"\n";
> > 		)
> > 	}
> > }
> > 
> > 
> > Comments appreciated.  Enjoy the weekend.
> > 
> > -Allen
> > 
> > 
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l@bioperl.org http://bioperl.org/mailman/listinfo/bioperl-l
> > 
>