本文整理汇总了Python中Interface.Interface.align方法的典型用法代码示例。如果您正苦于以下问题:Python Interface.align方法的具体用法?Python Interface.align怎么用?Python Interface.align使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Interface.Interface
的用法示例。
在下文中一共展示了Interface.align方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: align
# 需要导入模块: from Interface import Interface [as 别名]
# 或者: from Interface.Interface import align [as 别名]
def align(self, arglist):
"""Arguments: [filename[,num_of_align,[lambda[,xi[,mu[,nu,[,nuc_per_rotation, [Seq1, Seq2]]]]]]]]
aligns the computed BS or optional the BS from a gff file
filename specifies a file in gff format is you want to be aligned
num_of_align specifies how many alignments you want. (Default 3)
lambda Bonus factor for hit (Default 2)
xi Penalty factor for rotation (Default 1.0)
mu Penalty factor for average distance between sites (Default 0.5)
nu Penalty factor for distance difference between sites (Default 1.0)
nuc_per_rotation specifies how many nucletides there are per rotation. (Default 10.4)
Seq1,Seq2 Sequences to be aligned.
If you want to skip a argument just write '.' for it.
If you use '.' as filename the local data are aligned."""
try:
[filename, num_of_align, Lambda, xi,
mu, nu, nuc_per_rotation,Seq1,Seq2]=(arglist + ['.']*(9-len(arglist)))[:9]
if num_of_align=='.':
num_of_align=3
if Lambda=='.':
Lambda=2.0
if xi=='.':
xi=1.0
if mu=='.':
mu=0.5
if nu=='.':
nu=1.0
if nuc_per_rotation=='.':
nuc_per_rotation=10.4
if Seq1=='.':
Seq1=None
if Seq2=='.':
Seq2=None
try:
if not Interface.align(self, filename, int(num_of_align),
float(Lambda), float(xi),
float(mu), float(nu),
float(nuc_per_rotation),Seq1,Seq2):
print "No alignment for a reason or an other"
except AttributeError,val:
if len(val.args)==1 or (len(val.args)>1 and len(val.args[1])<2):
print val.args[0]
else:
msg,seqs=val
# This function is expected to be defined in subclass
firstSeq,secondSeq=self.selectTwoSequences(msg,seqs)
if not Interface.align(self, filename, int(num_of_align),
float(Lambda), float(xi),
float(mu), float(nu),
float(nuc_per_rotation),
firstSeq,secondSeq):
print "No alignment for a reson or an another"
except ValueError,e:
print "Error: unallowed arguments passed to 'align'",e