[ensembl-dev] odd results from getting variation features

Andrea Edwards edwardsa at cs.man.ac.uk
Tue Dec 28 15:41:47 GMT 2010


Hi

Please see some code below to get watson snps. I am getting subslices of 
each chromosome and then getting the watson snps (variation features) 
for each slice. The variation features are sorted into order

The first subslice is bases 1 - 10,000 and contains  no variation features

The second subslice is bases 10,001 - 20,000 and contains variants at 
these positions

904
1081
4626

How can this be? I have pasted more output below to show further 
subslices contain variation features not within the subslice range

thanks a lot


===========================================================

my @unsorted_slices = @{ $slice_adaptor->fetch_all('chromosome', undef, 
0, 1) };
my @sorted_slices = sort by_num_then_letter @unsorted_slices;

# Base pair overlap between returned slices
my $overlap = 0;

# Maximum size of returned slices
my $max_size = 10000;


my @sub_slices = @{split_Slices( \@sorted_slices, $max_size, $overlap )  };

my $snp_id = 0;

foreach my $slice (@sub_slices) {
     print "subslice start: ", $slice->start, " end: ", $slice->end, "\n";
     unless ($slice->seq_region_name() =~ /Un/) {
         my @vfs 
=@{$watson_set->get_all_VariationFeatures_by_Slice($slice)};
         my @sorted_vfs = sort { $a->start() <=> $b->start() } @vfs;

             foreach my $vf (@sorted_vfs){
                 print vf->start();
             }
   }


=======================================================
subslice start: 1 end: 10000

subslice start: 10001 end: 20000

904
1081
4626



subslice start: 20001 end: 30000

547
600
620


subslice start: 30001 end: 40000





More information about the Dev mailing list