Probeset documentation.

#### Bio::Affymetrix::CDF

### Probeset

Summary | Package variables | Synopsis | Description | General documentation | Methods

Summary

    Bio::Affymetrix::CDF::Probeset- an Affymetrix probeset in an CDF file

Package variables | top

No package variables defined.

Included modules | top

Bio::Affymetrix::CDF::Probe
strict
warnings

Synopsis | top

    use Bio::Affymetrix::CDF;

    # Parse the CDF file

    my $cdf=new CDF();

    $cdf->parse_from_file("foo.cdf");

    # Print out all of the probeset names on this chip type

    my $probeset=$chp->probesets()->[0];

    FINISH ME HERE

Description | top

    The Affymetrix microarray system produces files in a variety of
    formats. If this means nothing to you, these modules are probably not
    for you :). After these modules have parsed a CDF file, the resulting
    Bio::Affymetrix::CDF file contains a list of
    Bio::Affmetrix::CDF::Probeset objects. This allows you look at the
    details of the probeset.
    You can only get probe-level information if you have parsed the CDF
    object with probe-level parsing turned on.

Methods | top

CDF | Description | Code
_parse_from_filehandle | No description | Code
is_sense | Description | Code
mutation_type | Description | Code
name | Description | Code
new | Description | Code
original_num_probepairs | Description | Code
original_num_probes | Description | Code
original_number_blocks | No description | Code
probes | Description | Code
unit_name | Description | Code
unit_number | Description | Code
unit_type | No description | Code

## Methods description

CDF | code | top | prev | next

      Arg [1]    : Bio::Affymetrix::CDF object $probelist
      Example    : my $cdf=$ps->probes()
      Description: Get/set CDF object this probeset belongs to.
      Returntype : Bio::Affymetrix::CDF object
      Exceptions : none
      Caller     : general

is_sense | code | top | prev | next

      Arg [1]    : 	boolean $sense (optional)
      Example    : 	if ($ps->is_sense()) { .... }
      Description: 	Returns true when this is a sense (rather than
    anti-sense) probeset
      Returntype : boolean
      Exceptions : none
      Caller     : general

mutation_type | code | top | prev | next

      Arg [0]    : 	integer
      Example    : none
      Description: Get/set mutation_type. If this is a genotyping probe
    set, 0=substitution, 1=insertion, 2=deletion
      Returntype : integer
      Exceptions : none
      Caller     : general

name | code | top | prev | next

      Arg [1]    : string
      Example    : my $name=$ps->name()
      Description: Get/set name of probeset
      Returntype : string
      Exceptions : none
      Caller     : general

new | code | top | prev | next

      Arg [0]    : none
      Example    : my $cdf=new Bio::Affymetrix::CDF::Probeset();
      Description: constructor for Bio::Affymetrix::CDF::Probeset
    object. You probably do not want to make these objects yourself yet, however.
      Returntype : new Bio::Affmetrix::CDF object
      Exceptions : none
      Caller     : general

original_num_probepairs | code | top | prev | next

      Arg [0]    : 	none
      Example    : 	my $probepairs=$ps->original_num_probepairs()
      Description: 	Get the number of probepairs in this probeset
      Returntype : integer
      Exceptions : none
      Caller     : general

original_num_probes | code | top | prev | next

      Arg [0]    : 	none
      Example    : 	my $probepairs=$ps->original_num_probes()
      Description: 	Get the number of probes in this probeset
      Returntype : integer
      Exceptions : none
      Caller     : general

probes | code | top | prev | next

      Arg [1]    : arrayref $probelist
      Example    : my @probes=$ps->probes()
      Description: Get/set list of probes making up this array. Only available if
    with probes mode is used.
      Returntype : reference to array of Bio::Affymetrix::CDF::Probe objects
      Exceptions : none
      Caller     : general

unit_name | code | top | prev | next

      Arg [1]    : 	string $unit_name (optional)
      Example    : 	my $unit_name=$ps->unit_name()
      Description: 	Always NONE for expression arrays
      Returntype : string
      Exceptions : none
      Caller     : general

unit_number | code | top | prev | next

      Arg [0]    : 	none
      Example    : 	my $probepairs=$ps->unit_number()
      Description: 	Get the unit number of this probeset (a unique number
    assigned to each probe in the CDF file but otherwise meaningless)
      Returntype : integer
      Exceptions : none
      Caller     : general

## Methods code

CDF | description | top | prev | next

sub CDF {

        my $self=shift;

        if (my $q=shift) {
    	$self->{"CDF"}=$q;
        }
        return $self->{"CDF"};

}

_parse_from_filehandle | description | top | prev | next

