biopython 相关问题

Biopython是一套免费提供的用Python编写的生物计算工具。请仅将此标记用于与Biopython工具套件相关的问题。

Biopython 的 SeqIO.parse 在第一次迭代后停止解析。为什么?这是我安装的问题吗?

我有两个 fasta 文件(参见下面的可重现示例),我需要将第一个文件中的所有序列与第二个文件中的所有序列进行比较。这是

回答 2 投票 0

dssp 导致 FileNotFoundError: [WinError 2] 系统找不到指定的文件

S-腺苷甲硫氨酸合酶亚型 1 型 ('/Users/grb25/SS_HS/Q00266.pdb', ) ('/Users/grb25/SS_HS/Q00266.txt', S-adenosylmethionine synthase isoform type-1 ('/Users/grb25/SS_HS/Q00266.pdb', <http.client.HTTPMessage object at 0x000002A1ADE33D90>) ('/Users/grb25/SS_HS/Q00266.txt', <http.client.HTTPMessage object at 0x000002A1ADE33BE0>) Q00266 The 'try' is finished Traceback (most recent call last): File "<stdin>", line 31, in <module> File "C:\Users\grb25\AppData\Local\Programs\Python\Python310\lib\site-packages\Bio\PDB\DSSP.py", line 385, in __init__ version_string = subprocess.check_output( File "C:\Users\grb25\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 421, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Users\grb25\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 503, in run with Popen(*popenargs, **kwargs) as process: File "C:\Users\grb25\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 971, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\grb25\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1440, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified loc_pdb = "/Users/grb25/SS_HS/" + uniprot + ".pdb" loc_error = "/Users/grb25/SS_HS/" + uniprot + ".txt" struct = "https://alphafold.ebi.ac.uk/files/AF-{}-F1-model_v3.pdb".format(uniprot) error = "https://alphafold.ebi.ac.uk/files/AF-{}-F1-model_v3.cif".format(uniprot) urllib.request.urlretrieve(struct, loc_pdb) urllib.request.urlretrieve(error, loc_error) p = PDBParser() structure = p.get_structure(uniprot, loc_pdb) model = structure[0] dssp = DSSP(model, "/Users/grb25/SS_HS/" + uniprot + ".pdb", dssp='mkhssp') 我正在尝试使用 dssp 查找多种蛋白质的二级结构。我想先说明一下,我是 Python 的新手,所以我不知道自己到底在做什么。我有一长串正在运行的蛋白质,所以 loc.pdb = "/Users/grb25/SS_HS/" + uniprot + ".pdb" 应该导致 dssp 打开特定 pdb 文件以获得特定的 uniprot 值.我收到 FileNotFoundError: [WinError 2] 系统找不到指定的文件 但是每当我尝试运行脚本时。任何帮助表示赞赏! #For each unique protien accession number, go to the UniProt databse, and extract the protein's primary sequence from Bio.PDB import PDBParser from Bio.PDB.DSSP import DSSP import urllib.request index = 1 for uniprot in uniprots[1:]: SS_list = [] link = "https://www.uniprot.org/uniprot/" + uniprot +".fasta" f = session.get(link) contents = f.text.splitlines() try: #print(index) #print(contents) SS_list.append(uniprot) protein_name = ' '.join(contents[0].split("|")[-1].split("OS")[0].split()[1:]) print (index) protein_seq = "".join("".join(contents[1:])) totalAA = len(protein_seq) SS_list.append(protein_name) SS_list.append(totalAA) print(protein_name) helix_count = 0 sheet_count = 0 turn_count = 0 unstructured_count = 0 loc_pdb = "/Users/grb25/SS_HS/" + uniprot + ".pdb" loc_error = "/Users/grb25/SS_HS/" + uniprot + ".txt" struct = "https://alphafold.ebi.ac.uk/files/AF-{}-F1-model_v3.pdb".format(uniprot) error = "https://alphafold.ebi.ac.uk/files/AF-{}-F1-model_v3.cif".format(uniprot) urllib.request.urlretrieve(struct, loc_pdb) urllib.request.urlretrieve(error, loc_error) p = PDBParser() structure = p.get_structure(uniprot, loc_pdb) model = structure[0] dssp = DSSP(model, "/Users/grb25/SS_HS/" + uniprot + ".pdb", dssp='mkhssp') SS_list.append(len(dssp.keys())) for i in range(len(dssp.keys())): a_key = list(dssp.keys())[i] if dssp[a_key][2]== "G" or dssp[a_key][2]== "H" or dssp[a_key][2]== "I": helix_count += 1 elif dssp[a_key][2]== "E" or dssp[a_key][2]== "B": sheet_count += 1 elif dssp[a_key][2]== "S" or dssp[a_key][2]== "T": turn_count += 1 elif dssp[a_key][2]== "-": unstructured_count += 1

回答 0 投票 0

How to change UNK to certain res type in a pdb [关闭]

我从 diffdock 得到一个肽配体 sdf。我将这个 sdf 文件转换为 pdb 文件,发现当配体是肽时,res 类型都是 UNK。我想知道这个结果可能是 diffdock i.. .

回答 0 投票 0

Biopython 包

我安装了Bio并更新了它,但是我又出现了这个错误。 >>> 从 Bio.SubsMat 导入 MatrixInfo ModuleNotFoundError:没有名为“Bio.SubsMat”的模块 我删除并重新安装了几次...

回答 1 投票 0

使用 Biopython 在 PDB 文件中选择特定原子时发生错误

以下是我的PDB文件的部分内容。我想设置C2原子为坐标原点,但是代码显示错误。 HETATM 1 C1 UNL A 1 -2.791 -1.310 0.787 1.00 0.00...

回答 0 投票 0

残差类中缺少“disordered_select”方法

我无法使此代码正常工作。它看起来与 biopython 提供的指令几乎相同,但一直给我错误 我在 PyCharm 社区使用 Python 3.7.6 和 Biopython 1.81

回答 1 投票 0

我的开放阅读框 (ORF) 查找代码没有找到序列中最长的 ORF

我正在尝试编写一个函数来找到最长的开放阅读框。然而,在这个例子中,它没有找到最长的 ORF,我不明白为什么。 这是顺序:

回答 1 投票 0

使用 Bio 包中的 Entrez.esearch 函数出现不可预测的 HTTPError

我正在尝试使用 Bio 包从 PubMed 中心获取记录,但在获取“一些”记录后,它会产生此错误: request.py:643 在 http_error_default 提高 HTTPError(req.full_url,代码,...

回答 0 投票 0

为 Biopython Entrez/Pubmed 摘要的获取和排序添加多处理

我有以下脚本,它尝试采用用户输入的搜索词并使用列表搜索 PubMed 1. 所有植物属 2. 所有植物化学物质 3. 两者或 4. 所有人类蛋白质鳕鱼...

回答 0 投票 0

如何从 Pubmed 下载全文?

我正在做一个需要使用 Genia 语料库的项目。根据文献,Genia 语料库是由通过搜索 3 个 Mesh 术语提取的文章制成的:“转录因子”、“bloo ...

回答 4 投票 0

开放获取,Pubmed 论文检索

我目前正在尝试从 PubMed 的 10k 篇开放获取论文中检索摘要和结论,这些论文与“癌症”或“肿瘤学”有关。我使用 Python 而我不使用

回答 0 投票 0

HETATM 如何影响蛋白质的 Phi-Psi 角?

我有一个 python 脚本来测量可变长度且由多条链组成的蛋白质的 phi psi 角。但是我的脚本没有考虑HETA前后的一个氨基酸残基……

回答 0 投票 0

难以解释 Biopython ncbi blast 函数的 .xml 结果文件

我想对猪核苷酸基因组序列进行序列搜索“CCTTCATTCTTCTGTATTGGAGACTTACAGTTGGCACAAGGCTTGGAGTT”,看看我是否能在比对中找到完美匹配。我用过...

回答 0 投票 0

计算不包含特定单词的特定行数。

请问我有个问题,我有一个文件是这样的@HWI-ST273:296:C0EFRACXX:2:2101:17125:1453251 TTAATACCCAACCAGAAGTTAGCTCCTCCT 我有一个文件是这样的 @HWI-ST273:296:C0EFRACXX:2:2101:17125:1453251 TTAATACACCCAACCAGAAGTTAGCTCCTTCACTTTCAGCTAAATAAAAG + 8?8A;DDDDD;@?++8A?;C;F92+2A@19:1*1?DDDECDE?B4:BDEEI ...。

回答 1 投票 0

Bcbio-gff 文件创建问题

当使用GFF.write()创建文件时,我得到了一个以 "注释备注 "为源的新行,后面是序列区域的ASCII编码。##gff-version 3 ##sequence-region NC_011594.1 1 16779 ... ...

回答 1 投票 1

在Biopython中把一个字符串的DNA转换成Seq对象。

有任何方式,我可以将用户输入字符串转换为byopython Seq对象?我尝试了很多东西,并在谷歌搜索,但没有一个答案。我尝试了很多东西,并在谷歌搜索,但没有答案。

回答 1 投票 0

蟒蛇DNA翻译

我必须创建我自己的biopython本质上。可以读取DNA,转录和翻译的东西。我已经得到了它的点,它可以做到这一切,但我不能找出如何得到... ...

回答 1 投票 0

永无止境的循环?无法让python停止运行

当我试着运行这段代码时,它从来没有完成过,我认为它卡在某个地方,但我不太确定,因为我是python新手。 import re codon = [] rcodon = [] dataset = "...

回答 1 投票 0

在Python和Biopython中运行BLAST来检测SARS病毒。我的输出根本没有显示出来! 有人检查我的代码吗?

以下是我的代码: from Bio.Blast import NCBIWWW result = NCBIWWW.qblast("blastn", "nt",r "C:\Users\video\Documents\sars.fasta") save_file = open("blast4.xml", "w") save_file.write(result......)

回答 1 投票 -2

如何使用Bio.Entrez (python)从ncbi生物样本论文摘要中获取多个属性?

我试图从Ncbi Biosample Esummary中收集多个属性 handle=Entrez.esummary(db='biosample',id='6451159') recs=Entrez.read(handle) attributes=recs['DocumentSummarySet'][' ...

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.