Command Palette

Search for a command to run...

API reference

API Reference

ProteinIQ provides a comprehensive REST API for programmatic access to our bioinformatics tools and services. This documentation covers all available endpoints, authentication methods, and usage examples.

Base URL

All API requests should be made to:

https://api.proteiniq.com/v1

Authentication

ProteinIQ uses API keys for authentication. Include your API key in the request header:

Authorization: Bearer YOUR_API_KEY

Getting an API Key

  1. Sign up for a ProteinIQ account
  2. Navigate to your dashboard
  3. Go to API Settings
  4. Generate a new API key

Rate Limits

  • Free tier: 100 requests per hour
  • Pro tier: 1,000 requests per hour
  • Enterprise: Custom limits

Rate limit headers are included in all responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200

Endpoints

Protein Analysis

Calculate Molecular Weight

Calculate the molecular weight of a protein sequence.

POST /protein/molecular-weight

Request Body:

{
  "sequence": "MKLLILTCLVAVALARPKHPIKHQGLPQEVLNENLLRFFVAPFPEVFGKEKVNEL",
  "format": "fasta"
}

Response:

{
  "molecular_weight": 5734.6,
  "amino_acid_count": 52,
  "formula": "C254H404N72O75S2",
  "composition": {
    "A": 4,
    "C": 2,
    "D": 1,
    "E": 4,
    "F": 2,
    "G": 3,
    "H": 1,
    "I": 2,
    "K": 4,
    "L": 9,
    "M": 2,
    "N": 4,
    "P": 3,
    "Q": 2,
    "R": 2,
    "S": 1,
    "T": 1,
    "V": 5,
    "W": 0,
    "Y": 0
  }
}

Calculate Isoelectric Point

Determine the isoelectric point of a protein.

POST /protein/isoelectric-point

Request Body:

{
  "sequence": "MKLLILTCLVAVALARPKHPIKHQGLPQEVLNENLLRFFVAPFPEVFGKEKVNEL"
}

Response:

{
  "isoelectric_point": 9.87,
  "net_charge_at_ph7": 3.2,
  "charge_distribution": {
    "positive": 6,
    "negative": 5,
    "neutral": 41
  }
}

Protein Stability Analysis

Analyze protein stability using multiple indices.

POST /protein/stability

Request Body:

{
  "sequence": "MKLLILTCLVAVALARPKHPIKHQGLPQEVLNENLLRFFVAPFPEVFGKEKVNEL"
}

Response:

{
  "instability_index": 28.45,
  "stability_classification": "stable",
  "aliphatic_index": 82.31,
  "gravy_score": -0.23,
  "estimated_half_life": {
    "mammalian": ">20 hours",
    "yeast": ">3 minutes",
    "ecoli": ">10 hours"
  }
}

Sequence Conversion

FASTQ to FASTA

Convert FASTQ format to FASTA.

POST /convert/fastq-to-fasta

Request Body:

{
  "fastq_data": "@seq1\nACGTACGT\n+\n!!!!!!!\n@seq2\nTGCATGCA\n+\n########",
  "quality_threshold": 20
}

Response:

{
  "fasta_data": ">seq1\nACGTACGT\n>seq2\nTGCATGCA",
  "sequences_converted": 2,
  "sequences_filtered": 0
}

PDB to FASTA

Extract protein sequences from PDB files.

POST /convert/pdb-to-fasta

Request Body:

{
  "pdb_id": "1ABC",
  "chain": "A"
}

Response:

{
  "fasta_data": ">1ABC_A\nMKLLILTCLVAVALARPKHPIKHQGLPQEVLNENLLRFFVAPFPEVFGKEKVNEL",
  "chain_info": {
    "chain_id": "A",
    "length": 52,
    "organism": "Homo sapiens"
  }
}

Structure Analysis

Download PDB File

Download PDB files from RCSB Protein Data Bank.

GET /structure/pdb/{pdb_id}

Parameters:

  • pdb_id: 4-character PDB identifier (e.g., "1ABC")

Response:

