Hi.
I've been looking for a human genome API for this purpose. I found the NCBI datasets API but there seems to be a problem with this package. I also found an Ensembl API but could only find a way to query it with gene IDs, so I started looking for an API to convert gene symbols to IDs. I found an R package but I'm using python.
Is there an API for retrieving human sequences by querying gene symbols, or is there an API for converting gene symbols to IDs?
I'm also using a Linux system, in case you know relevant Linux tools.
Thanks!
Great. Thanks. How could I have missed it.
Emily_Ensembl In second thought, you mean that there's a way to get gene sequences by querying with gene symbols, or that I need to get the IDs first, and then use them to get the sequences (which is what I'm doing now)? I'm not sure what you meant by "use the lookup/symbol endpoint in the Ensembl REST API with the sequence/id endpoint".
If there's a way to get the sequences in one call it will be better, obviously.
Use the output of lookup/symbol as the input for sequence/id. Exercise 5.1 of this online course does exactly that. You can copy/paste the code from the sample answers in either R or Python3.