Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
a3d4c21a
Commit
a3d4c21a
authored
Oct 28, 2009
by
Nathan Johnson
Browse files
removed old Affy classes modules as these are now in efg
parent
2a6eee42
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
942 deletions
+0
-942
modules/Bio/EnsEMBL/AffyArray.pm
modules/Bio/EnsEMBL/AffyArray.pm
+0
-114
modules/Bio/EnsEMBL/AffyFeature.pm
modules/Bio/EnsEMBL/AffyFeature.pm
+0
-138
modules/Bio/EnsEMBL/AffyProbe.pm
modules/Bio/EnsEMBL/AffyProbe.pm
+0
-163
modules/Bio/EnsEMBL/DBSQL/AffyArrayAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/AffyArrayAdaptor.pm
+0
-155
modules/Bio/EnsEMBL/DBSQL/AffyFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/AffyFeatureAdaptor.pm
+0
-163
modules/Bio/EnsEMBL/DBSQL/AffyProbeAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/AffyProbeAdaptor.pm
+0
-209
No files found.
modules/Bio/EnsEMBL/AffyArray.pm
deleted
100644 → 0
View file @
2a6eee42
=head1 LICENSE
Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license.
For license details, please see
http://www.ensembl.org/info/about/code_licence.html
=head1 CONTACT
Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at
<helpdesk@ensembl.org>.
=cut
=head1 NAME
Bio::EnsEMBL::AffyArray - A module to represent an Affymetrix array.
=head1 SYNOPSIS
use Bio::EnsEMBL::AffyArray;
my $array = Bio::EnsEMBL::AffyArray->new(
-NAME => 'Affy-1',
-INCLUDED_IN => $another_array,
-SETSIZE => 16,
);
=head1 DESCRIPTION
An AffyArray object represents an Affymetrix array. The data (currently
the name, probeset size and parent array) are stored in the oligo_array
table.
Each array can have a parent array (another array that contains all the
probes of this array). This is rarely (if ever) used.
=head1 METHODS
=cut
use
strict
;
use
warnings
;
package
Bio::EnsEMBL::
AffyArray
;
use
Bio::EnsEMBL::
OligoArray
;
use
vars
qw(@ISA)
;
@ISA
=
qw(Bio::EnsEMBL::OligoArray)
;
=head2 new
Arg [-NAME]:
string - the name of this array
Arg [-INCLUDED_IN]:
(optional) Bio::EnsEMBL::OligoArray - a possible superset array
Arg [-SETSIZE]:
int - the number of probes in a probe set
Example : my $array = Bio::EnsEMBL::AffyArray->new(
-NAME => 'Affy-1',
-INCLUDED_IN => $another_array,
-SETSIZE => 16,
);
Description: Creates a new Bio::EnsEMBL::AffyArray object.
Returntype : Bio::EnsEMBL::AffyArray
Exceptions : None
Caller : General
Status : Medium Risk
=cut
sub
new
{
my
$caller
=
shift
;
my
$class
=
ref
(
$caller
)
||
$caller
;
my
$self
=
$class
->
SUPER::
new
(
@
_
);
# All AffyArray objects are OligoArray objects of type AFFY
$self
->
type
('
AFFY
');
return
$self
;
}
=head2 get_all_AffyProbes
Args : None
Example : my $probes = $array->get_all_AffyProbes();
Description: Returns all probes on an Affy array. Needs a database
connection.
Returntype : Listref of Bio::EnsEMBL::AffyProbe objects
Exceptions : None
Caller : General
Status : Medium Risk
=cut
sub
get_all_AffyProbes
{
my
$self
=
shift
;
return
$self
->
get_all_Probes
();
}
1
;
modules/Bio/EnsEMBL/AffyFeature.pm
deleted
100644 → 0
View file @
2a6eee42
=head1 LICENSE
Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license.
For license details, please see
http://www.ensembl.org/info/about/code_licence.html
=head1 CONTACT
Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at
<helpdesk@ensembl.org>.
=cut
=head1 NAME
Bio::EnsEMBL::AffyFeature - A module to represent an Affy probe's genomic
mapping.
=head1 SYNOPSIS
use Bio::EnsEMBL::AffyFeature;
my $feature = Bio::EnsEMBL::AffyFeature->new(
-PROBE => $probe,
-MISMATCHCOUNT => 0,
-SLICE => $chr_1_slice,
-START => 1_000_000,
-END => 1_000_024,
-STRAND => -1,
);
=head1 DESCRIPTION
An AffyFeature object represents the genomic placement of an AffyProbe
object. The data are stored in the oligo_feature table.
=head1 METHODS
=cut
use
strict
;
use
warnings
;
package
Bio::EnsEMBL::
AffyFeature
;
use
Bio::EnsEMBL::Utils::
Exception
qw( throw )
;
use
Bio::EnsEMBL::
OligoFeature
;
use
vars
qw(@ISA)
;
@ISA
=
qw(Bio::EnsEMBL::OligoFeature)
;
=head2 new
Arg [-PROBE] : Bio::EnsEMBL::OligoProbe - probe
An OligoFeature must have a probe. This probe must already be stored if
you plan to store the feature.
Arg [-MISMATCHCOUNT]: int
Number of mismatches over the length of the probe.
Arg [-SLICE] : Bio::EnsEMBL::Slice
The slice on which this feature is.
Arg [-START] : int
The start coordinate of this feature relative to the start of the slice
it is sitting on. Coordinates start at 1 and are inclusive.
Arg [-END] : int
The end coordinate of this feature relative to the start of the slice
it is sitting on. Coordinates start at 1 and are inclusive.
Arg [-STRAND] : int
The orientation of this feature. Valid values are 1, -1 and 0.
Arg [-dbID] : (optional) int
Internal database ID.
Arg [-ADAPTOR] : (optional) Bio::EnsEMBL::DBSQL::BaseAdaptor
Database adaptor.
Example : my $feature = Bio::EnsEMBL::OligoFeature->new(
-PROBE => $probe,
-MISMATCHCOUNT => 0,
-SLICE => $chr_1_slice,
-START => 1_000_000,
-END => 1_000_024,
-STRAND => -1,
);
Description: Constructor for OligoFeature objects.
Returntype : Bio::EnsEMBL::OligoFeature
Exceptions : None
Caller : General
Status : Medium Risk
=cut
sub
new
{
my
$caller
=
shift
;
my
$class
=
ref
(
$caller
)
||
$caller
;
my
$self
=
$class
->
SUPER::
new
(
@
_
);
return
$self
;
}
=head2 probe
Arg [1] : Bio::EnsEMBL::AffyProbe - probe
Example : my $probe = $feature->probe();
Description: Getter, setter and lazy loader of probe attribute for
OligoFeature objects. Features are retrieved from the database
without attached probes, so retrieving probe information for a
feature will involve another query.
Returntype : Bio::EnsEMBL::OligoProbe
Exceptions : None
Caller : General
Status : Medium Risk
=cut
sub
probe
{
my
$self
=
shift
;
my
$probe
=
shift
;
if
(
$probe
)
{
if
(
!
ref
$probe
||
!
$probe
->
isa
('
Bio::EnsEMBL::AffyProbe
')
)
{
throw
('
Probe must be a Bio::EnsEMBL::AffyProbe object
');
}
$self
->
{'
probe
'}
=
$probe
;
}
if
(
!
defined
$self
->
{'
probe
'}
&&
$self
->
dbID
()
&&
$self
->
adaptor
()
)
{
$self
->
{'
probe
'}
=
$self
->
adaptor
()
->
db
()
->
get_AffyProbeAdaptor
()
->
fetch_by_AffyFeature
(
$self
);
}
return
$self
->
{'
probe
'};
}
1
;
modules/Bio/EnsEMBL/AffyProbe.pm
deleted
100644 → 0
View file @
2a6eee42
=head1 LICENSE
Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license.
For license details, please see
http://www.ensembl.org/info/about/code_licence.html
=head1 CONTACT
Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at
<helpdesk@ensembl.org>.
=cut
=head1 NAME
Bio::EnsEMBL::AffyProbe - A module to represent an Affymetrix probe.
=head1 SYNOPSIS
use Bio::EnsEMBL::OligoProbe;
my $probe = Bio::EnsEMBL::OligoProbe->new(
-PROBENAME => 'Probe-1',
-ARRAY => $array,
-PROBESET => 'Probeset-1',
);
=head1 DESCRIPTION
An AffyProbe object represents an Affy probe on a microarray. The
data (currently the name, array, length, probeset and description) are
stored in the oligo_probe table. The complete name of a probe is the
concatenation of the array name, the probeset and the probe name.
For Affy arrays, a probe can be part of more than one array, but
only part of one probeset. On each Affy array the probe has a
slightly different name. For example, two different complete names
for the same probe might be DrosGenome1:AFFX-LysX-5_at:535:35; and
Drosophila_2:AFFX-LysX-5_at:460:51;. In the database, these two probes
will have the same oligo_probe_id. Thus the same Affy probe can have a
number of different names and complete names depending on which array
it's on.
=head1 METHODS
=cut
use
strict
;
use
warnings
;
package
Bio::EnsEMBL::
AffyProbe
;
use
Bio::EnsEMBL::Utils::
Exception
qw( warning )
;
use
Bio::EnsEMBL::
OligoProbe
;
use
vars
qw(@ISA)
;
@ISA
=
qw(Bio::EnsEMBL::OligoProbe)
;
=head2 new
Arg [-PROBENAME] : string - probe name
Used when the probe is on one array. Can also use -NAME.
Arg [-PROBENAMES] : Listref of strings - probe names
Used when the probe is on multiple arrays. Can also use -NAMES.
Arg [-ARRAY] : Bio::EnsEMBL::AffyArray
or [-ARRAYNAME] : string - array name
Used when the probe is on one array. Either -ARRAY or -ARRAYNAME can be
used. The latter is a convenience and -ARRAY must be used if the probe
is to be stored.
Arg [-ARRAYS] : Listref of Bio::EnsEMBL::AffyArray objects
or [-ARRAYNAMES] : Listref of strings - array names
Used when the probe is on multiple arrays. Either -ARRAYS or
-ARRAYNAMES can be used. The latter is a convenience and -ARRAYS must
be used if the probes are to be stored.
Arg [-PROBESET] : string - probeset name
Each probe is part of one (and only one) probeset.
Arg [-PROBELENGTH]: int - probe length
Like probesets, will obviously be the same for all probes if same probe
is on multiple arrays.
Arg [-DESCRIPTION]: string - probe description
Like probesets, will be the same for all probes if same probe is on
multiple arrays.
Example : my $probe = Bio::EnsEMBL::AffyProbe->new(
-PROBENAME => 'Probe-1',
-ARRAY => $array,
-PROBESET => 'Probeset-1',
);
Description: Creates a new Bio::EnsEMBL::AffyProbe object.
Returntype : Bio::EnsEMBL::AffyProbe
Exceptions : Throws if not supplied with probe name(s) and array(s)
Caller : General
Status : Medium Risk
=cut
sub
new
{
my
$caller
=
shift
;
my
$class
=
ref
(
$caller
)
||
$caller
;
my
$self
=
$class
->
SUPER::
new
(
@
_
);
# Affy probes are 25mers (unless otherwise specified)
if
(
!
$self
->
probelength
()
)
{
$self
->
probelength
(
25
);
}
return
$self
;
}
=head2 get_all_AffyFeatures
Args : None
Example : my $features = $probe->get_all_AffyFeatures();
Description: Get all features produced by this probe. The probe needs to be
database persistent.
Returntype : Listref of Bio::EnsEMBL:AffyFeature objects
Exceptions : None
Caller : General
Status : Medium Risk
=cut
sub
get_all_AffyFeatures
{
my
$self
=
shift
;
if
(
$self
->
adaptor
()
&&
$self
->
dbID
()
)
{
return
$self
->
adaptor
()
->
db
()
->
get_AffyFeatureAdaptor
()
->
fetch_all_by_AffyProbe
(
$self
);
}
else
{
warning
('
Need database connection to retrieve Features
');
return
[]
;
}
}
=head2 get_all_AffyArrays
Args : None
Example : my $arrays = $probe->get_all_AffyArrays();
Description: Returns all arrays that this probe is part of. Only works if the
probe was retrieved from the database or created using
add_Array_probename (rather than add_arrayname_probename).
Returntype : Listref of Bio::EnsEMBL::AffyArray objects
Exceptions : None
Caller : General
Status : Medium Risk
=cut
sub
get_all_AffyArrays
{
my
$self
=
shift
;
return
$self
->
get_all_Arrays
();
}
1
;
modules/Bio/EnsEMBL/DBSQL/AffyArrayAdaptor.pm
deleted
100644 → 0
View file @
2a6eee42
=head1 LICENSE
Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license.
For license details, please see
http://www.ensembl.org/info/about/code_licence.html
=head1 CONTACT
Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at
<helpdesk@ensembl.org>.
=cut
=head1 NAME
Bio::EnsEMBL::DBSQL::AffyArrayAdaptor - A database adaptor for fetching and
storing AffyArray objects.
=head1 SYNOPSIS
my $aaa = $db->get_AffyArrayAdaptor();
my $array = $aaa->fetch_by_name('Affy-1');
my @arrays = @{ $aaa->fetch_all() };
=head1 DESCRIPTION
The AffyArrayAdaptor is a database adaptor for storing and retrieving
AffyArray objects.
=head1 METHODS
=cut
package
Bio::EnsEMBL::DBSQL::
AffyArrayAdaptor
;
use
strict
;
use
warnings
;
use
Bio::EnsEMBL::
AffyArray
;
use
Bio::EnsEMBL::DBSQL::
OligoArrayAdaptor
;
use
vars
qw(@ISA)
;
@ISA
=
qw(Bio::EnsEMBL::DBSQL::OligoArrayAdaptor)
;
=head2 _default_where_clause
Args : None
Example : None
Description: PROTECTED implementation of superclass abstract method.
Ensures this adaptor only returns Affy arrays.
Returntype : string
Exceptions : None
Caller : Internal
Status : Medium Risk
=cut
sub
_default_where_clause
{
my
$self
=
shift
;
return
"
oa.type='AFFY'
";
}
=head2 _objs_from_sth
Arg [1] : DBI statement handle object
Example : None
Description: PROTECTED implementation of superclass abstract method.
Creates AffyArray objects from an executed DBI statement
handle.
Returntype : Listref of Bio::EnsEMBL::AffyArray objects
Exceptions : None
Caller : Internal
Status : Medium Risk
=cut
sub
_objs_from_sth
{
my
(
$self
,
$sth
)
=
@_
;
my
(
@result
,
$array_id
,
$parent_id
,
$setsize
,
$name
,
$type
);
$sth
->
bind_columns
(
\
$array_id
,
\
$parent_id
,
\
$setsize
,
\
$name
,
\
$type
);
while
(
$sth
->
fetch
()
)
{
my
$array
=
Bio::EnsEMBL::
AffyArray
->
new
(
-
dbID
=>
$array_id
,
-
adaptor
=>
$self
,
-
name
=>
$name
,
-
setsize
=>
$setsize
,
);
push
@result
,
$array
;
if
(
$parent_id
)
{
my
$parent_array
=
Bio::EnsEMBL::
AffyArray
->
new
(
-
dbID
=>
$parent_id
,
-
adaptor
=>
$self
,
);
$array
->
superset
(
$parent_array
);
}
}
return
\
@result
;
}
=head2 list_dbIDs
Args : None
Example : my @array_ids = @{$aaa->list_dbIDs()};
Description: Gets an array of internal IDs for all AffyArray objects
in the current database. NOTE: In a multi-species
database, this method will return the dbIDs of all
AffyArray objects, not just the ones associated with the
current species.
Returntype : List of ints
Exceptions : None
Caller : ?
Status : Medium Risk
=cut
sub
list_dbIDs
{
my
(
$self
)
=
@_
;
#return $self->_list_dbIDs('oligo_array');
# Can't use _list_dbIDs because only want OligoArray objects of type AFFY
my
@out
;
# FIXME: This SQL will not work as expected on multi-species
# databases. It needs to be anchored in a coord_system entry
# coord_system.species_id = $self->species_id(). /ak4@2008-07-15
my
$sql
=
"
SELECT oligo_array_id FROM oligo_array WHERE type='AFFY'
";
my
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
;
while
(
my
(
$id
)
=
$sth
->
fetchrow
()
)
{
push
@out
,
$id
;
}
$sth
->
finish
;
return
\
@out
;
}
1
;
modules/Bio/EnsEMBL/DBSQL/AffyFeatureAdaptor.pm
deleted
100644 → 0
View file @
2a6eee42
=head1 LICENSE
Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license.
For license details, please see
http://www.ensembl.org/info/about/code_licence.html
=head1 CONTACT
Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at
<helpdesk@ensembl.org>.
=cut
=head1 NAME
Bio::EnsEMBL::DBSQL::AffyFeatureAdaptor - A database adaptor for fetching and
storing AffyFeature objects.
=head1 SYNOPSIS
my $afa = $db->get_AffyFeatureAdaptor();
my $features = $afa->fetch_all_by_AffyProbe($probe);
$features =
$afa->fetch_all_by_Slice_arrayname( $slice, 'Affy-1', 'Affy-2' );
=head1 DESCRIPTION
The AffyFeatureAdaptor is a database adaptor for storing and retrieving
AffyFeature objects.
=head1 METHODS
=cut
package
Bio::EnsEMBL::DBSQL::
AffyFeatureAdaptor
;
use
strict
;
use
warnings
;
use
Bio::EnsEMBL::
AffyFeature
;
use
Bio::EnsEMBL::DBSQL::
OligoFeatureAdaptor
;
use
vars
qw(@ISA)
;
@ISA
=
qw(Bio::EnsEMBL::DBSQL::OligoFeatureAdaptor)
;
=head2 fetch_all_by_AffyProbe