[ensembl-dev] question on compara

Kathryn Beal kbeal at ebi.ac.uk
Thu Apr 18 09:39:27 BST 2013


Hi Nathalie,
I've amended your script a little and added a simple method to get the coordinates you wish. This should be fine if you only have a few regions of interest but might not scale lots of regions. Feel free to get back to me if this is becomes a problem.


Cheers
Kathryn

Kathryn Beal, PhD
European Bioinformatics Institute  (EMBL-EBI)
Wellcome Trust Genome Campus, Hinxton
Cambridge CB10 1SD, UK 
Tel. +44 (0)1223 494458
www.ensembl.org

On 17 Apr 2013, at 22:11, Nathalie Conte wrote:

> 
> 
>> 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 ??
>>  
>> 
> 
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20130418/04a34ca0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: species_mapper.pl
Type: text/x-perl-script
Size: 3107 bytes
Desc: not available
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20130418/04a34ca0/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20130418/04a34ca0/attachment-0001.html>


More information about the Dev mailing list