Problem
For a collection of strings, a larger string containing every one of the smaller strings as a substring is called a superstring.
By the assumption of parsimony, a shortest possible superstring over a collection of reads serves as a candidate chromosome.
Given: At most 50 DNA strings of approximately equal length, not exceeding 1 kbp, in FASTA format (which represent reads deriving from the same strand of a single linear chromosome).
The dataset is guaranteed to satisfy the following condition: there exists a unique way to reconstruct the entire chromosome from these reads by gluing together pairs of reads that overlap by more than half their length.
Return: A shortest superstring containing all the given strings (thus corresponding to a reconstructed chromosome).
对于字符串集合,将包含较小字符串中的每一个作为子字符串的较大字符串称为superstring。
给定的:最多50个FASTA格式的,长度大致相等,不超过1 kbp的DNA字符串 (代表来自单个线性染色体同一链的读数)。
保证数据集满足以下条件:存在一种独特的方法,可以通过将重叠长度超过一半长度的成对读段粘合在一起,从这些读段中重建整个染色体。
返回值:包含所有给定字符串的最短超字符串(因此对应于重建的染色体)。
Sample Dataset
>Rosalind_56 ATTAGACCTG >Rosalind_57 CCTGCCGGAA >Rosalind_58 AGACCTGCCG >Rosalind_59 GCCGGAATAC
Sample Output
ATTAGACCTGCCGGAATAC