PSI-BLAST参数解释

该文章已生成可运行项目,

Blastp/PSI-BLAST/PHI-BLAST 的详细介绍


Blastp/PSI-BLAST/PHI-BLAST都是蛋白序列与蛋白序列之间的Blast比对。

1,Blastp: 标准的蛋白序列与蛋白序列之间的比对

Standard protein BLAST is designed for protein searches.

Blastp用于确定查询的氨基酸序列在蛋白数据库中找到相似的序列。跟其它的Blast程序一样,目的是要找到相似的区域。

2,PSI-BLAST : 敏感度更高的蛋白序列与蛋白序列之间的比对

PSI-BLAST is designed for more sensitive protein-protein similarity searches.

Position-Specific Iterated (PSI)-BLAST,是一种更加高灵敏的Blastp程序,对于发现远亲物种的相似蛋白或某个蛋白家族的新成员非常有效。当你使用标准的Blastp比对失败时,或比对的结果仅仅是一些假基因或推测的基因序列时("hypothetical protein" or "similar to..."),你可以选择PSI-BLAST重新试试。

3,PHI-BLAST : 模式发现迭代BLAST

PHI-BLAST can do a restricted protein pattern search.

PHI-BLAST, 模式发现迭代BLAST, 用蛋白查询来搜索蛋白数据库的一个程序。仅仅找出那些查询序列中含有的特殊模式的对齐。

PHI的语法详细介绍看这里:http://www.ncbi.nlm.nih.gov/blast/html/PHIsyntax.html (不过,不是太明白)

Lc.注:翻译得不好,请多多见谅。




本地blast的详细使用方法

blastall -p blastn -i myRNA.fasta -d humanRNA.fasta -o myresult.blastout -a 2 -F F -T T -e 1e-10
解释如下:


blastall: 这是本地化/命令行执行blast时的程序名字!(Tips:blastall直接回车就会给出你所有的参数帮助,但是英文的)

-p: p 是program的简写,program在计算机领域中是程序的意思。此参数是指定要使用何种子程序,所谓子程序,就是针对不同的需要,如核酸序列和核酸序列进行比对、蛋白质序列和蛋白质序列进行比对、假设翻译后核酸序列于蛋白质序列进行比对,选择相应的子程序: blastn 是用于核酸对核酸 blastp 是蛋白质对蛋白质序列 等等,一共5个自程序。

-i: i 是input的简写,意思是输入文件,就是你自己的要进行比对的序列文件(fasta格式)

-d: d是database的简写,意思是要比对的目标数据库,在例子中就是humanRNA.fasta (别忘了要formatdb)

-o: o是output的简写,意思是结果文件名字,这个根据你自己的习惯起名字,可以带路径,(上边两个参数-i -d 也都可以带路径)
*注意以上4个参数是必须的,缺一不可,下面的参数是为了得到更好的结果自己可调的参数,如果你不加也没有关系,blastall程序本身会给一个默认值!

-a: 是指计算时要用的CPU个数,我的机器有两个CPU,所以用-a 2,这样可以并行化进行计算,提高速度,当然你的计算机就一个CPU,可以不用这个参数,系统默认值为1,就是一个CPU

-F: 是filter的简写,blastall程序中有对简单的重复序列和低复杂度的一些repeats过滤调,默认是T (注意以后的有几种参数就两个选项,T/F T就是ture,真,你可以理解为打开该功能; F就是false,假,理解为关闭该功能)

-T: 是HTML的简写,是指blast结果文件是否用HTML格式,默认是F!如果你想用IE看,我建议用-T T

-e: 是Expectation value,期望值,默认是10,我用的10-10!

BLASTALL 用法

a.格式化序列数据库
格式化序列数据库— —formatdb

formatdb简单介绍:
formatdb处理的都是格式为 ASN.1和 FASTA,而且不论是核苷酸序列数据库,还是蛋白质序列数据库;不论是使用Blastall ,还是Blastpgp,Mega Blast应用程序,这一步都是不可少的。

formatdb命令行参数:
formatdb -    得到formatdb 所有的参数显示(见附录二)和介绍,

主要参数的说明:

-i 输入需要格式化的源数据库名称 Optional

-p 文件类型,是核苷酸序列数据库,还是蛋白质序列数据库

    T – protein   F - nucleotide [T/F] Optional default = T

-a 输入数据库的格式是ASN.1(否 则是FASTA)

    T - True,     F - False.    [T/F] Optional default = F

