Skip to content
Snippets Groups Projects
Commit 6325d8a0 authored by Anne Parker's avatar Anne Parker
Browse files

Added calls to allow web code to fetch an individual marker, so we can show low map weight markers on Location/View
parent 42c8c035
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,28 @@ sub fetch_all_by_Marker {
return $self->generic_fetch($constraint, @_);
}
=head2 fetch_all_by_Slice_and_MarkerName
Arg [1] : Bio::EnsEMBL::Slice $slice
Arg [2] : string marker name
Example : @ms = @{$marker_feature_adaptor->fetch_all_by_Slice_and_MarkerName($slice, $name)};
Description: Retrieves a list of MarkerFeatures for a given marker name
Returntype : listref of Bio::EnsEMBL::Map::MarkerFeatures
Exceptions : none
Caller : general
Status : stable
=cut
sub fetch_all_by_Slice_and_MarkerName {
my ($self, $slice, $name) = @_;
return unless $slice && $name;
my $constraint = 'ms.name = "' . $name . '"';
my $results = $self->fetch_all_by_Slice_constraint($slice, $constraint);
return $results;
}
=head2 fetch_all_by_Slice_and_priority
......
......@@ -2588,6 +2588,33 @@ sub get_all_MarkerFeatures {
}
=head2 get_MarkerFeatures_by_Name
Arg [1] : string marker Name
The name (synonym) of the marker feature(s) to retrieve
Example : my @markers = @{$slice->get_MarkerFeatures_by_Name('z1705')};
Description: Retrieves all markers with this ID
Returntype : reference to a list of Bio::EnsEMBL::MarkerFeatures
Exceptions : none
Caller : contigview, general
Status : Stable
=cut
sub get_MarkerFeatures_by_Name {
my ($self, $name) = @_;
if(!$self->adaptor()) {
warning('Cannot retrieve MarkerFeatures without attached adaptor.');
return [];
}
my $ma = $self->adaptor->db->get_MarkerFeatureAdaptor;
my $feats = $ma->fetch_all_by_Slice_and_MarkerName($self, $name);
return $feats;
}
=head2 get_all_compara_DnaAlignFeatures
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment