Rosalind第30题:Finding a Spliced Motif

Problem

subsequence of a string is a collection of symbols contained in order (though not necessarily contiguously) in the string (e.g., ACG is a subsequence of TATGCTAAGATC). The indices of a subsequence are the positions in the string at which the symbols of the subsequence appear; thus, the indices of ACG in TATGCTAAGATC can be represented by (2, 5, 9).

As a substring can have multiple locations, a subsequence can have multiple collections of indices, and the same index can be reused in more than one appearance of the subsequence; for example, ACG is a subsequence of AACCGGTT in 8 different ways.

Given: Two DNA strings  and  (each of length at most 1 kbp) in FASTA format.

Return: One collection of indices of  in which the symbols of  appear as a subsequence of . If multiple solutions exist, you may return any one.

亚序列的字符串的是字符串中包含在顺序(尽管不一定连续)符号的集合(例如,ACG是T的子序列TG Ç TAA ģ ATC)。的索引的子序列的是该位置的字符串在其中的子序列的符号出现; 因此,TATGCTAAGATC中ACG的索引可以用(2,5,9)表示。

由于一个子串可以具有多个位置,一个子序列可以具有多个索引集合,并且同一索引可以在该子序列的多个外观中重复使用;例如,ACG是AACCGGTT的子序列,具有8种不同的方式。

给定:两个DNA串 ,(每个长度最多1 kbp)为FASTA格式

返回值:一组索引,其中的符号 显示为的子序列。如果存在多个解决方案,则可以返回任何一个。

 

Sample Dataset

>Rosalind_14
ACGTACGTGACG
>Rosalind_18
GTA

Sample Output

3 8 10
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值