[ensembl-dev] Compara: project from Human to Mouse

Benoît Ballester benoit.ballester at inserm.fr
Tue Dec 4 16:24:26 GMT 2012


Thanks Kathryn, 

This seems a lot simpler than what I was doing. 
I knew I was missing something obvious.
Thanks, 

Ben




On 4 Dec 2012, at 15:14, Kathryn Beal wrote:

> Hi Ben,
> I'm not sure if this is quite what you want, but you can restrict the blocks you get from fetch_all_by_MethodLinkSpeciesSet_Slice to just the slice by adding a boolean as the 5th parameter e.g
> 
> my $gabs = $gab_adaptor->fetch_all_by_MethodLinkSpeciesSet_Slice($hsap_mmus_blastz_mlss, $hsap_slice,undef,undef,1);
> 
> Cheers
> Kathryn
> 
> On 4 Dec 2012, at 14:04, Benoît Ballester wrote:
> 
>> I may have found the solution myself. 
>> 
>> I used align_slices to get coordinates of my human slice on the Genomic Align Block /Genomic Align.
>> Then I used those coordinates to restrict the human and mouse genomic_aligns
>> 
>> 
>> Ben
>> 
>> 
>> On 3 Dec 2012, at 19:00, Benoît Ballester wrote:
>> 
>>> Dear Compara, 
>>> 
>>> I have a few slices (~100bp) I'd like to project from human to mouse using the BLASTZ alignment (I am on v65). 
>>> Looking at the example scripts, and digging into my memories, I got to the point where I have the genomic_align objects. 
>>> 
>>> However I'd like to have the Mouse coordinates (the exact projection from human, ~100bp) and not the entire genomic_align. 
>>> I remember that there is another step to get the exact mouse coordinates. 
>>> 
>>> Would you please remind me what this next step is ? 
>>> 
>>> Thanks, 
>>> 
>>> #--8< ----Example script 
>>> 
>>>  my $gabs = $gab_adaptor->fetch_all_by_MethodLinkSpeciesSet_Slice($hsap_mmus_blastz_mlss, $hsap_slice);
>>> 
>>>  foreach my $gab (@$gabs) {
>>> 
>>> 	my $genomic_aligns = $gab->get_all_GenomicAligns();
>>> 
>>> 	foreach my $genomic_align (@$genomic_aligns) {
>>> 	    print
>>> 		$genomic_align->dnafrag->genome_db->name, " ",
>>> 		$genomic_align->dnafrag->coord_system_name, " ",
>>> 		$genomic_align->dnafrag->name, " [",
>>> 		$genomic_align->dnafrag_start, " - ",
>>> 		$genomic_align->dnafrag_end, "] ",
>>> 		$genomic_align->dnafrag_strand, #")\n",
>>> 		$genomic_align->dnafrag_end - $genomic_align->dnafrag_start, "\n",
>>> 		"\n"
>>> 	}
>>> 	print "\n";
>>>  }
>>> 
>>> 
>>> #-- Example output
>>> Line: chr1      5482670 5482784 5482727
>>> homo_sapiens chromosome 1 [5482702 - 5484342] 11640
>>> mus_musculus chromosome 4 [152209531 - 152211053] -11522
>>> 
>>> 
>>> 
>>> Ben 
>>> wxw
>>> 
>>> 
>>> --
>>> Benoît Ballester, PhD
>>> Inserm U1090, TAGC
>>> Marseille - France
>>> +33 4 91 82 87 39
>>> 
>>> 
>>> _______________________________________________
>>> 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/
>> 
>> --
>> Benoît Ballester, PhD
>> Inserm U1090, TAGC
>> Marseille - France
>> +33 4 91 82 87 39
>> 
>> 
>> _______________________________________________
>> 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/
> 
> 
> _______________________________________________
> 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/

--
Benoît Ballester, PhD
Inserm U1090, TAGC
Marseille - France
+33 4 91 82 87 39





More information about the Dev mailing list