This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Is there a way to bulk download orthologue pairwise alignment data from ensembl?

Hello,

I have a list of genes and ID's for which I hope to download the cDNA pairwise sequence alignment for human and mouse. Currently this is possible manually by searching the gene in ensembl > selecting the human gene > going to orthologues > finding mouse > selecting 'view sequence alignments' > view cDNA Alignment > Download homology > download Fasta.

I am trying to download these alignments in bulk, but I am not really sure how to do this. Using this link, I can get to the alignment:

https://uswest.ensembl.org/Homo_sapiens/Gene/Compara_Ortholog/Alignment?db=core;g=ENSG00000012048;g1=ENSMUSG00000017146;seq=cDNA

However, I am struggling to export it to fasta format because it appears that the download link creates a temporary file which I cannot determine:

https://uswest.ensembl.org/Homo_sapiens/Download/DataExport?align=cDNA;cdb=compara;component=HomologAlignment;compression=uncompressed;data_action=Compara_Ortholog;data_action=Compara_Ortholog;data_type=Gene;db=core;export_action=Homologs;**file=temporary/2021_07_09/session_46141653/MDUAUAaEWJOSUCJPBUAAAddU/Human_BRCA1_ortholog_alignment.fa**;filename=Human_BRCA1_ortholog_alignment.fa;format=FASTA;g=ENSG00000012048;g1=ENSMUSG00000017146;name=Human_BRCA1_ortholog_alignment;r=17:43044295-43170245

Is there any way to bypass this issue? Thanks.

alignment orthologue pairwise ensembl

1 answer

You can get the alignments with the homology endpoints of the Ensembl REST API, either by stable id or gene symbol. For your example you could use:

https://rest.ensembl.org/homology/id/ENSG00000012048?content-type=application/json;target_species=mouse

Awesome! This is exactly what I was looking for. Thanks so much!

Log in to answer this question.