Consensus and Profile (ID: CONS)

Problem

給定數條等長DNA序列(存於 FASTA 檔),求其 consensus string 及各位置的鹼基統計量

Given: A collection of at most 10 DNA strings of equal length (at most 1 kbp) in FASTA format. 

Return: A consensus string and profile matrix for the collection. (If several possible consensus strings exist, then you may return any one of them.)

 示範數據

# input
>Rosalind_1
ATCCAGCT
>Rosalind_2
GGGCAACT
>Rosalind_3
ATGGATCT
>Rosalind_4
AAGCAACC
>Rosalind_5
TTGGAACT
>Rosalind_6
ATGCCATT
>Rosalind_7
ATGGCACT

# output
ATGCAACT
A: 5 1 0 0 5 5 0 0
C: 0 0 1 4 2 0 6 1
G: 1 1 6 3 0 1 0 0
T: 1 5 0 0 0 1 1 6

Finding a Motif in DNA (ID: SUBS)

Problem

給定字串 s 與 t,其中 t 的長度小於等於 s,求 s 與 t 一致之子序列的起始位置。

Given: Two DNA strings s and t (each of length at most 1 kbp).

Return: All locations of t as a substring of s.

示範數據

# input
s = GATATATGCATATACTT
t = ATAT
# output
2 4 10

讀後感|人際的法則 — 怎麼面對他人求助?

長大成人是在情感上付出努力得來的

《人際的法則:一點就通,連難相處的人都可以應對》

The Rules of People: A personal code for getting the best from everyone

Richard Templar(理查.譚普勒),日出出版 (2021 年 08 月 11 日)

Back to top