Not sure that you can get from GSE to SRR in one step, but EUtils is definitely the way to go.
You can get from GSE to SRX using EDirect like this (using head
to show the first 5 results):
esearch -db gds -query "GSE44183[ACCN] AND GSM[ETYP]" | efetch -format docsum | \
xtract -pattern ExtRelation -element RelationType,TargetObject | head -5
SRA SRX300901
SRA SRX300900
SRA SRX300899
SRA SRX300898
SRA SRX300897
Then you could write the SRX to a file, parse and use in a new esearch
query:
esearch -db sra -query "SRX300901[ACCN]" | efetch -format docsum | xtract -element Runs
<Run acc="SRR893074" total_spots="22020236" total_bases="3963642480" load_done="true" is_public="true" cluster_name="public" static_data_available="true"/>
That does not quite get you there, since the SRR is contained in an attribute. You may want to use the XML parser of your choice, rather than EDirect xtract
, to process the XML returned by efetch
.
Another approach that I have not yet explored: it may be possible to parse a GEO SOFT or MINiML file, which should be obtainable from the FTP site using the original GSE accession.
You need to clarify this question. First, the title refers to "SRA ids". However, the question then uses "SRS ids", twice. Which is it? I suspect SRA.
Second, you need to define and give an example of the "sample ids" you want to retrieve. For this type of GEO record, one could retrieve GEO sample IDs (starting with GSM), or SRA read IDs (starting with SRR), or even SRX IDs. So please, define clearly what you want to do.
Hi,
I apologize, I got a bit confused with the number of different ids in this case.
I have around 40 GSE ids where I want to download all sequencing data belonging to a GSE id (e.g.GSE44183). To do this, I thought to use fastq-dump which needs SRA ids as input. Hence, I am trying to fetch all SRA IDs belonging to a GSE. Maybe this is not the right approach, but I couldn't think of any other solution to download all the data in an easier way.
Hope this is clear now.
So you want sequencing run accessions, i.e. SRR?
Yes. From GSE ids.