I want to find the length of a list of genes, of Homo sapiens, that is reported in the GEO database. I have gathered the ensembl id's of those genes.
I understand this information can be parsed from the start and end position given in GTF file available in ensembl.org.
I would like to ask for advice on how to programmatically download the gtf files with ensembl id's.
On the ensembl webpage a couple of options are listed, API and ftp access. I would like to know if sample scripts are available.
Update: I found a script here, it shows how to parse the data from gtf file. Could someone help in understanding how the code can be modified to obtain gene length from start and end position?
Edit 1:
By start and end position, I refer to the start and end values given in the "fields" section here and the file from which I want to parse the values is the second last file available in this link.
For instance, the end - start value of the gene with ensembl id ENSG00000131482,
gene :G6PC
Edit 2: I get the gene names and the expression values from the SOFT files documented in GEO, link
The following is a sample output from SOFT file. It gives me the probe_set(ID_REF) , Gene name and expression values from samples (GSMXXXXXX). Here we see fro G6PC, values are reported from two probe_sets. Can we get the transcript id's from the probe_sets?
Obtaining the transcript id will help me in finding the length of the specific transcript.
> Table(gds)[2449,0:5]
ID_REF IDENTIFIER GSM388749 GSM388750 GSM388753
2449 1555612_s_at G6PC 4.39472 4.52235 4.26869
> Table(gds)[16399,0:5]
ID_REF IDENTIFIER GSM388749 GSM388750 GSM388753
16399 206952_at G6PC 2.76693 3.45107 2.9815