TMInter OnlineTransmembrane protein interactions

For research workflows

Bring TMInter to your code.

Use the shared prediction cache and CPU inference from Python or HTTP.

OpenAPI schema ↓

Start with Python

Python 3.10 or later. This package calls the online API; it has no machine learning dependencies. Install the versioned wheel hosted here:

python -m pip install \
  https://tminter.online.sunnylab.org/downloads/tminter_client-0.1.0-py3-none-any.whl
from pathlib import Path
from tminter_client import TMInterClient

client = TMInterClient()
sequence = Path("protein.fasta").read_text()
job = client.submit(sequence)
print("Save this job ID:", job["id"])

result = client.wait(job["id"], poll_interval=5, timeout=3600)
print(result["probabilities"])
client.download_tsv(result["id"], "prediction.tsv")

For a single call, use client.predict(sequence). Other methods are info(), get(job_id) and retry(job_id). Job methods return dictionaries; download_tsv() returns text and can also save a file.

A WaitTimeout only stops local polling; the server job continues. Resume with client.wait(job_id). A JobFailed means the server recorded a failed job; inspect it with get() before explicitly retrying. HTTP errors raise APIError; network errors raise NetworkError.

Call the HTTP API

Base URL: https://tminter.online.sunnylab.org. The public API requires no account or API key. Submit one sequence per request.

# Inspect the active method and input limits.
curl https://tminter.online.sunnylab.org/api/v1/info

# Replace this example with your protein sequence.
curl -X POST https://tminter.online.sunnylab.org/api/v1/jobs \
  -H 'Content-Type: application/json' \
  -d '{"sequence":"MALWMRLLPLLALLALWGPDPAAA"}'

# Use the id returned above; repeat until complete or failed.
curl https://tminter.online.sunnylab.org/api/v1/jobs/JOB_ID

# Export a completed result.
curl -o prediction.tsv \
  https://tminter.online.sunnylab.org/api/v1/jobs/JOB_ID/download.tsv
MethodPathResponse
GET/api/v1/infoActive method, threshold and limits.
POST/api/v1/jobsSubmit {"sequence":"…"}. Returns the job.
GET/api/v1/jobs/{id}Job status, sequence and available results.
POST/api/v1/jobs/{id}/retryRequeue a failed job of the active method. No body.
GET/api/v1/jobs/{id}/download.tsvResidue predictions for a completed job.

Inputs, caching and job states

Send a raw protein sequence or one FASTA record in the sequence field. The service removes whitespace, discards the FASTA header and uppercases letters. Accepted letters: ACDEFGHIKLMNPQRSTVWYBXZUO. Gaps, stop symbols and multiple FASTA records are rejected.

Fresh inference supports up to 2,174 residues. Sequences up to 15,000 residues are accepted when their exact sequence is already in the configured TMAtlas cache. The server checks Atlas first, then existing jobs for the active inference version. Repeated normalized sequences reuse the same job within that version, including pending and failed jobs.

queued
Waiting for the CPU runner. New submissions normally return HTTP 202.
running
The runner is processing the sequence. Poll every five seconds or less often.
complete
Contains one probability per residue and result provenance. Atlas cache hits can complete immediately.
failed
Contains an error message. Resubmitting reuses this failed job; use the retry endpoint to run it again.

HTTP 200 can return an existing job in any state. Always inspect status. Save the job ID or https://tminter.online.sunnylab.org/?job=JOB_ID to resume. Closing your browser or timing out a client does not cancel inference.

A shared academic service

CPU inference can be slow. At most 20 queued or running jobs are accepted at once; cached results remain available. Sequences and results are stored in the shared cache and can be retrieved by anyone with the job ID or result URL.

Interpret and export results

probabilities[i] belongs to sequence[i]. A predicted interaction label is 1 when the probability is greater than or equal to the result’s threshold. Use each result’s own model_version, source and inference_scope; cached Atlas predictions preserve their frozen release and may have a different scope from fresh inference.

The scope is exact, windowed or windowed_length_ood. Fresh CPU inference is exact. Preserve this field when comparing predictions, especially for longer cached proteins.

The TSV has one row per residue and columns job_id, model_version, source, inference_scope, threshold, position (1-based), aa, probability and predicted_label. Save the job JSON from GET /api/v1/jobs/{id} for the full provenance object and Atlas accession/release when present.

TMInter / SUMILE-TM is designed for alpha-helical transmembrane proteins. These probabilities are model predictions of interaction propensity; interpret them in the context of the protein and method scope.

Handle errors

API errors use a JSON object: {"error":"Explanation"}.

HTTP statusMeaning
400Invalid JSON, sequence or length. Correct the request.
404Unknown job or endpoint.
405Unsupported method on a job route.
409Result is not complete, or the job cannot be retried in its current state/version.
413Submission exceeds 400,000 characters.
503Queue is full or the method is not configured. Try again later.
500Service error. Keep the job ID and check again later.

If a submission loses its response, submitting the same sequence again reuses its stored job. A failed job remains failed until explicitly retried. There is no batch or cancellation endpoint.