T*GRSLR*L
RKVDLCDSL
[...]
但是,当我在Python中从Cython包装器运行代码时,字符串填充如下:
b'T*GRSLR*R\x8f\x96\x01'
b'RKVDLCDSR\x8f\x96\x01'
[...]
有时这只发生在一个序列上,有时发生在所有序列上。你知道吗
我使用下面的Cython代码与我的C++代码进行接口:
# file: sixframe.pyx
from libcpp.string cimport string
from libcpp.vector cimport vector
cdef extern from "six_frame.cpp":
cdef void initCodonTable()
cdef vector[string] sixFrame(string seq)
def six_frame(bytes seq):
return sixFrame(seq)
initCodonTable()
我的C++函数的签名是:
// file: six_frame.cpp
vector<string> sixFrame(string seq){
...
}
这个错误看起来好像我使用了错误的类型,并且没有正确检测到字符串的结尾。我怀疑错误是在Cython代码中,因为C++可执行文件是按照预期的方式工作的。有人知道这里出了什么问题吗?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