【问题标题】:rdkit ArgumentError: Python argument types in rdkit.Chem.rdMolDescriptors.GetAtomPairFingerprint(str) did not match C++ signature:rdkit ArgumentError:rdkit.Chem.rdMolDescriptors.GetAtomPairFingerprint(str) 中的 Python 参数类型与 C++ 签名不匹配:
【发布时间】:2021-11-07 07:12:11
【问题描述】:

我目前正在处理肽数据,并试图从肽数据集中提取原子对指纹,以用于机器学习分类器。

我已将我的肽序列设置为一个列表(所有这些序列都转换为 SMILES 字符串),现在正在遍历该列表以为每个肽创建一个指纹。但我不知道出了什么问题。 注意:我正在使用 Google Colab 来完成此操作。

这是我的代码:

pos = "/content/drive/MyDrive/pepfun/Training_format_pos (1).txt"

# pos sequences extract into list
f = open(pos, 'r')
file_contents = f.read()
data = file_contents
f.close()

newdatapos = data.splitlines()
print(newdatapos)

!pip install rdkit-pypi
import rdkit
from rdkit import Chem

# fingerprints for pos sequences

from rdkit.Chem.AtomPairs import Pairs
fingerprintpos = []
for item in newdatapos:
  converteditem = rdkit.Chem.MolToSmiles(Chem.MolFromFASTA(item))
  atompos = Pairs.GetAtomPairFingerprint(converteditem)  
  fingerprintpos.append(atompos)

print(fingerprintpos)

非常感谢任何建议。谢谢!

【问题讨论】:

    标签: python google-colaboratory bioinformatics rdkit cheminformatics


    【解决方案1】:

    指纹是从 mol 对象而非 SMILES 计算的。 converteditem = Chem.MolFromFASTA(item) 应该可以工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-04
      • 1970-01-01
      • 2023-03-26
      • 2022-10-19
      • 1970-01-01
      • 2018-01-12
      • 2018-03-24
      • 2017-10-05
      相关资源
      最近更新 更多