Content-Type: chemical/x-pdb
Content-Disposition: attachment; filename="1ABC.pdb"

HEADER    TRANSFERASE/DNA                         01-JUL-93   1ABC
TITLE     STRUCTURE OF THE LAMBDA COMPLEX AT 2.5 ANGSTROMS RESOLUTION
...

Batch Processing

Batch Protein Analysis

Analyze multiple protein sequences in a single request.

POST /batch/protein-analysis

Request Body:

{
  "sequences": [
    {
      "id": "protein1",
      "sequence": "MKLLILTCLVAVALARPKHPIKHQGLPQEVLNENLLRFFVAPFPEVFGKEKVNEL"
    },
    {
      "id": "protein2",
      "sequence": "MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG"
    }
  ],
  "analyses": ["molecular_weight", "isoelectric_point", "stability"]
}

Response:

{
  "results": [
    {
      "id": "protein1",
      "molecular_weight": 5734.6,
      "isoelectric_point": 9.87,
      "instability_index": 28.45,
      "status": "success"
    },
    {
      "id": "protein2",
      "molecular_weight": 7234.2,
      "isoelectric_point": 8.12,
      "instability_index": 35.67,
      "status": "success"
    }
  ],
  "summary": {
    "total_sequences": 2,
    "successful": 2,
    "failed": 0
  }
}

Error Handling

All errors follow a consistent format:

{
  "error": {
    "code": "INVALID_SEQUENCE",
    "message": "The provided sequence contains invalid amino acid codes",
    "details": {
      "invalid_characters": ["X", "B"],
      "positions": [15, 23]
    }
  }
}

Common Error Codes

  • INVALID_SEQUENCE: Sequence contains invalid characters
  • SEQUENCE_TOO_LONG: Sequence exceeds maximum length
  • INVALID_FORMAT: Input format is not supported
  • RATE_LIMIT_EXCEEDED: API rate limit exceeded
  • INVALID_API_KEY: Authentication failed
  • INSUFFICIENT_CREDITS: Account has insufficient credits

SDKs and Libraries

Python SDK

pip install proteiniq-python
from proteiniq import ProteinIQ

client = ProteinIQ(api_key="your_api_key")

result = client.protein.molecular_weight(
    sequence="MKLLILTCLVAVALARPKHPIKHQGLPQEVLNENLLRFFVAPFPEVFGKEKVNEL"
)

print(f"Molecular weight: {result.molecular_weight} Da")

JavaScript SDK

npm install proteiniq-js
import { ProteinIQ } from 'proteiniq-js';

const client = new ProteinIQ({ apiKey: 'your_api_key' });

const result = await client.protein.molecularWeight({
  sequence: 'MKLLILTCLVAVALARPKHPIKHQGLPQEVLNENLLRFFVAPFPEVFGKEKVNEL'
});

Webhooks

Configure webhooks to receive notifications about long-running batch jobs.

Setting Up Webhooks

  1. Configure webhook URL in your dashboard
  2. Choose events to subscribe to
  3. Verify webhook endpoint

Webhook Events

  • batch.completed: Batch analysis completed
  • batch.failed: Batch analysis failed
  • account.limit_reached: Rate limit or credit limit reached

Webhook Payload

{
  "event": "batch.completed",
  "timestamp": "2023-12-01T10:30:00Z",
  "data": {
    "batch_id": "batch_123456",
    "status": "completed",
    "results_url": "https://api.proteiniq.com/v1/batch/batch_123456/results"
  }
}

Support

For API support:

  • Email: api-support@proteiniq.com
  • Documentation: https://docs.proteiniq.com
  • Status page: https://status.proteiniq.com

Changelog

v1.2.0 (2023-12-01)

  • Added batch processing endpoints
  • Improved error handling
  • Added webhook support

v1.1.0 (2023-11-01)

  • Added protein stability analysis
  • Enhanced sequence validation
  • Performance improvements

v1.0.0 (2023-10-01)

  • Initial API release
  • Basic protein analysis endpoints
  • Sequence conversion tools