python - Motif search with Gibbs sampler -
i beginner in both programming , bioinformatics. so, appreciate understanding. tried develop python script motif search using gibbs sampling explained in coursera class, "finding hidden messages in dna". pseudocode provided in course is: gibbssampler(dna, k, t, n) randomly select k-mers motifs = (motif1, …, motift) in each string dna bestmotifs ← motifs j ← 1 n ← random(t) profile ← profile matrix constructed strings in motifs except motifi motifi ← profile-randomly generated k-mer in i-th sequence if score(motifs) < score(bestmotifs) bestmotifs ← motifs return bestmotifs problem description: code challenge: implement gibbssampler. input: integers k, t, , n, followed collection of strings dna. output: strings bestmotifs resulting running gibbssampler(dna, k, t, n) 20 random starts. remember use pseudocounts! sample input : 8 5 100 cgcccctctcgggggtgttcagt...