sub _parse_from_filehandle {

        my $self=shift;
        my $fh=shift;

        $self->{"FH"}=$fh;

        ## Handle trivia from unit header
        my $i;

        while (defined($i=<$fh>) && (!($i=~/^\[.*\]$/o))) {
    	if ($i=~/^([^=]+)=(.*)$/o) {
    	    my $name=$1;
    	    my $value=$2;
    	    if (uc $name eq "NAME") {
    		$self->{"UNITNAME"}=$value;
    	    } elsif (uc $name eq "DIRECTION") {
    		$self->{"SENSE"}=($value==1);
    	    } else {
    		$self->{uc $name}=$value;
    	    }
    	}
        }

        ## Block section
        while (defined($i=<$fh>) && (!($i=~/^\[.*\]$/o))) {
    	if ($i=~/^([^=]+)=(.*)$/o) {
    	    my $name=$1;
    	    my $value=$2;
    	    if ($self->{"probemode"}&&$name=~/Cell\d+/o) {
    		my $h= new Bio::Affymetrix::CDF::Probe();
    		my @s=split /\t/,$value;
    		$h->{"NAME"}=$name;
    		$h->{"X"}=$s[0];
    		$h->{"Y"}=$s[1];
    		$h->{"PROBE"}=$s[2];
    		$h->{"EXPOS"}=$s[5];
    		$h->{"POS"}=$s[6];
    		$h->{"PBASE"}=$s[8];
    		$h->{"ATOM"}=$s[9];
    		$h->{"INDEX"}=$s[10];

    		push @{$self->{"PROBES"}},$h;
    	    } elsif (uc $name eq "NAME") {
    		$self->{"NAME"}=$value;
    	    }
    	}
        }

        return $i;

}

is_sense | description | top | prev | next

sub is_sense {

        my $self=shift;

        if (my $q=shift) {
    	$self->{"SENSE"}=$q;
        }
        return $self->{"SENSE"};

}

mutation_type | description | top | prev | next

sub mutation_type {

        my $self=shift;

        if (my $q=shift) {
    	$self->{"MUTATIONTYPE"}=$q;
        }
        return $self->{"MUTATIONTYPE"};

}

name | description | top | prev | next

sub name {

        my $self=shift;

        if (my $q=shift) {
    	$self->{"NAME"}=$q;
        }
        return $self->{"NAME"};

}

new | description | top | prev | next

sub new {

        my $class=shift;
        my $q=shift;
        my $self={};
        $self->{"probemode"}=0;

        bless $self,$class;

        return $self;

}

original_num_probepairs | description | top | prev | next

sub original_num_probepairs {

        my $self=shift;
        return $self->{"NUMATOMS"};

}

original_num_probes | description | top | prev | next

sub original_num_probes {

        my $self=shift;
        return $self->{"NUMCELLS"};

}

original_number_blocks | description | top | prev | next

sub original_number_blocks {

        my $self=shift;
        return $self->{"NUMBERBLOCKS"};

}

probes | description | top | prev | next

sub probes {

        my $self=shift;
        if (!$self->{"probemode"}) {
    	die "Probes is not available when not in probemode";
        }

        if (my $q=shift) {
    	$self->{"PROBES"}=$q;
        }
        return $self->{"PROBES"};

}

unit_name | description | top | prev | next

sub unit_name {

        my $self=shift;

        if (my $q=shift) {
    	$self->{"UNITNAME"}=$q;
        }

        return $self->{"UNITNAME"};

}

unit_number | description | top | prev | next

sub unit_number {

        my $self=shift;
        return $self->{"UNITNUMBER"};

}

unit_type | description | top | prev | next

sub unit_type {

        my $self=shift;

        if (my $q=shift) {
    	if ($q eq "CustomSeq") {
    	    $self->{"UNITTYPE"}=1;
    	} elsif ($q eq "genotyping") {
    	    $self->{"UNITTYPE"}=2;
    	} elsif ($q eq "expression") {
    	    $self->{"UNITTYPE"}=3;
    	} elsif ($q eq "tag/GenFlex") {
    	    $self->{"UNITTYPE"}=7;
    	} else {
    	    die "Not a valid unit type";
    	}
        }

        if ($self->{"UNITTYPE"}==1) {
    	return "CustomSeq";
        } elsif ($self->{"UNITTYPE"}==2) {
    	return "genotyping";
        } elsif ($self->{"UNITTYPE"}==3) {
    	return "expression";
        } elsif ($self->{"UNITTYPE"}==7) {
    	return "tag/GenFlex";
        }

}

## General documentation

COPYRIGHT | top
    This module is free software. You can copy or redistribute it under the same terms as Perl itself.
AUTHORS | top
    Nick James (nick at arabidopsis.info)

    David J Craigon (david at arabidopsis.info)

    Nottingham Arabidopsis Stock Centre, University of Nottingham.