Description
Objective was to replicate the UI's CSV with sequences option using APIs.
Solution
The recommended approach is to first obtain the active material libraries and then use the biological sequence export endpoint to fetch the sequence content as text.
Step 1: Fetch Active Material Libraries
Endpoint:
GET /materials/libraries– Fetch all active material libraries. (Why this is required This endpoint returns the list of active material libraries along with their library EIDs.)Once you have the library EID, you can:
Search for materials within the specific library.
Retrieve the corresponding material EID.
Use that material EID to export the biological sequence (explained in next step)
Step 2: Export the Biological Sequence
You can retrieve biological sequence data (DNA/RNA/Protein) from Signals One using the following API endpoint: Endpoint: GET /materials/{eid}/bioSequence
Supported output formats (query param format):
format=fa for FASTA
format=gb for GenBank
Response type: The API returns the sequence as a sequence file via application/octet-stream (binary stream).
Example:
GET /materials/{eid}/bioSequence?format=fa
GET /materials/{eid}/bioSequence?format=gb

Comments
0 comments
Article is closed for comments.