This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to download an unspliced transcript for a given Ensembl ID using the perl API

This is the code snippet I have so far:

my $gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' );

# Get the 'ensemblID' gene from human
my $gene = $gene_adaptor->fetch_by_gene_stable_id( 'ENSG00000099889');
print "GENE ", $gene->stable_id(), "\n";
print_DBEntries( $gene->get_all_DBEntries() );

foreach my $transcript ( @{ $gene->get_all_Transcripts() } ) {
  print "cDNA: ", $transcript->spliced_seq(), "\n";}

But how do you get the unspliced transcript (i.e. the Exons+Introns without 5' and 3' UTR)?

ensembl unspliced transcript

1 answer

There's no direct method for this. I would get the transcript slice, then the sequence of the slice.

print "unspliced: ", $transcript->slice->seq, "/n";

Log in to answer this question.