這是導致錯誤的腳本的一部分:
File "/home/bcramer/workdir-aptaNET/feature_extraction.py", line 28, in <module>
apt=raw_input('GGGAGWAVIPV')
NameError: name 'raw_input' is not defined
# ##########################################
##pseAAC encoding
from sys import argv
import string
#20 native amino acids according to the alphabetical order of their single-letter codes
aa_20 = ['A','C','D','E','F','G','H','I','K','L','M','N','P','Q','R','S','T','V','W','Y']
#count_amino_acids
apt=raw_input('GGGAGWAVIPV')
target=raw_input("SGFRKMAFPSGKVEGCMVQVTCGTTTLNGLWLDDVVY")
下面是腳本作者撰寫的原始代碼:
#count_amino_acids
apt=raw_input('Please Enter Aptamer Sequence:')
target=raw_input("Please Enter Protein Sequence:")
uj5u.com熱心網友回復:
raw_input是 Python 2 中可用的函式。Python 3 將其重命名為input. 您應該相應地修改您的腳本,或者使用 2.x 代的 Python 版本(可能是最新的 2.7)。
uj5u.com熱心網友回復:
問題是,raw_input是input在Python 3。
apt=input('GGGAGWAVIPV')
target=input("SGFRKMAFPSGKVEGCMVQVTCGTTTLNGLWLDDVVY")
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/384553.html
上一篇:區塊鏈游戲是什么
