Machine-learning datasets
Every search of the MolNFT records can become a dataset: the hits of a BLAST search, of a structure search or of a molecular search, or a list of records you choose (with labels of your own), each row holding the record's identity, the hit's metrics and the documented features of its sequence and structure. Datasets download as JSON (with every column described), CSV, TSV, or as the inputs of a GL1F model: the feature names as a GL1F model NFT lists its inputs, and every row quantized and packed the way the GL1F runtime on GenesisL1 takes them.
Where to build one:
- Dataset creation (
/bio/datasets, in the Science menu): the page made for it, with four sources. BLAST: paste one or more sequences; every hit becomes a row. Structure search: a record's chain (found by PDB ID, accession or title) or a structure file of your own; every similar chain becomes a row. Metadata search: PDB IDs, accessions, title words, organisms or motifs, with a live count of the records that match. Records you pick: find records by title, PDB ID or accession and add them one by one, or paste a list of identifiers (each adds every record of it, both collections included); for each record choose the sequence and the structure chain to describe, and add columns of your own (a measured activity, a class) to fill in per record and to use as the label. The picks stay in your browser until you remove them. - BLAST page (
/bio/blast): at the top of the results, Build a dataset from these hits (the hits of every query). - Structure search (
/bio/structure, tab Search similar structures): above the hits. - Molecular search (
/bio/search): above the results. - MolNFT card: under each sequence's alignments, Dataset of every hit (CSV, TSV, JSON, GL1F) or More choices (the dataset page with the sequence as its BLAST query); in Molecular analysis, the CSV, JSON and GL1F buttons of the feature vector export the record itself, one row per distinct sequence.
- API:
POST /api/bio/dataset. - MCP: the
bio_datasettool (CSV by default, so an agent can read or save it).
Every hit, not the page shown. A dataset asks its search again for every hit up to the rows chosen (All hits, 2,000 at most, or fewer): a BLAST search shown with 100 targets, a structure search shown with 50 hits, a molecular search read a page at a time all give their dataset all their hits (a structure search returns 500 at most).
The builder offers the feature sets, a label (a column to be the target of a model), the number of rows, the GL1F scale, a Redundancy setting (every row, or one row per cluster of sequences at 90, 70, 50 or 30% identity) and whether to add the sequences, shows a preview of the first rows (up to 25) and builds the download on the server.
What a dataset is for #
A dataset turns a question about molecules into a table that a learning algorithm can read. Each row is one molecule: a MolNFT record and, within it, one sequence and one structure chain. Each column is one documented quantity: who the molecule is (identity and record columns), how it relates to the search that found it (hit metrics), what it is made of and how it is shaped (features), and what you know about it (your values, one of which can be the label a model learns to predict).
Typical uses: relate sequence and structure properties to an activity you
measured, across records you label yourself; learn what makes a chain fold
like a query from its structural neighbours (label hit_tm_query); describe
a family of homologues that BLAST finds; and turn any of these into the
integer inputs of a GL1F model that runs on GenesisL1.
What GL1X does and what it leaves to you:
| GL1X does | You do |
|---|---|
| runs the search again for every hit up to the rows asked for | choose the search, its thresholds and the number of rows |
| folds the identical chains of a record into one row | decide whether near-identical rows from other records belong in your data (non_redundant removes them) |
| resolves each row's sequence and structure chain and computes its features | choose feature sets that every row has, or handle the missing values |
| checks that the label is a numeric hit, value or feature column | supply labels that mean what you think they mean |
| writes every format, each column with its unit and description | split training from test data, train the model and judge it |
How a dataset is built #
POST /api/bio/dataset (internal/bio/dataset.go) works in this order:
- Checks the request. Exactly one source;
max_rows1,000 by default and at most 2,000 (more is refused); the feature sets by name. - Runs the source. The search runs again for every hit up to
max_rows. A BLAST request withoutmax_target_seqs, or with more thanmax_rows, asks formax_rowstargets per query, alignments left out; a structure search without alimit, or with more thanmax_rows, asks formax_rowshits, 500 at most; a molecular search is read 50 results at a time up to itslimit. Each hit or item becomes a row that names a record and, where the source names them, a sequence key and a chain. - Resolves the sequences (see below).
- Removes redundancy, when
non_redundantis set (see Non-redundant datasets). - Resolves the structure chains. A chain without a record sequence takes the residues of its coordinates.
- Chooses the feature sets: those asked for, or those that apply to the rows.
- Computes the features: the sequence set of each row from its sequence, the structure set once for each distinct chain, in parallel and within a budget of 3 billion residue pairs.
- Lays out the columns and the rows, checks the label, and lists the rows
that resolve to nothing under
skipped. - Fills in the record columns (collection, title, PDB ID, accession, molecular ID) from the index and writes the format asked for.
Request #
POST /api/bio/dataset takes a JSON object with exactly one source:
| Field | Meaning |
|---|---|
items | a list of records: {"contract": "0x…", "token_id": "…"}, optionally with sequence_key (one sequence of the record), chain (a structure chain) and values (columns of your own); at most max_rows items |
blast | a BLAST request, as POST /api/bio/blast takes it: one row per hit (several queries: one row per hit of each, with a query_id column); without max_target_seqs, or with more than max_rows, every hit up to max_rows |
structure_search | a structure search request, as POST /api/bio/structure/search takes it (a record's chain, or a structure file of your own): one row per hit chain; without limit, or with more than max_rows, up to max_rows hits (500 at most) |
search | a molecular search {"q": "…", "kind": "…", "collection": "0x…", "limit": 100}: one row per result, every page of it up to limit (100 by default, at most max_rows) |
and how to describe the rows:
| Field | Default | Meaning |
|---|---|---|
sets | those that apply | feature sets: protein, nucleotide, structure (or their full names, or p, n, s). By default, the protein set if a row has a protein sequence, the nucleotide set if a row has a nucleotide sequence, the structure set if a row has an indexed structure chain |
label | none | a numeric column to be the target of a model: a hit metric (hit_tm_query), one of your values (y) or a feature |
include_sequence | false | add each row's sequence as the last column |
max_rows | 1000 | at most 2000 |
non_redundant | 0 (every row) | an identity from 0.3 to 1: one row per cluster of protein sequences at that identity (Non-redundant datasets) |
scale_q | 1000 | the GL1F input scale (GL1F format) |
name | gl1x-<source>-<time> | the dataset's name (letters, digits, ., _, -), used for the file name |
format | json | json, csv, tsv or gl1f (also ?format= in the address) |
A name keeps at most 64 characters; each run of other characters becomes a
-.
Rows and how they are resolved #
Each source item becomes one row about one record and, within it, one sequence and one structure chain:
- The sequence: the one the hit names (BLAST hits and sequence search
results name a
sequence_key); else the record's current sequence of the chain the row names (structure hits name a chain), primary first; else the record's primary sequence (the longest; text and identifier search results, items without a key or chain). - The structure chain: the chain the row names; else the chain of its sequence; else, when the row names neither, the record's first protein chain. The record's structure file must be indexed.
- A structure hit whose record has no sequence for that chain takes the
residues of the chain's coordinates as its sequence
(
sequence_source: coordinates). - A row that resolves to neither a sequence nor a structure chain is left out
and listed under
skippedwith the reason.
Identical chains of a record are one BLAST subject and one structure hit; the
chains column lists them all, the representative first. The row's sequence
key and chain are the representative's, so its structure features describe
the representative's chain: identical chains of one record can differ in
their coordinates, and a dataset describes one of them.
With several BLAST queries, rows are filled query by query, in the order of
the queries and each query's hits in rank order, until max_rows: when the
queries together have more hits, the later ones get fewer rows or none. A
sequence pasted into the molecular search is searched with BLAST for 500
targets, so a search source with a sequence gives at most 500 rows; the
blast source gives up to 2,000.
Columns #
Every dataset has the identity and record columns, then the columns of its source, your values, the features, and the sequence if asked for.
| Column | Kind | Meaning |
|---|---|---|
id | id | contract:token_id:sequence_key (structure search rows: contract:token_id:chain) |
contract, token_id | id | the MolNFT record |
sequence_key | id | the record's key of the sequence (pdb-chain:A, primary, …) |
chain_id | id | the chain of the sequence |
chains | id | identical chains the row stands for, space-separated |
structure_chain | id | the chain the structure features describe (empty without an indexed structure) |
collection, title, pdb_id, accession, molecular_id | record | from the molecular index |
sequence_type | record | protein or nucleotide |
sequence_length | record | letters of the sequence |
sequence_sha256 | record | SHA-256 of the sequence as indexed, the digest a proof checks |
sequence_source | record | record or coordinates |
query_id | query | BLAST with several queries: the query of the hit |
hit_… | hit | the metrics of the source (below) |
| your value names | user | the values of your items, in alphabetical order; numeric when every value is a number |
p_…, n_…, s_… | feature | the features of each set, in the set's order |
sequence | sequence | with include_sequence |
Hit metrics by source:
| Source | Columns |
|---|---|
| BLAST | hit_rank, hit_evalue (best HSP), hit_bit_score (best HSP), hit_total_bit_score, hit_percent_identity (best HSP), hit_query_coverage (qcovs, %), hit_hsps, hit_align_length (best HSP), hit_subject_length |
| Structure search | hit_rank, hit_tm_query (TM-score normalized by the query; 0 when the hit was not rescored), hit_tm_target (by the hit), hit_rmsd (Å), hit_aligned_length, hit_identity (fraction of aligned residues), hit_evalue and hit_bits (GSA and amino-acid local alignment), hit_self (1 for the query's own chain) |
| Molecular search | hit_rank, and for sequence searches hit_evalue, hit_bit_score, hit_identity_percent, hit_query_coverage_percent, hit_target_coverage_percent |
| Items | none (your values instead) |
Values are numbers, text or empty. In JSON an empty value is null; in CSV and
TSV an empty cell. Numbers are written in the shortest form that reads back
exactly (14313.14, 1e-30).
What the hit metrics measure #
The BLAST metrics come from the hit as the BLAST engine reports it (see its section on reading the results):
| Column | Definition |
|---|---|
hit_rank | position in its query's hit list, 1 for the best (BLAST+'s order: E-value, then score) |
hit_evalue | the lowest E-value among the hit's HSPs, unrounded |
hit_bit_score | the highest bit score among its HSPs, two decimals |
hit_total_bit_score | the sum of its HSPs' bit scores, two decimals |
hit_percent_identity | identities over alignment columns (gaps included) of its first HSP, in %, two decimals |
hit_query_coverage | qcovs: the share of the query covered by the union of its HSPs, whole percent, rounded as BLAST+ rounds it |
hit_hsps | number of HSPs |
hit_align_length | columns of its first HSP, gaps included |
hit_subject_length | letters of the hit's sequence (bases when a translated search reads a nucleotide subject) |
The structure metrics come from the structure search:
| Column | Definition |
|---|---|
hit_rank | position in the answer: the query's own chain first, then by TM-score normalized by the query, then E-value |
hit_tm_query, hit_tm_target | TM-score of the superposition normalized by the query chain's length and by the hit chain's length, five decimals; 0 when the hit was not rescored |
hit_rmsd | RMSD of the aligned CA atoms, Å, two decimals |
hit_aligned_length | residues aligned in the superposition |
hit_identity | identical residues over aligned residues, four decimals |
hit_evalue, hit_bits | E-value and bit score of the local alignment of GSA states and amino acids, the search's alignment stage |
hit_self | 1 for the query's own chain, else 0 |
RMSD, aligned length and identity are empty for a hit that was not rescored.
The search rescores at least the 200 best alignments and as many as its limit
asks for, so the rows of a dataset normally all carry TM-scores; a 0 in
hit_tm_query marks a hit that could not be rescored, not a dissimilar one.
The molecular search metrics describe the best HSP of a sequence search:
hit_identity_percent its identities over its columns, and
hit_query_coverage_percent and hit_target_coverage_percent its span on the
query and on the hit over their lengths, all in % with two decimals. Unlike
hit_query_coverage of the BLAST source, which joins every HSP, these count
one HSP.
Feature columns #
| Set | Prefix | Features | What they describe |
|---|---|---|---|
gl1x-protein-1 | p_ | 46 | length and average mass; isoelectric point, net charge and charge density; extinction coefficients and absorbance at 280 nm; instability and aliphatic indices; GRAVY and aromaticity; nine residue classes; cysteines; entropy, low-complexity and ambiguous fractions; the fractions of the 20 amino acids |
gl1x-nucleotide-1 | n_ | 30 | length and mass; an RNA flag; base fractions; GC content and skews; CpG observed/expected; melting temperature; entropy; the 16 dinucleotide frequencies |
gl1x-structure-1 | s_ | 43 | size and shape (radius of gyration and its ratio to a compact chain's, asphericity, largest dimension, end-to-end distance); secondary structure fractions and segments; CA contacts and contact order; chain breaks; B-factors or pLDDT; the entropy and 20 state fractions of GSA |
Every feature is a finite number with a fixed place in its set; the features reference gives each one's formula, unit and source, and the JSON format repeats the unit and meaning of every column. A set applies only where it can: the protein set to rows whose sequence is a protein, the nucleotide set to nucleotide sequences, the structure set to rows with an indexed protein chain of at least 5 residues with coordinates (within the work budget). Elsewhere its cells are empty.
Your values and the label #
Values come with items. A name is a lower-case letter followed by up to 39
lower-case letters, digits or _, and may not be an identity column nor start
with hit_, p_, n_ or s_. A value is a number, a text of up to 200
characters, true or false (written as 1 and 0) or null (left empty);
the items of one dataset may use up to 32 names in all. A value column is
numeric only when every value given for it is a number.
The label must be a numeric column of the dataset, and a hit, value or feature
column; a record column such as sequence_length cannot be one (p_length
can). JSON, CSV and TSV keep the rows whose label is empty; the GL1F format
leaves them out, and gives a feature column that is the label as y only,
not among the inputs.
Non-redundant datasets #
A search returns database entries, not distinct proteins, and many entries
hold the same or nearly the same sequence: the PDB holds many structures of
one protein, and MolNFT holds PDB entries in more than one collection. A model
trained on such rows sees the same example many times, and a test set that
shares sequences with its training set measures memory rather than
prediction. non_redundant (and the builder's Redundancy setting) keeps
one row per cluster of similar sequences.
The clustering is CD-HIT's greedy incremental method (Li and Godzik 2006), as the clustering tool runs it:
- The rows' protein sequences are taken longest first.
- Each joins the first representative it is at least the threshold identical to, identity being the identical residues of a global alignment over the length of the shorter sequence; a sequence that joins none becomes a representative.
- A short-word filter skips the alignments that cannot reach the threshold: words of 5 residues at 70% identity and above, 4 at 60%, 3 at 50% and 2 below; with L the length of the sequence, a representative that shares fewer than (L − k + 1) − (1 − t)·L·k words of k residues with it, at threshold t, is not aligned.
- The representatives' rows are kept, in the order the source gave them, with their own hit metrics, so ranks jump where rows were left out.
A representative is a sequence that did not reach the threshold against any
earlier representative, so the clustered rows that are kept are pairwise below
it as identity is measured here, and a random split of them puts no such pair
at or above the threshold on opposite sides. Rows of nucleotide sequences and
rows without a sequence are kept as they are, and so are protein sequences
longer than 5,000 residues, which the notes count. The dataset's notes
also give how many rows were kept and left out. Clustering shares the server's
slots for heavy analyses and gives up after two minutes (the request then
fails with cluster_timeout); below about 80% identity the word filter skips
few alignments and every sequence is aligned with every representative, so low
thresholds take longest.
A worked example. The 500 BLAST hits of human α-lactalbumin (blastp with the defaults, 16 October 2026; the search is described in the BLAST worked example) at 90% identity:
{"notes": ["non-redundant at 90% identity: 30 rows kept, 470 left out"]}
Of the 30 rows kept, 26 are AlphaFold models (MolNFT v1 / AlphaFold) and 4
experimental structures (PDB 1HML, 1IOR, 2EQL and 1I56), and the kept rows
carry ranks 1, 17, 18, 20, 49 and so on. Most representatives are models
because the representative of a cluster is its longest sequence: most of the
models among the hits have 140 residues or more, most of the experimental
chains 123 to 130. When the experimental entries matter, filter the rows by
collection or title before training, or choose the representatives
yourself. A blastp search of hen egg-white lysozyme shows the other extreme:
its 500 hits are the same 129 residues in 500 records, which any threshold
reduces to one row.
Formats #
JSON #
{
"dataset": {"name": "gl1x-blast-blastp", "source": "blast", "created_at": "2026-10-13T09:00:00.000Z", "rows": 25,
"columns": 114, "feature_sets": ["gl1x-protein-1", "gl1x-structure-1"], "label": "hit_bit_score",
"query": {"program": "blastp", "task": "blastp", "queries": ["q1"], "evalue": 10}},
"columns": [{"name": "id", "kind": "id", "description": "Row identifier: …", "numeric": false},
{"name": "p_gravy", "kind": "feature", "set": "gl1x-protein-1", "description": "Grand average of hydropathy (Kyte–Doolittle)", "numeric": true}],
"rows": [["0x…:12:pdb-chain:A", "0x…", "12", "pdb-chain:A", "A", "A B", "A", "MolNFT v2", "…", "1AKI", null, null, "protein", 129, "eaf1…", "record", 1, 1.2e-90, 263.5, …]],
"skipped": [{"id": "0x…:7", "reason": "no indexed sequence or structure chain"}],
"notes": [],
"feature_sets": [{"name": "gl1x-protein-1", "prefix": "p_", "features": [{"name": "length", "unit": "residues", …}]}],
"gl1f": {"quantization": "q = clamp(round(x · scale_q)) …", "default_scale_q": 1000}
}
Rows are arrays in the order of columns, which describe every column (kind,
feature set, unit, meaning, numeric or not). The count follows from the
sources and sets: 16 identity and record columns, 9 BLAST hit columns, then 46
protein and 43 structure features make the 114 of this example; a BLAST
dataset with the protein set alone has 71 columns, and several queries add
query_id. notes say what the server did beyond the request (clustering,
structure features left out for the work budget), and feature_sets repeats
each set's features with their units and references.
CSV and TSV #
A header row of column names, then one line per row. CSV follows RFC 4180
(quotes around text with commas, quotes or line breaks); TSV puts a tab
between cells and turns tabs and line breaks inside text into spaces. The
response names the file (Content-Disposition) and counts the rows
(X-GL1X-Dataset-Rows).
GL1F format #
format=gl1f writes the dataset as the inputs of a GL1F model:
{
"format": "gl1x-dataset-gl1f/1",
"name": "gl1x-structure-search",
"feature_sets": ["gl1x-protein-1", "gl1x-structure-1"],
"feature_names": ["p_length", "p_molecular_weight", "…", "s_gsa_t"],
"features_text": "p_length\np_molecular_weight\n…\ns_gsa_t",
"inputs": 89,
"scale_q": 1000,
"label": "hit_tm_query",
"clamped": 0,
"rows": [{"id": "0x…:1:A", "x": [129, 14313.14, …], "q": [129000, 14313140, …], "packed": "0xe8f70100…", "y": 1}],
"left_out": [{"id": "0x…:4:pdb-chain:B", "reason": "a feature has no value"}],
"columns": […]
}
feature_namesare the dataset's feature columns in order;features_textis the same list one name per line, the form in which a GL1F model NFT stores its inputs, so a model trained on these columns names its inputs the same way.xare the values,qthe integersclamp(round(x · scale_q))(the GL1F Forest input rule, JavaScript'sMath.round),packedthe bytes the runtime's predict functions take: one little-endian int32 per input.yis the label's value (rows without one are left out).- Rows lacking any feature value (a row of the other sequence type, a row
without a structure chain when the structure set is asked for) are left
out and listed in
left_out. Ask for the sets every row has. clampedcounts values beyond the int32 range at this scale. With the default scale of 1000, values up to about 2.1 million survive; a protein of more than 2,100 kDa or an extinction coefficient above 2.1 million would be clamped.
Only feature columns become inputs: hit metrics, your values and the record
columns never do. The answer also gives source, created_at and the
quantization rule.
A worked example of the quantization, with the first four protein features of the 1HML row of the non-redundant example above (scale 1000):
| Feature | x | x · 1000 | q | Bytes |
|---|---|---|---|---|
p_length | 142 | 142000 | 142000 | b02a0200 |
p_molecular_weight | 16224.9 | 16224900 | 16224900 | 8492f700 |
p_isoelectric_point | 4.8263 | 4826.3 | 4826 | da120000 |
p_net_charge_ph7 | −6.3846 | −6384.6 | −6385 | 0fe7ffff |
The row's packed value begins 0xb02a02008492f700da1200000fe7ffff.
JavaScript's Math.round takes halves toward +∞, so −1234.5 becomes −1234 and
2000.5 becomes 2001. The scale sets the resolution: at 1000, fractions such as
the amino-acid composition keep three decimals (p_aa_W 0.028169 becomes 28),
and two values that differ by less than 0.0005 may become the same integer.
Examples #
A dataset of BLAST hits, CSV:
curl -s 'https://YOUR-DOMAIN/api/bio/dataset?format=csv' -H 'Content-Type: application/json' -d '{
"blast": {"query": ">lysozyme\nKVFGRCELAAAMKRHGLDNYRGYSLGNWVCAAKFESNFNTQATNRNTDGSTDYGILQINSRWWCNDGRTPGSRNLCNIPCSALLSSDITASVNCAKKIVSDGNGMNAWVAWRNRCKGTDVQAWIRGCRL",
"program": "blastp", "evalue": 0.001, "max_target_seqs": 200},
"sets": ["protein", "structure"], "label": "hit_percent_identity"}' -o lysozyme-homologs.csv
The structural neighbours of a record's chain, as GL1F inputs labelled by TM-score:
curl -s 'https://YOUR-DOMAIN/api/bio/dataset?format=gl1f' -H 'Content-Type: application/json' -d '{
"structure_search": {"query": {"contract": "0xd58b01f6c18086e5202cdc5d7ad3e41790360102", "token_id": "6", "chain": "A"}, "limit": 500},
"sets": ["protein", "structure"], "label": "hit_tm_query", "scale_q": 1000}' -o neighbours.gl1f.json
Records with labels of your own:
curl -s 'https://YOUR-DOMAIN/api/bio/dataset?format=tsv' -H 'Content-Type: application/json' -d '{
"items": [
{"contract": "0xd58b01f6c18086e5202cdc5d7ad3e41790360102", "token_id": "1", "values": {"thermostable": 1, "source_organism": "Gallus gallus"}},
{"contract": "0xd58b01f6c18086e5202cdc5d7ad3e41790360102", "token_id": "2", "chain": "B", "values": {"thermostable": 0}}
],
"label": "thermostable"}'
Every record of a molecular search (a PDB title search):
curl -s 'https://YOUR-DOMAIN/api/bio/dataset?format=json' -H 'Content-Type: application/json' \
-d '{"search": {"q": "lysozyme", "limit": 300}, "include_sequence": true}'
The homologues of α-lactalbumin, one row per cluster at 90% identity:
curl -s 'https://YOUR-DOMAIN/api/bio/dataset?format=csv' -H 'Content-Type: application/json' -d '{
"blast": {"query": ">alpha_lactalbumin\nKQFTKCELSQLLKDIDGYGGIALPELICTMFHTSGYDTQAIVENNESTEYGLFQISNKLWCKSSQVPQSRNICDISCDKFLDDDITDDIMCAKKILDIKGIDYWLAHKALCTEKLEQWLCEKL",
"program": "blastp", "max_target_seqs": 500},
"sets": ["protein"], "max_rows": 500, "non_redundant": 0.9}' -o alpha-lactalbumin-nr90.csv
Through MCP, an agent asks:
{"name": "bio_dataset", "arguments": {"source": "structure_search", "contract": "0xd58b…0102", "token_id": "6",
"sets": ["protein", "structure"], "label": "hit_tm_query", "format": "csv", "max_rows": 200}}
The MCP tool asks for 100 rows unless told otherwise and takes non_redundant
too.
A worked example: from structural neighbours to an on-chain model #
- Search. Run a structure search from a record's chain, or a BLAST search
from its sequence, and open Build a dataset from these hits. Choose the
protein and structure sets and, as the label, the TM-score normalized by
the query (
hit_tm_query): the model will learn what makes a chain fold like the query. - Check the data. The preview shows the first rows and how many were left
out; the JSON describes every column. Identical chains are already one row;
the query's own chain is row 1 (
hit_self= 1): drop it before training. Hits are ranked, so a model trained on the first rows sees only close neighbours: take enough rows, and if you mix searches, remove duplicate records (contract+token_id) and keep related records (samepdb_id, sameaccession) on one side of your train/test split. A row whosehit_tm_queryis 0 was not rescored: leave it out, since 0 is not a measured TM-score. - Train. Train a decision-tree ensemble on the feature columns (the
feature_namesof the GL1F export) with the tools you use to make GL1F models (training happens off chain). A GL1F model takes integer inputs: train on thexvalues and quantize with the samescale_qthe model will declare, or train onqdirectly. - Publish. Mint the model as a GL1F NFT with the dataset's
features_textas its feature list. - Use it on any record. A record's feature vector (the card's Copy
packed inputs, or
molecule_features) gives the same columns in the same order;gl1f_predict(MCP) or the model's page runs it on GenesisL1, and GL1X replays the model's integer arithmetic from its on-chain bytes to show the result is the chain's.
Limits and costs #
- 2,000 rows per dataset (1,000 by default through the API; the pages ask for every hit, up to 2,000); a structure search finds 500 hits at most.
- A pasted list of identifiers is resolved in one request,
POST /api/bio/records/resolvewith{"ids": [...]}(up to 500 PDB IDs, UniProt accessions, molecular IDs orcontract:tokenreferences): every record of each identifier, and the identifiers that match none. - Structure features look at every pair of CA atoms of a chain (contacts and
largest dimension); one dataset may look at 3 billion pairs, enough for 2,000
chains of 1,700 residues. Beyond that, later chains get no structure
features and the dataset says so in
notes. - A request body may be 4 MB (an
itemslist with labels); 32 distinct value names, each[a-z][a-z0-9_]up to 40 characters and not an identity column nor starting withhit_,p_,n_ors_; text values up to 200 characters. - Clustering (
non_redundant) runs in one of the server's slots for heavy analyses and stops after two minutes; protein sequences longer than 5,000 residues are kept without clustering. - Each address may build 3 datasets at once, then one every 5 seconds. BLAST and structure searches answer identical requests from memory, so a dataset built right after a search costs little more than the search.
Good practice #
GL1X builds the table; whether a model learnt from it predicts anything depends on how the rows are chosen, split and labelled. The points below say what the server provides for each and what remains yours to do.
- Redundancy. MolNFT holds the same entry in several collections (a
MolNFT v1 and a v2 record of one PDB entry) and many related entries.
Before training, cluster by
pdb_id,accessionorsequence_sha256and split by cluster, or your test score will measure memory. - Normalization. TM-scores normalized by the query and by the target
answer different questions; RMSD depends on the aligned length; E-values
depend on the database size at the time of the search (record the
queryblock of the JSON with your data). - Provenance. Every row names the record and the SHA-256 of its sequence:
GET /api/bio/records/{contract}/{token_id}/proof?key=…re-derives that sequence from the chain at a block and from CID-verified IPFS content, so a dataset can be audited row by row.
Splitting by similarity #
A random split of rows puts close homologues on both sides, and a model can score well on the test set by recognizing sequences it has nearly seen. Split by groups instead, so that no group crosses the split:
- Same record or same entry.
contract+token_ididentify a record;pdb_idgroups the records of one PDB entry across collections, andsequence_sha256the rows with exactly the same sequence. An accession groups the entries of one protein, but not every record carries one: in the BLAST worked example, the MolNFT v2 records of PDB entries had none while their v1 twins did (1A4V's v2 record has none, its v1 record P00709). - Similar sequences.
non_redundantat a threshold t keeps one row per cluster, and the protein rows it keeps are pairwise below t; a random split of them is then a split by similarity. To keep every row and split by cluster instead, ask for the sequences (include_sequence), cluster them withPOST /api/bio/cluster(up to 5,000 protein sequences of up to 5,000 residues, as FASTA with short names such as row numbers, since names are cut at 64 characters; athresholdfrom 0.3 to 1), and put each cluster wholly on one side. A lower threshold makes larger clusters and so a stricter separation. - Structural neighbours. Rows of a structure search can share a fold without sharing much sequence, so a split by sequence clusters can still put chains of one fold on both sides; whether that matters depends on the question the model answers. GL1X does not cluster by structure for a dataset.
The query and its copies #
The rows of a search include the query itself (a structure search puts its
own chain first, with hit_self = 1) and its copies in other records: a
BLAST hit with 100% identity and full query coverage contains the query's
sequence. Leave them out of an evaluation, or the model is tested on its
question.
Labels and hit metrics #
Hit metrics describe a row's relation to one query: they are labels for
questions about that query (how similar is this chain to it?), not
properties of the molecule. They never become inputs of the GL1F export,
which takes the feature columns only; in CSV or TSV, a model that used them as
inputs would apply only to hits of the same query. If the label is a feature
column, the GL1F export gives it as y only and leaves it out of the inputs,
so a model is never given its own target (before 3.3.0 it was listed among
the inputs as well); CSV and TSV keep it as a column like any other, so drop
it from the inputs yourself when you train from those. Your own values carry whatever units and
meaning you gave them; a value column with any text in it is not numeric and
cannot be the label.
Missing values, units and quantization #
Ask for the sets that every row has, or expect empty cells: the GL1F export
leaves out every row with an empty feature, and CSV and TSV pass the empty
cells on to your tools. Features differ in scale by orders of magnitude (a
mass in Da, a fraction from 0 to 1); decision trees do not mind, but the GL1F
quantization does: at scale_q 1000 large values may be clamped and small
differences rounded away, so check clamped and choose the scale the model
will declare. Units are in the JSON columns and the
features reference.
Provenance and reproducibility #
The database grows as records are minted, so the same search later can return
other hits, ranks and E-values. Keep the file you trained on, with the JSON's
dataset block (created_at, the query that made it). For a structure
search the query block also records the size of the database searched; for a
BLAST search, GET /api/bio/blast/db gives it at the time. Each row's
sequence_sha256 lets anyone check its sequence against the chain later.
References #
- Li W, Godzik A (2006) Cd-hit: a fast program for clustering and comparing large sets of protein or nucleotide sequences. Bioinformatics 22:1658–1659.