-o 解析选项

    T - True: 解析序列标识并且建立目录

    F - False: 与上相反

   [T/F] Optional default = F

命令示例:

formatdb -i ecoli.nt -p F -o T

运行此命令就会在当前目录下产生用于BLAST搜索的7个文件,一旦如上的formatdb命令执行完毕,就不 再需要ecoli.nt,可以移除。此时,blastall可以直接使用。

b.Blastall常用参数简析
-p Program Name [String]
所用程序名称[String],用 户可以根据需要从blastn,blastp,blastx,tblastn,tblastx中任选一程序。

-d Database [String] default = nr
所用序列数据库的名称 [String],默认为:nr

-i Query File [File In] default = stdin
所用查询序列文件[File In], 默认为:stdin,本文例为 test.txt

-e Expectation value (E) [Real]   default = 10.0
期望值[Real]   默认为10.0 描述搜索某一特定数据 库时,随机出现的匹配序列数目。

-m alignment view options: 比对显 示选项,其具体的说明可以用以下的比对实例说明
0 = pairwise,显示具体匹配信息(缺省)
1 = query-anchored showing identities,查询-比上区域,显示一致性
2 = query-anchored no identities,查询-比上区域,不显示一致性
3 = flat query-anchored, show identities,查询-比上区域的屏文形式,显示一致性
4 = flat query-anchored, no identities,查询-比上区域的屏文形式,不显示一致性
5 = query-anchored no identities and blunt ends,查询-比上区域,不显示一致性,无突然的结束
6 = flat query-anchored, no identities and blunt ends,查询-比上区域的屏文形式,不显示一致性
7 = XML Blast output,XML格式的输出
8 = tabular,TAB格式的输出
9 =tabular with comment lines,带注释行的TAB格式的输出
10 =ASN, text,文本方式的ASN格式输出
11 =ASN, binary [Integer] default = 0,二进制方式的ASN格式输出

-m 8 用法举例说明如下:
A_query    B_Sbjct    97.61    585    3    3    309    886    94498    95078    0.0    1017
A_query    B_Sbjct    100.00    303    0    0    913    1215    95092    95394    2e-172    601
A_query    B_Sbjct    100.00    209    0    0    1    209    94196    94404    3e-116    414
A_query    B_Sbjct    100.00    123    0    0    1234    1356    95413    95535    6e-65    244
A_query    B_Sbjct    100.00    41    0    0    210    250    94096    94136    5e-16    81.8
A_query    B_Sbjct    100.00    35    0    0    251    285    94440    94474    2e-12    69.9
A_query    B_Sbjct    100.00    29    0    0    885    913    95747    95775    7e-09    58.0
A_query    A_query    97.61    585    3    3    309    886    403    983    0.0    1017
A_query    A_query    100.00    303    0    0    913    1215    997    1299    2e-172    601
A_query    A_query    100.00    209    0    0    1    209    101    309    3e-116    414
A_query    A_query    100.00    123    0    0    1234    1356    1318    1440    6e-65    244
A_query    A_query    100.00    41    0    0    210    250    1    41    5e-16    81.8
A_query    A_query    100.00    35    0    0    251    285    345    379    2e-12    69.9
A_query    A_query    100.00    29    0    0    885    913    1652    1680    7e-09    58.0

结果12列
Query id,Subject id,% identity,alignment length,mismatches,gap openings,q. start,q. end,s. start,s. end,e-value,bit score

-------------------------------------------------------------------------------------------------------------

-o BLAST report Output File [File Out] Optional default = stdout,BLAST报告的输出文件[File Out] 默认为:stdout

-F Filter query sequence (DUST with blastn, SEG with others) [String] default = T
查询序列过滤,将那些 给出影响比对结果的低复杂度区域过滤掉。用blastn进行查询的序列用DUST程序过滤,其他的用SEG过滤 。对DUST和SEG的详细情况,用户可以自己查询资料。

-G Cost to open a gap (zero invokes default behavior) [Integer]   default = 0
空位开放罚分[Integer] (设为0则调用默认行为)   默认为0分

-E Cost to extend a gap (zero invokes default behavior) [Integer] default = 0
空位扩展罚分[Integer] (设为0则调用默认行为) 默认为0分

-T Produce HTML output [T/F] default = F
以网页形式打印

