Commit 1d8b2da9 authored by Ian Longden's avatar Ian Longden
Browse files

Fixes and STDERR prints. storing fro safe keeping (nearly therecvs up)

parent 275378ff
......@@ -332,8 +332,8 @@ sub map {
}
if($fastmap) {
print STDERR "FAST seq region id is $seq_region_id\n";
return $mapper->fastmap($seq_region_id, $frm_start, $frm_end,
print STDERR "FAST seq region id is $seq_region_id using $frm_seq_region_name\n";
return $mapper->fastmap($frm_seq_region_name, $frm_start, $frm_end,
$frm_strand, $frm);
}
......@@ -486,7 +486,7 @@ sub list_seq_regions {
}
#convert them to names
return @{$self->adaptor()->ids_to_seq_region_names($to_cs, \@seq_regs)};
return @{$self->adaptor()->seq_ids_to_regions(\@seq_regs)};
}
......
......@@ -429,6 +429,10 @@ sub transform {
}
my $projection = $self->project( $cs_name, $cs_version );
print STDERR "projection is".$projection."\n";
foreach my $segment (@$projection) {
print STDERR "feature project ".$segment->[2]."\t".$segment->[0]."\n";
}
if( @$projection != 1 ) {
return undef;
} else {
......
......@@ -48,6 +48,7 @@ package Bio::EnsEMBL::Mapper;
use strict;
use integer;
use Bio::EnsEMBL::Utils::Exception qw(throw deprecate warning stack_trace_dump);
use Bio::EnsEMBL::Mapper::Pair;
use Bio::EnsEMBL::Mapper::IndelPair;
use Bio::EnsEMBL::Mapper::Unit;
......@@ -520,6 +521,18 @@ sub add_map_coordinates{
if( ($contig_end - $contig_start) != ($chr_end - $chr_start) ) {
throw("Cannot deal with mis-lengthed mappings so far");
}
my $test = $contig_id;
$test =~ s/\d+//g;
if(length($test) > 0 or $contig_id < 1000){
print STDERR "$contig_id NOT INTEGER\n";
print STDERR stack_trace_dump();
}
$test = $chr_name;
$test =~ s/\d+//g;
if(length($test) > 0 or $chr_name < 1000 ){
print STDERR "$chr_name NOT INTEGER\n";
print STDERR stack_trace_dump();
}
my $from =
Bio::EnsEMBL::Mapper::Unit->new($contig_id, $contig_start, $contig_end);
......
......@@ -734,14 +734,16 @@ sub project {
}
#construct a projection from the mapping results and return it
print STDERR "asm_mapper is a ".ref($asm_mapper)."\n";
print STDERR "#COORD id is ".$coords[0]->id."\n";
my $test = $coords[0]->id;
$test =~ s/\d+//g;
if(length($test) > 0 ){
print STDERR "NOT INTEGER\n";
print STDERR stack_trace_dump();
}
if($coords[0]->isa('Bio::EnsEMBL::Mapper::Coordinate')) {
print STDERR "asm_mapper is a ".ref($asm_mapper)."\n";
print STDERR "#COORD id is ".$coords[0]->id."\n";
my $test = $coords[0]->id;
$test =~ s/\d+//g;
if(length($test) > 0 ){
print STDERR "NOT INTEGER\n";
print STDERR stack_trace_dump();
}
}
foreach my $coord (@coords) {
my $coord_start = $coord->start();
my $coord_end = $coord->end();
......
......@@ -181,11 +181,11 @@ sub map {
my $mapper = $adaptor->fetch_by_CoordSystems($other_cs, $cs);
if($fastmap) {
my @result = $mapper->fastmap($seq_region_id, $frm_start, $frm_end,
my @result = $mapper->fastmap($frm_seq_region_name, $frm_start, $frm_end,
$frm_strand, $frm_cs);
return @result if(@result);
} else {
my @coords = $mapper->map($seq_region_id, $frm_start, $frm_end,
my @coords = $mapper->map($frm_seq_region_name, $frm_start, $frm_end,
$frm_strand, $frm_cs);
if(@coords > 1 || !$coords[0]->isa('Bio::EnsEMBL::Mapper::Gap')) {
......
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