This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Ensembl REST to download transcript fastas

Sorry in advance if this is a newbie question, but I always get a little tripped up with the Ensembl Rest API.

I want to download fastqs given a stable id for a gene transcript, like so:

https://uswest.ensembl.org/Mus_musculus/Export/Output/Transcript?db=core;flank3_display=0;flank5_display=0;g=ENSMUSG00000029648;output=fasta;r=5:147498414-147662821;strand=feature;t=ENSMUST00000031652;param=cdna;param=coding;param=peptide;param=utr5;param=utr3;param=exon;param=intron;genomic=unmasked;_format=HTML.

Where it returns separate fasta entries for exons and introns and cdna. Is this possible with a ensembl query?

ensembl

1 answer

Not ideally. You can use the sequence/id endpoint with the masking option to get the cDNA with UTRs in lower case, eg: https://rest.ensembl.org/sequence/id/ENSMUST00000031652?content-type=text/x-fasta;multiple_sequences=1;type=cdna;mask_feature=1

You can also get the genomic sequence of the transcript with the introns in lower case: https://rest.ensembl.org/sequence/id/ENSMUST00000031652?content-type=text/x-fasta;multiple_sequences=1;type=genomic;mask_feature=1

Log in to answer this question.