English 中文(简体)
多位公平原则(最常见)?
原标题:Multiple Sequence Alignment (Longest Common Subsequence)?

这正是我想要做的:

• 两条以上线和“沥青”(无脱氧核糖核酸/RNA序列或类似体,只是每条1 000件)

我已经做了一些与配对(两套)的工作,然而,“gaps”在试图把一个以上奶粉结合起来时给我造成了一些问题。

<<>Example(目前测试一次):

ABCDEF
ABGHCEEF
AJKLBCDYEOF

AB--CDEF
ABGHCEEF
=======================
AB--C-EF

A-B--C--E-F
AJKLBCDYEOF
=======================
A----C--E-F

www.un.org/spanish/ecosoc 另一个(更说明性)的例子:

http://nest.drkameleon.com
http://www.google.com
http://www.yahoo.com

http://nest.drkameleon.com
http://-www.--google--.com

=======================
http://----.------le--.com

http://----.------le--.com
http://-www.-----yahoo.com

=======================
http://----.----------.com

www.un.org/spanish/ecosoc 目前做的是:

  • Sort the strings (longer strings come first in the list)
  • Align the first pair : A-B and get the result (let s say R1)
  • Then align the second pair : R1 and C (result in R2)
  • Then align the third pair : R2 and D
  • And so on...

因此,你们的思想是什么? 我怎么办? 是否有更好的办法? (当然必须......)

然而,在Perl/Python或大致如此的情况下,任何类型的法典/参考都不会受到欢迎!

最佳回答

I think you may be able to cast this problem as a more general string diff problem instead of a string alignment. Consider how GNU diff is used for finding differences between two files, and use the same algorithms as are used to perform an N-way diff.

我不敢肯定这种做法的时间/表面复杂性是否适合你们的需要,但至少可以这样考虑这个问题。

问题回答

There is an algorithm based on Levenshtein algorithm to compute the longest common sequence, with optional spaces. Not sure if that helps.





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签