[ensembl-dev] question on compara

Nathalie Conte nconte at ebi.ac.uk
Wed Apr 17 22:11:48 BST 2013



> Hi, 
> 
> I would like your help to select the more appropriate method to answer my question
> From a set of mouse coordinates (chromosome start end), i would like to be able to find the equivalent orthologous coordinates in human and then find genes around (+- 2kb) and related SNPs +other variation information.
> This is the start of my script below, I am parsing a mouse location file: MouseLoctest.txt which contain my mouse coordinates I have selected first the core API and get a slice object then I found a tutorial for getting genomic blocks from this slice- I would like to get the human coordinates (ch start end )from this block and I am not sure which method to use for this? Thanks for any suggestion-
> Nathalie
> 
> my script so far
> #!/usr/bin/perl
> use warnings;
> use strict;
> use Bio::EnsEMBL::Registry;
> use Bio::EnsEMBL::Utils::Sequence qw(reverse_comp);
> 
> my $registry = "Bio::EnsEMBL::Registry";
> $registry->load_registry_from_db(-host => 'ensembldb.ensembl.org', -user => 'anonymous');
> #input file with chromosome coordinates, open and read:
> my $file = "MouseLoctest.txt";
> 
> unless (open(REGIONS, $file)){
>        print "Cannot open file \"$file\"\n\n";
> }
> 
> my @regions = <REGIONS>;
> 
> close REGIONS;
> open(OUT,">test_output.txt");
> 
> # Getting the Slice adaptor:
> my $slice_adaptor = $registry->get_adaptor('Mouse', 'Core', 'Slice');
> 
> 
> #slice obejct containing chr start and end
> foreach my $region(@regions){
>       chomp $region;
> 
>        my @coordinates = split(/\t/, $region);
> 
>        my $seq_region = $coordinates[0];
>        my $seq_region_start = $coordinates[4];
>        my $seq_region_end = $coordinates[5];
> 			};
> my $query_slice =
> $slice_adaptor->fetch_by_region('chromosome',$seq_region,
> $seq_region_start, $seq_region_end);
> throw("No Slice can be created with coordinates
> $seq_region:$seq_region_start-".
>    "$seq_region_end") if (!$query_slice);
> 
> #now go wit this splice to compara and fetch the corresponding human sequence from this slice
> 
> # Getting the GenomicAlignBlock adaptor:
> my $genomic_align_block_adaptor = Bio::EnsEMBL::Registry->get_adaptor(
>    'Multi', 'compara', 'GenomicAlignBlock');
> # Fetching all the GenomicAlignBlock corresponding to this Slice:
> my $genomic_align_blocks =
>    $genomic_align_block_adaptor->fetch_all_by_MethodLinkSpeciesSet_Slice(
>      $human_mouse_blastz_net_mlss,
>      $query_slice);
> 
> I am stuck here and would like the coordinates ??
>  
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20130417/ce8d2fb7/attachment.html>


More information about the Dev mailing list