From bfabric-lims
Comprehensive toolkit for interfacing with B-Fabric using btools package for dataset registration, resource management, and metadata queries on FGCZ infrastructure. Use when registering datasets, querying project metadata, managing resources, or tracking dataset provenance.
How this skill is triggered — by the user, by Claude, or both
Slash command
/bfabric-lims:bfabric-toolsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
CLI toolkit and Python library for B-Fabric operations: dataset registration, resource management, and metadata queries.
CLI toolkit and Python library for B-Fabric operations: dataset registration, resource management, and metadata queries.
conda activate gi_py3.11.5
# Check: python -c "from bfabric import Bfabric; print('OK')"
Credentials at ~/.bfabricpy.yml:
PRODUCTION:
login: your_username
password: your_password
base_url: http://fgcz-bfabric.uzh.ch/bfabric
register_sushi_dataset_into_bfabric PROJECT_ID DATASET_TSV WORKUNIT_NAME [ORDER_ID] [PARENT_DS]
# Example
register_sushi_dataset_into_bfabric p31662 results.tsv RNAseqCount_Analysis o39391 -i RNAseqCount --verbose
Options:
-a/--application <id>: Application ID (138=gStore import, 206=Analysis import)-i/--sushi-app <name>: SUSHI application name--verbose: Enable verbose outputcheck_dataset_bfabric -id 12345
# Returns: True or False
update_resource_status 98765 available -v
update_resource_status -k relativepath "p1234/file.txt" archived
Statuses: available, pending, archived, deleted
delete_workunit_by_dataset_id -id 12345 -f
get_project_id_from_order 56789
from bfabric import Bfabric
bf = Bfabric.from_config()
# Get project
project = bf.read('project', {'id': 31662}).to_list_dict()[0]
# Get orders in project
orders = bf.read('order', {'projectid': 31662}).to_list_dict()
# Get samples
samples = bf.read('sample', {'containerid': 31662}).to_list_dict()
# Get workunits
workunits = bf.read('workunit', {'containerid': 31662}).to_list_dict()
# Get comments on project
annotations = bf.read('annotation', {'objectid': 31662, 'classname': 'Project'}).to_list_dict()
| Endpoint | Query Keys | Description |
|---|---|---|
project | id, name | Project metadata |
order | id, projectid | Order details |
sample | id, containerid, orderid | Sample metadata |
workunit | id, containerid, applicationid | Analysis workunits |
dataset | id, workunitid | Dataset information |
resource | id, workunitid, relativepath | File resources |
annotation | objectid + classname | Comments/notes |
references/python-queries.md - Advanced Python use cases:
references/tsv-format.md - TSV specification for dataset registration
references/troubleshooting.md - Common issues and workflows
# Register dataset
register_sushi_dataset_into_bfabric p1234 data.tsv WorkunitName -i SUSHIApp --verbose
# Check dataset
check_dataset_bfabric -id 12345
# Update resource
update_resource_status 98765 available -v
# Get project from order
get_project_id_from_order 56789
~/git/btoolsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub cpanse/skills --plugin bfabric-lims