rosalind
Rosalind - Transitions and Transversions
rosalindProblem: Please find the problem here. Solution: This is just a counting exercise Code:
Rosalind - Enumerating Oriented Gene Orderings
rosalindProblem: Please find the problem here. Solution: Like the previous problem, we use a recursive routine to generate all permutations. For each permutation, we will use another recursion to give each element a sign. Code:
Rosalind - Interleaving Two Motifs
rosalindProblem: Please find the problem here. Solution: Again, using the matrix generated by the Levenshtein’s edit distance algorithm, we can compute the shortest common super sequence. Code:
Rosalind - Edit Distance Alignment
rosalindProblem: Please find the problem here. Solution: Again, using the matrix generated by the Levenshtein’s edit distance algorithm, we can compute the alignment. Code:
Rosalind - Edit Distance
rosalindProblem: Please find the problem here. Solution: After implementing the Levenshtein’s edit distance algorithm, it is time to use it :) Code:
Rosalind - Finding a Shared Spliced Motif
rosalindProblem: Please find the problem here. Solution: This is the classic longest common subsequence problem, it can be solved using the Levenshtein edit distance algorithm. If we disallow replacing characters, then the edit can be visualized as an alignment of two strings as follow: A A C C T T G G A C A C T G T G A When the first string has a gap, this is an insertion operation.
Rosalind - Introduction to Set Operations
rosalindProblem: Please find the problem here. Solution: This is rather straightforward. By making the input sets hash tables, we can do these set operations fast. Code:
Rosalind - Finding a Spliced Motif
rosalindProblem: Please find the problem here. Solution: To find the corresponding indexes, we initialize two pointers to the beginning of both strings. Walk the sequence pointer one by one, and walk the subsequence pointer only when there is a match. This way we will find all the indexes. Code:
Rosalind - Counting Subsets
rosalindProblem:
Please find the problem here.
Solution:
The number of subsets of a set of size
Rosalind - Introduction to Random Strings
rosalindProblem:
Please find the problem here.
Solution:
As we were told in the description, the probability of getting ‘A’ or ‘T’ is