Entering edit mode
10.8 years ago
arnoldemer
•
0
I am unable to get the exon co-ordinates for some of the transcript ids (for example: ENST00000603632, ENST00000604885, ENST00000604930) using perl API program.
part of the code is shown below,
$stable_id='ENST00000603632';
$transcript = $transcript_adaptor->fetch_by_stable_id($stable_id);
But using Ensembl browser, I can browse the same transcript id with all the exon details.
Also, you're more likely to get answers more quickly if you add the name of the tool you're using as a tag. I have a bunch of favourite tags set up and only occasionally skim through the stuff that isn't tagged with my favourite stuff. If you'd have tagged this with "Ensembl" when you posted it, I would have replied yesterday.
Is that because you mis-spelled "stable" in the first line of code? Or is that typo only in this question?
it was the typo error, but it is
$stable_id
onlytry removing the quotes in the first line?
No, it's a string variable in Perl, they are necessary.
I did a little test, looks like you can try adding an argument for the fetch function. It looks like
fetch_by_source_stable_id("ENSEMBLPEP",$stable_id);
I am getting the following error
I think I made a mistake here, it should be
fetch_by_stable_id
instead offetch_by_source_stable_id
, asfetch_by_source_stable_id
is not a method for transcript adaptor.I don't understand what your question is. What exactly is going wrong?
That bit of code looks fine to me. What do you do with
$transcript
next?I am trying to get all the exon features from that
$transcript
for example :
but I am getting the following error :
This is because when I am printing the variable
$transcript
with this id"ENST00000603632"
it was empty but with other id's e.g."ENST00000441232"
the$transcript
variable contains hash value"Bio::EnsEMBL::Transcript=HASH(0x7fdd1b757bf8)"
I've just tried a simple script with that transcript and it seems to work fine:
gives:
Which version of the API are you using? If you're using the latest version (72), it should work fine. If it's an older version you won't get any data, as this transcript is new in version 72.
I am currently using API version 69. I have now updated the Ensembl API version from 69 to 72.
It’s working for all the transcript ids,
Thank you very much for the support.