Commit f9716da1 authored by Eugene Kulesha's avatar Eugene Kulesha
Browse files

replaced print STDERR with warn ( otherwise website crashes). added stable_id,...

replaced print STDERR with warn ( otherwise website crashes). added stable_id, display_xref and feature_Slice functions
parent 0b5d01c1
......@@ -123,11 +123,11 @@ sub new {
my $meta_container = $self->db->get_MetaContainer();
my @values = $meta_container->list_value_by_key("LRG");
if(defined(@values) and scalar(@values) and $values[0]->[0]){
print "LRG is true and set to ".$values[0]->[0]."\n";
# "LRG is true and set to ".$values[0]->[0]."\n";
$self->{'lrg_region_test'} = $values[0]->[0];
}
else{
print "LRG NOT set\n";
# print "LRG NOT set\n";
}
return $self;
......@@ -1079,7 +1079,7 @@ sub fetch_by_Feature{
my $slice = $feature->slice();
if(!$slice || (!$slice->isa('Bio::EnsEMBL::Slice') && !$slice->isa('Bio::EnsEMBL::LRGSlice') )) {
print "slcie is ---".ref($slice)."\n";
warn "slcie is ---".ref($slice)."\n";
throw('Feature must be attached to a valid slice.');
}
......
......@@ -143,6 +143,7 @@ sub new{
return $self;
}
use vars '$AUTOLOAD';
......@@ -154,7 +155,7 @@ sub AUTOLOAD {
if($method =~ /^get_all_Attribute/){
print STDERR "get_all_Attribbutes called\n";
# print STDERR "get_all_Attribbutes called\n";
return $self->{'_orig_slice'}->$method(@_);
}
elsif($method =~ /^get_all_/ ){
......@@ -167,10 +168,10 @@ sub AUTOLOAD {
$ft->end($temp);
}
if(($ft->start+$ft->slice->start) > $self->{'_chrom_slice'}->end or ($ft->end+$ft->slice->start) < $self->{'_chrom_slice'}->start){
print STDERR "start before orig start???\n";
# print STDERR "start before orig start???\n";
next;
}
print STDERR "FT: ".$ft->dbID."\t(".$ft->start.") ".($ft->start+$ft->slice->start)."\t(".$ft->end.") ".($ft->end+$ft->slice->start)." ".$ft->slice->seq_region_name."\n";
# warn "FT: ".$ft->dbID."\t(".$ft->start.") ".($ft->start+$ft->slice->start)."\t(".$ft->end.") ".($ft->end+$ft->slice->start)." ".$ft->slice->seq_region_name."\n";
my $new_ft = $ft->transfer($self->{'_orig_slice'});
if(defined($new_ft)){
# print "NEW FT: ".$new_ft."\t".($new_ft->start+$new_ft->slice->start)."\t".($new_ft->end+$new_ft->slice->start)."\n";
......@@ -178,16 +179,34 @@ sub AUTOLOAD {
}
else{
# DO i want to give a message here or just ignore them???
print STDERR "problem transfering $ft start =".($ft->start+$ft->slice->start)." end= ".($ft->end+$ft->slice->end)."\n";
# warn "problem transfering $ft start =".($ft->start+$ft->slice->start)." end= ".($ft->end+$ft->slice->end)."\n";
}
}
return \@new_features;
}
# print "CAlling $method on lrg slice\n";
# warn "Calling ($method) from ", join ' * ', caller(0);
return $self->{'_orig_slice'}->$method(@_);
}
sub stable_id {
my $self = shift;
return $self->seq_region_name;
}
sub display_xref {
my $self = shift;
return $self->seq_region_name;
}
sub feature_Slice {
my $self = shift;
return $self->{_chrom_slice};
}
sub DESTROY{
}
......
Markdown is supported
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