Protocolsio Integration

Protocolsio Integration automation and integration

Protocols.io Integration is a community skill for managing and sharing laboratory protocols using the Protocols.io platform, covering protocol creation, version management, step annotation, collaboration workflows, and API integration for reproducible experimental methods.

What Is This?

Overview

Protocols.io Integration provides tools for creating, sharing, and managing laboratory protocols through the Protocols.io platform API. It covers protocol creation that structures experimental procedures into numbered steps with materials and timing information, version management that tracks protocol revisions with change descriptions, step annotation that adds notes, images, and expected results to individual procedure steps, collaboration workflows that share protocols with team members for review and forking, and API integration that programmatically accesses and updates protocols from laboratory software. The skill enables research teams to maintain reproducible experimental procedures.

Who Should Use This

This skill serves laboratory researchers documenting experimental protocols for publication and reproducibility, research teams sharing standardized procedures across multiple lab sites, and core facilities maintaining protocol libraries for instrument-specific workflows.

Why Use It?

Problems It Solves

Laboratory protocols stored in documents and notebooks are difficult to version track and share with collaborators. Method sections in publications lack the step-by-step detail needed to reproduce experiments. Protocol modifications made by different team members create confusion about which version is current. Sharing protocols across laboratories requires manual formatting for each recipient.

Core Highlights

Protocol builder creates structured procedures with materials and timing. Version tracker records revisions with change descriptions for audit trails. Step annotator adds detailed notes and expected results to each procedure step. Collaboration manager shares protocols with access controls for team review.

How to Use It?

Basic Usage

import requests

class ProtocolsIO:
  BASE = (
    'https://www.'
    'protocols.io/api/v4')

  def __init__(
    self, token: str
  ):
    self.headers = {
      'Authorization':
        f'Bearer {token}',
      'Content-Type':
        'application/json'}

  def list_protocols(
    self,
    page: int = 1
  ) -> dict:
    resp = requests.get(
      f'{self.BASE}'
      f'/protocols',
      headers=
        self.headers,
      params={
        'page_id': page})
    return resp.json()

  def get_protocol(
    self, pid: int
  ) -> dict:
    resp = requests.get(
      f'{self.BASE}'
      f'/protocols/'
      f'{pid}',
      headers=
        self.headers)
    return resp.json()

  def create_protocol(
    self,
    title: str,
    steps: list[dict]
  ) -> dict:
    payload = {
      'title': title,
      'steps': steps}
    resp = requests.post(
      f'{self.BASE}'
      f'/protocols',
      headers=
        self.headers,
      json=payload)
    return resp.json()

Real-World Examples

class ProtocolVersions:
  def __init__(
    self,
    client: ProtocolsIO
  ):
    self.client = client
    self.cache = {}

  def get_versions(
    self, pid: int
  ) -> list[dict]:
    protocol = (
      self.client
        .get_protocol(
          pid))
    versions = protocol\
      .get('versions', [])
    return [{
      'version':
        v['version_id'],
      'created':
        v['created_on'],
      'description':
        v.get(
          'description',
          '')}
      for v in versions]

  def compare(
    self,
    pid: int,
    v1: int,
    v2: int
  ) -> dict:
    p1 = self.client\
      .get_protocol(
        f'{pid}?'
        f'version={v1}')
    p2 = self.client\
      .get_protocol(
        f'{pid}?'
        f'version={v2}')
    s1 = set(
      s['description']
      for s in
      p1.get(
        'steps', []))
    s2 = set(
      s['description']
      for s in
      p2.get(
        'steps', []))
    return {
      'added':
        list(s2 - s1),
      'removed':
        list(s1 - s2)}

Advanced Tips

Use protocol forking to create team-specific variations of shared procedures while maintaining links to the original version for tracking changes. Attach expected result images to critical steps so technicians can verify they are on track during execution. Link protocols to DOI identifiers for direct citation in publication method sections.

When to Use It?

Use Cases

Document a multi-step experimental protocol with materials, timing, and expected results for reproducible execution. Share standardized procedures across collaborating laboratories with version tracking for modifications. Programmatically retrieve protocol steps to integrate with laboratory information management systems.

Related Topics

Protocols.io, laboratory protocols, reproducibility, experimental methods, protocol management, LIMS integration, and scientific collaboration.

Important Notes

Requirements

Protocols.io account with API access token for programmatic operations. Python requests library for HTTP communication with the platform API. Protocol content organized into sequential steps with materials lists.

Usage Recommendations

Do: version protocols with descriptive change notes whenever modifications are made to maintain audit trails. Include expected results at critical checkpoints so users can verify successful execution. Use the DOI assignment feature to create citable protocol references for publications.

Don't: edit shared protocols without creating a new version since this overwrites the record other teams may be following. Store sensitive reagent or equipment details in public protocols without checking institutional policies. Rely solely on text descriptions when images would clarify technique-specific steps.

Limitations

API rate limits restrict the frequency of programmatic access for bulk protocol operations. Protocol formatting from the platform may not match journal-specific method section requirements. Offline access to protocols requires prior export since the platform is cloud-based.