/images/avatar.png

Xiaopeng Xu, Ph.D.

Research Scientist @ KAUST · Agentic AI for scientific discovery, protein design & synthetic biology

Recent News

Recent Notes

Cloud 常用命令

Google cloud 操作

增加 ssh key

ssh-keygen # -t rsa -b 4096 -C account_name
# copy the content in *.pub to google cloud user keys.

VM 相关

创建和删除 VM

在 web 界面中按步骤操作即可。

注意:

  1. 在高级选项中的 availability policies,课选择 spot。可大幅减少计算成本。 使用 Admin 创建的 image,可以使用 NFS,已有 environment。

登录 VM

使用 gcloud 登录较为方便,命令如下

Ig-seq 操作说明

数据下载

从 NCBI SRA 平台下载对应的 Ig seq 项目数据。

先导入 google cloud 的 bucket 中,然后通过 gsutils 下载到本地或 ibex 文件夹中。

MiXCR 数据分析

安装 MiXCR

conda install -c imperial-college-research-computing mixcr

Ig-seq 快速使用

# Align
Align: mixcr alignlibrary my_library -t 8 -r align_log.txt R1 R2 alignments.vdjca -s hs
# What is the my_library used here

# Assemble
Assemble: mixcr assemble -r assemble_log.txt -OseparateByV = true -OseparateByJ = true -OseparateByC = true align-
ments.vdjca clones.clns

使用介绍

典型的 MiXCR 工作流程主要由三个部分构成:

Nanopore 分析流程

基础的分析流程:

  1. Base calling 从电信号中识别碱基序列。原始电信号是Fast5/Pod5格式,需要转为 Fastq 格式。 Fast5/Pod5-> Fastq。

  2. Alignment 比对到参考基因组。常用工具是 minimap2。

  3. Call variants 获取突变数据,包括 GATK,VarScan 等。

Rosetta 使用

核心思想是 Rotamer

安装

Rosetta 可以从 RosettaCommons 上面下载源代码。但需要在本地做 Compile 后才能使用。相关介绍见:https://www.rosettacommons.org/demos/latest/tutorials/install_build/install_build

tar -xvzf rosetta[releasenumber].tar.gz # 解压压缩包
cd rosetta*/main/source # 打开源代码文件夹
./scons.py -j 20 mode=release bin # 用 scons 来生成 binary 文件,20为核数

默认 build 好后在 ./bin/ 文件夹中。

数据库常用命令

MySQL 使用

安装 MySQL

sudo apt install mysql-server  # install
sudo systemctl start mysql.service  # start

修改 root 密码

sudo mysql # start mysql with root user

Change root password in mysql, set root password as: Xp@KAUST2023

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Xp@KAUST2023';
exit;

Go back to using the default authentication method

Nanopore 信号分析

原始测序电信号数据格式

FAST5 数据格式

https://github.com/nanoporetech/fast5_research

https://blog.csdn.net/Emmett_Bioinfo/article/details/113847543

https://zhuanlan.zhihu.com/p/137069950

FAST5格式(.fast5)实际上是在HDF5格式上的一种变体。HDF是Hierarchical Data Format的首字母缩写,从名字上就可以看出来这种文件格式储存信息的方式是层级嵌套的(hierarchical, nested)。它采用chunking(分解)的方式来存储多维数据,它内部表现出来的是类似于文件夹(树)的结构。由于这种文件层级分解的特性,想要获取某一部分信息,只需要获得该部分信息所在的chunk即可,这样就让这种文件格式非常的flexible,也非常适合用于多种编程语言来处理。FAST5格式是Oxford推出Nanopore测序之后在HDF5格式的基础上设计用于存储Nanopore测序信息的文件。