Catbot
Slack bot to interface with CATMAID server, NBLAST and Zotero
Install / Use
/learn @flyconnectome/CatbotREADME
catbot
Python 3 Slack bot to interface with CATMAID server, NBLAST and Zotero. Based on Slack's Python API (see here for documentation).
Quickstart
- Download catbot.py, botconfig.py and ffnblast.py
- Setup and configure botconfig.py (see below)
- Install dependencies
- Run catbot.py
- In Slack use
@catbot helpto get a list of possible commands
Dependencies
Python
slack_client, matplotlib, pymaid, tabulate, rpy2, pyzotero
R
elmr, flycircuit, vfbr, doMC
Configuration
botconfig.py needs to hold credentials for CATMAID server, Slack and Zotero (optional)
#General parameters
BOT_NAME = 'catbot'
BOT_ID = ''
AT_BOT = '<@' + BOT_ID + '>'
READ_WEBSOCKET_DELAY = 1 # 1 second delay between reading from firehose
MAX_PARALLEL_REQUESTS = 10 # not more than 10 threads at any given time
#Catmaid credentials
SERVER_URL = ''
AUTHTOKEN = ''
HTTP_USER = ''
HTTP_PW = ''
#Slack credentials
SLACK_KEY = ''
#Zotero credentials
ZOT_KEY = ''
ZOT_GRP_ID = ''
#Nblast databases
FLYCIRCUIT_DB = 'url to dpscanon.rds'
JANELIA_GMR_DB = 'url to gmrdps.rds'
See here on how to setup bot_id and Slack key
See here on Zotero keys and grp ids.
Using catbot to NBLAST
Use @catbot nblast #skid to have catbot perform a nblast search. This relies on R being installed and configured to use elmr and its dependencies. Please make sure that you can run e.g. the example in ?nblast_fafb
Catbot will return a list of top hits and their nblast scores plus a .html file containing a WebGL rendering of the first few hits (see screenshot).

Optional arguments:
nomirror to set mirror=F (default = T)
hits=N to set number of hits to include in the 3D WebGL file (default = 3)
License:
This code is under GNU GPL V3
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
