iSpyb Scipion监视器
scipion-em-ispyb的Python项目详细描述
ispyb监视器
此插件包含一个监视器,用于将数据发送到ISPYB数据库,因此需要一个工作的ISPYB数据库。 下面我们总结一下如果您还没有ispyb,测试这个插件所采取的步骤。
设置
- install mariadb:下载选择操作系统和版本(推荐的>;=10.2),按照以下步骤操作:https://downloads.mariadb.org/mariadb/repositories/#mirror=digitalocean-sfo&distro=Ubuntu&distro_release=xenial–ubuntu_xenial&version=10.3
- fix root log in:检查是否可以以根用户身份登录mysql($mysql -u root -p)。如果登录成功,请跳过此步骤。如果不能,请使用此链接上接受的答案来修复根用户登录:https://askubuntu.com/questions/705458/ubuntu-15-10-mysql-error-1524-unix-socket。
- 以根用户身份登录:
$mysql -u root -p
- set log_bin_trust_function_creators:
MariaDB [(none)]> set global log_bin_trust_function_creators=ON; Query OK, 0 rows affected (0.000 sec)
- create数据库:
MariaDB [(none)]> create database ispyb; Query OK, 1 row affected (0.000 sec)
- create user for db:在我们刚刚创建的ispyb数据库上向您的用户授予权限。见https://stackoverflow.com/questions/5016505/grant-all-privileges-on-database。在这里,我们创建了一个用户用户名,可以在没有密码的情况下登录。
MariaDB [(none)]> CREATE USER username; MariaDB [(none)]> CREATE USER username@’localhost’; MariaDB [(none)]> use ispyb MariaDB [(ispyb)]> GRANT ALL PRIVILEGES ON ispyb.* to username@'localhost'; MariaDB [(ispyb)]> grant all privileges on ispyb.* to username@'%';
- 添加架构:克隆此存储库并按照步骤添加架构https://github.com/DiamondLightSource/ispyb-database
- 创建配置文件:基于https://github.com/DiamondLightSource/ispyb-api/blob/master/conf/config.example.cfg
[ispyb_mysql_sp] user = username pw = host = localhost port = 3306 db = ispyb
- set ispyb_config:您可以在启动scipion doingexport ISPYB_CONFIG=path/to/ispyb.cfg的终端中完成,也可以在~/.config/scipion/scipion.conf的variables部分中进行设置
[VARIABLES] SCIPION_NOTES_PROGRAM = SCIPION_NOTES_ARGS = SCIPION_NOTES_FILE = notes.txt SCIPION_NOTIFY = False ISPYB_CONFIG=/path/to/ispyb.conf
- 安装此插件:
scipion installp -p scipion-em-ispyb
或者,在devel模式下:
scipion installp -p local/path/to/scipion-em-ispyb --devel
运行并测试
- 运行scipion和ispy监视器:您现在应该能够在scipion的可用协议列表中找到ispy监视器。使用以下一个或所有协议启动工作流:导入电影、电影对齐、ctf估计(teststreamingworkflow是一个很好的候选者),并将它们设置为ispyb monitor的输入。出于测试目的,您可以在底部的下拉菜单中选择“test”作为数据库,并使用cm14451-2作为访问。
- ispyb import error:如果监视器由于无法导入bz2而失败,我们需要在系统libbz2 dev中安装并重新安装scipion:
sudo apt-get install libbz2-dev rm -rf software/lib/* rm -rf software/include/* rm software/bin/* scipion install -j 8
- 检查ispyb数据库中的数据:
MariaDB [ispyb]> select micrographFullPath, movieId, totalMotion from MotionCorrection; +--------------------------------------------------------------+---------+-------------+ | micrographFullPath | movieId | totalMotion | +--------------------------------------------------------------+---------+-------------+ | Runs/000615_ProtMotionCorr/extra/movie000001_aligned_mic.mrc | 1 | 1.96068 | | Runs/000615_ProtMotionCorr/extra/movie000002_aligned_mic.mrc | 2 | 3.57892 | | Runs/000615_ProtMotionCorr/extra/movie000003_aligned_mic.mrc | 3 | 2.17066 | | Runs/000615_ProtMotionCorr/extra/movie000004_aligned_mic.mrc | 4 | 1.96068 | | Runs/000615_ProtMotionCorr/extra/movie000005_aligned_mic.mrc | 5 | 3.57892 | | Runs/000615_ProtMotionCorr/extra/movie000006_aligned_mic.mrc | 6 | 2.17066 | | Runs/000615_ProtMotionCorr/extra/movie000007_aligned_mic.mrc | 7 | 1.96068 | | Runs/000615_ProtMotionCorr/extra/movie000008_aligned_mic.mrc | 8 | 3.57892 | | Runs/000615_ProtMotionCorr/extra/movie000009_aligned_mic.mrc | 9 | 2.17066 |