PhaRBP API

Available endpoints with examples and expected behavior.

Unique Identifiers
protein_hex_id A hex-encoded identifier that is unique to a protein record — one protein from one phage genome. Two proteins with identical sequences but from different genomes each have their own protein_hex_id.
sequence_hex_id A hex digest derived purely from the amino-acid sequence. Any two proteins with identical sequences share the same sequence_hex_id, making it the right key for sequence-level data (domains, physicochemical properties, predicted structures).

Core Data

6
GET /api/protein/<protein_hex_id>/structure/

Full structure-drawer payload for a protein: metadata, predicted structures, domain annotations, host/phage info, evidence, and EC entries.

curl "https://pharp.ugent.be/api/protein/4f4f3d.../structure/"
Sequence endpoints — keyed by sequence_hex_id
GET /api/sequence/<sequence_hex_id>/basic/

Raw amino-acid sequence and computed physicochemical properties.

curl "https://pharp.ugent.be/api/sequence/ab12cd.../basic/"
GET /api/sequence/<sequence_hex_id>/domains/

All mapped domain annotations, including coordinates and InterPro fields where available.

curl "https://pharp.ugent.be/api/sequence/ab12cd.../domains/"
GET /api/sequence/<sequence_hex_id>/proteins/

All protein records linked to this sequence (i.e. identical proteins across different genomes).

curl "https://pharp.ugent.be/api/sequence/ab12cd.../proteins/"
GET /api/sequence/<sequence_hex_id>/structure/

Structure-drawer payload keyed by sequence ID, bundling all associated protein records.

curl "https://pharp.ugent.be/api/sequence/ab12cd.../structure/"
Visualization & Context

Niche endpoints that power specific UI views — useful for building custom visualizations but not typically needed for bulk data access.

GET /api/explore/data/

UMAP/explore scatter-plot points with optional filters and coloring parameters. Primarily used by the Explore view.

Key params

n_neighbors   color_category   color_value   filters_json

curl "https://pharp.ugent.be/api/explore/data/?n_neighbors=15&color_category=detection_method&color_value=RBPdetect2"
GET /api/genome-context/<protein_hex_id>/

Neighboring genome features surrounding the queried protein, with the matching feature highlighted. Used to render the genome-context strip.

curl "https://pharp.ugent.be/api/genome-context/4f4f3d.../"

FoldSeek

3
POST /api/foldseek/upload/

Upload a .pdb query structure and start a FoldSeek search. Returns a query_id for polling results.

curl -X POST "https://pharp.ugent.be/api/foldseek/upload/" -F "pdb_file=@query.pdb"
GET /api/foldseek/results/<query_id>/

Hit list for a completed FoldSeek job.

curl "https://pharp.ugent.be/api/foldseek/results/1b2f.../"
GET /api/foldseek/query-structure/<query_id>/

Returns the original uploaded query structure as plain PDB text.

curl "https://pharp.ugent.be/api/foldseek/query-structure/1b2f.../"
GET /api/foldseek/target-structure/<sequence_hex_id>/

Target structure file for a FoldSeek hit, used by alignment viewers.

curl "https://pharp.ugent.be/api/foldseek/target-structure/9f3a.../"

BLASTP

2
POST /api/blastp/upload/

Submit a query via the sequence form field or a fasta_file upload. Returns a query_id.

curl -X POST "https://pharp.ugent.be/api/blastp/upload/" -F "fasta_file=@query.fasta"
GET /api/blastp/results/<query_id>/

Hit list for a submitted BLASTP query.

curl "https://pharp.ugent.be/api/blastp/results/7f5a.../"

Domain Explorer

3
GET /api/domains/architectures/

Server-side DataTables endpoint for browsing domain architectures. Supports standard DataTables paging and search params.

curl "https://pharp.ugent.be/api/domains/architectures/?draw=1&start=0&length=25"
GET /api/domains/network/

Domain co-occurrence network as nodes and links.

Key params

min_count   max_nodes

curl "https://pharp.ugent.be/api/domains/network/?min_count=10&max_nodes=150"
GET /api/domains/protein/?id=<protein_id>

Parsed architecture blocks and domain spans for a given protein identifier.

curl "https://pharp.ugent.be/api/domains/protein/?id=YP_009123456"