A minimal wrapper to make ffq searches available via a REST API.
ffq
receives an accession and returns the metadata for that accession as well as the metadata for all downstream accessions following the connections between GEO, SRA, EMBL-EBI, DDBJ, and Biosample.If you use ffq in a publication, please the cite*:
Gálvez-Merchán, Á., et al. (2022). Metadata retrieval from sequence databases with ffq. bioRxiv 2022.05.18.492548.
The manuscript is available here: https://doi.org/10.1101/2022.05.18.492548.
For more information about ffq
, please visit the GitHub repository: https://github.com/pachterlab/ffq.
The query service aims to mimic the functionality of the ffq
command line tool. It returns the same JSON, with the exception of an additional meta
field.
The public instance of ffq-api is accessible at: https://ffq.seqera.io
Extensive API documentation and an interactive testing interface is available at https://ffq.seqera.io/docs
Usage is via the /v1alpha1/
endpoint and takes one or more accessions (comma separated) as the final part of the path.
The response is pure JSON, meaning it plays well with tools such as jq
. For example:
curl https://ffq.seqera.io/v1alpha1/SRR9990627 | jq
There are some additional GET
parameters available to customise results, which mimic the command-line interface flags. For more information about these, please see the API documentation and the ffq
documentation.
⚠️ Note thatffq
interacts with a lot of databases via secondary API calls. This wrapper is synchronous, meaning that responses may take a long time.
If you wish, you may run your own instance of ffq-api.
First, clone the repo and install the package and its dependencies:
pip install .
The server runs with FastAPI. There are different ways to deploy, but the simplest when running locally is to use uvicorn with the bundled script:
./launch.sh
The log should tell you the URL, but it's typically http://127.0.0.1:8000
You can find the interactive API documentation at the URL /docs
.
The ffq
is deloped and maintained by Pachter lab.
If you use this API, please cite ffq
which powers the results:
@article{galvez2022metadata,
title={Metadata retrieval from sequence databases with ffq},
author={G{\'a}lvez-Merch{\'a}n, {\'A}ngel and Min, Kyung Hoi Joseph and Pachter, Lior and Booeshaghi, A. Sina},
year={2022}
}