From 2518cd001fb38fca7398e4c8915e0761865bd8b2 Mon Sep 17 00:00:00 2001
From: Patrick Meidl <pm2@sanger.ac.uk>
Date: Fri, 28 Sep 2007 15:25:10 +0000
Subject: [PATCH] first go at DAS handling

---
 modules/Bio/EnsEMBL/MappedSlice.pm | 38 ++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/modules/Bio/EnsEMBL/MappedSlice.pm b/modules/Bio/EnsEMBL/MappedSlice.pm
index aaf032a97a..4f54832d3a 100644
--- a/modules/Bio/EnsEMBL/MappedSlice.pm
+++ b/modules/Bio/EnsEMBL/MappedSlice.pm
@@ -223,6 +223,43 @@ sub project {
 }
 
 
+sub get_all_DASFeatures_dsn {
+  my $self = shift;
+
+  foreach my $pair (@{ $self->get_all_Slice_Mapper_pairs }) {
+    my ($slice, $mapper) = @$pair;
+
+    # call $method on each native slice composing the MappedSlice
+    my ($featref, $styleref, $segref) =
+      @{ $slice->get_all_DASFeatures_dsn(@_) };
+    
+    use Data::Dumper;
+    warn Data::Dumper::Dumper($featref);
+    warn Data::Dumper::Dumper($styleref);
+    warn Data::Dumper::Dumper($segref);
+
+  }
+
+}
+
+
+sub get_all_DAS_Features {
+  my $self = shift;
+
+  foreach my $pair (@{ $self->get_all_Slice_Mapper_pairs }) {
+    my ($slice, $mapper) = @$pair;
+    
+    print "\nFetching DAS features for ".$slice->name."\n";
+
+    # call $method on each native slice composing the MappedSlice
+    my ($featref, $styleref, $segref) = $slice->get_all_DAS_Features;
+    return ($featref, $styleref, $segref);
+
+  }
+
+}
+
+
 =head2 
 
   Arg[1]      : 
@@ -250,6 +287,7 @@ sub AUTOLOAD {
 
   foreach my $pair (@{ $self->get_all_Slice_Mapper_pairs }) {
     my ($slice, $mapper) = @$pair;
+    #warn $slice->name;
 
     # call $method on each native slice composing the MappedSlice
     my @features = @{ $slice->$method(@_) };
-- 
GitLab