-X X dropoff value for gapped alignment (in bits) (zero invokes default behavior)
blastn 30, megablast 20, tblastx 0, all others 15 [Integer],default = 0

-I Show GI's in deflines [T/F]   default = F
提示行显示GI number 默认不显示

-q Penalty for a nucleotide mismatch (blastn only) [Integer] default = -3
核酸序列基对不匹配所罚分数(blastn only) [Integer] 默认罚3分

-r Reward for a nucleotide match (blastn only) [Integer] default = 1
核苷酸序列基对匹配所加分数(blastn only) [Integer] 默认加1分

-g Perfom gapped alignment (not available with tblastx) [T/F] default = T
是否执行带缺口的比对(not available with tblastx) 默认为是     

-a Number of processors to use [Integer] default = 1
使用处理器的数目[Integer] 默认为单机

-B Number of concatenated queries, for blastn and tblastn [Integer] Optional default = 0
需要联配查询的序列数目 for blastn and tblastn [Integer] 默认为单序列

-M Matrix [String],default = BLOSUM62 打分矩阵,默认BLOSUM62

-W Word size, default if zero (blastn 11, megablast 28, all others 3) [Integer] default = 0
所开窗口

-w Frame shift penalty (OOF algorithm for blastx) [Integer] default = 0
窗口罚分

本文章已经生成可运行项目
### PSI-BLAST 的使用方法 PSI-BLAST 是一种迭代式的序列比对工具,用于检测远缘同源关系。它基于位置特异性评分矩阵 (PSSM, Position-Specific Scoring Matrix),能够更敏感地识别具有相似功能或结构的蛋白质。 #### 运行 PSI-BLAST 的基本命令 以下是运行 PSI-BLAST 的典型命令及其参数说明: ```bash ./bin/psiblast -query query.fasta -db ./db/swissprot -num_iterations 3 -out_ascii_pssm output.pssm -out results.txt ``` - `-query`: 输入查询序列文件路径,通常是一个 FASTA 文件[^1]。 - `-db`: 数据库路径,指定要搜索的目标数据库(如 SwissProt 或其他自定义数据库)。 - `-num_iterations`: 设置 PSI-BLAST 的迭代次数,默认为 3 次。 - `-out_ascii_pssm`: 输出 ASCII 格式的 PSSM 文件名。 - `-out`: 结果输出文件名,保存每次迭代的结果。 #### 转换 PSSM 文件到 Python 字典 PSI-BLAST 生成的 PSSM 文件可以被解析并存储在一个字典 `pssm_dict` 中以便进一步分析。例如,可以通过以下方式处理 PSSM 平均得分: ```python def parse_pssm(pssm_file): pssm_dict = {} with open(pssm_file, 'r') as f: lines = f.readlines() for line in lines: if not line.strip() or line.startswith(' '): # Skip empty and header lines continue parts = line.split() position = int(parts[0]) # Sequence position amino_acid = parts[1] # Amino acid at the position scores = list(map(int, parts[2:-1])) # Scores for each residue substitution avg_score = float(parts[-1]) # Average score of this position pssm_dict[position] = { 'amino_acid': amino_acid, 'scores': scores, 'avg_score': avg_score } return pssm_dict # Example usage pssm_data = parse_pssm('output.pssm') print(pssm_data) ``` 上述代码片段展示了如何读取 PSSM 文件并将数据存入字典中,其中每一项包含了氨基酸替换分数以及平均分[^3]。 #### 计算蛋白质结构完整性 如果需要评估蛋白质结构的完整性,可参考如下流程: ```python import pandas as pd def calculate_protein_integrity(entity_poly_sequence, atom_residue_count): total_residues = len(entity_poly_sequence) # Total residues declared in entity_poly table observed_residues = sum(atom_residue_count.values()) # Sum of all observed residues from atoms integrity_percentage = (observed_residues / total_residues) * 100 return integrity_percentage # Example data loading entity_poly_df = pd.read_csv('entity_poly.csv') atom_counts = {'ALA': 50, 'GLY': 30} # Hypothetical example counts per residue type sequence = ''.join(entity_poly_df['pdbx_seq_one_letter_code'].dropna()) integrity = calculate_protein_integrity(sequence, atom_counts) print(f'Protein Integrity Percentage: {integrity:.2f}%') ``` 此脚本利用了实体多聚体表 (`entity_poly`) 和原子部分中的残基计数来估算蛋白质的整体完整性[^2]。 ---
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值