tungufoss / bioinformatics Goto Github PK
View Code? Open in Web Editor NEWCoursera code challanges
License: GNU General Public License v3.0
Coursera code challanges
License: GNU General Public License v3.0
The substring "ana" in "panamabananas$" plays the role of "and" in Watson and Crick’s paper and explains three of the five occurrences of "a" in the repeat "aaaaa" in BWT("panamabananas$$") = "smnpbnnaaaaa$$a". When the Burrows-Wheeler transform is applied to a genome, it converts the genome’s many repeats to runs. As we already suggested, after applying the Burrows-Wheeler transform, we can apply an additional compression method such as run-length encoding in order to further reduce the memory.
Exercise Break There is only one run of length at least 10 in the E. coli genome. How many runs of length at least 10 do you find after applying the Burrows-Wheeler transform to the E. coli genome?
CODE CHALLENGE: Implement the Viterbi algorithm solving the Decoding Problem.
Input: A string x, followed by the alphabet from which x was constructed,
followed by the states States, transition matrix Transition, and emission matrix
Emission of an HMM (Σ, States, Transition, Emission).
Output: A path that maximizes the (unconditional) probability Pr(x, π) over all possible paths π.
Note: You may assume that transitions from the initial state occur with equal probability.
Code Challenge: Solve the String Composition Problem.
Input: An integer k and a string Text.
Output: Compositionk(Text), where the k-mers are written in lexicographic order.
Code Challenge: Solve the String Spelled by a Genome Path Problem.
Code Challenge: Solve the Overlap Graph Problem.
Input: A collection Patterns of k-mers.
Output: The overlap graph Overlap(Patterns), in the form of an adjacency list.
Code Challenge: Solve the De Bruijn Graph from a String Problem.
Input: An integer k and a string Text.
Output: DeBruijnk(Text), in the form of an adjacency list.
Code Challenge: Solve the de Bruijn Graph from k-mers Problem.
Input: A collection of k-mers Patterns.
Output: The adjacency list of the de Bruijn graph DeBruijn(Patterns).
Graded Code Challenge (Optional): Solve the Eulerian Cycle Problem.
Input: The adjacency list of an Eulerian directed graph.
Output: An Eulerian cycle in this graph.
Graded Code Challenge (Optional): Solve the Eulerian Path Problem.
Input: The adjacency list of a directed graph that has an Eulerian path.
Output: An Eulerian path in this graph.
Graded Code Challenge (Optional): Solve the String Reconstruction Problem.
Input: An integer k followed by a list of k-mers Patterns.
Output: A string Text with k-mer composition equal to Patterns. (If multiple answers exist, you may return any one.)
Graded Code Challenge (Optional): Solve the k-Universal Circular String Problem.
Input: An integer k.
Output: A k-universal circular string.
Graded Code Challenge (Optional): Solve the String Reconstruction from Read-Pairs Problem.
Input: Integers k and d followed by a collection of paired k-mers PairedReads.
Output: A string Text with (k, d)-mer composition equal to PairedReads.
Graded Code Challenge (Optional): Solve the Contig Generation Problem.
Input: A collection of k-mers Patterns.
Output: All contigs in DeBruijn(Patterns).
Graded Code Challenge (Optional): Implement StringSpelledByGappedPatterns.
Input: Integers k and d followed by a sequence of (k, d)-mers (a1|b1), … , (an|bn) such that Suffix(ai|bi) = Prefix(ai+1|bi+1) for 1 ≤ i ≤ n-1.
Output: A string Text of length k + d + k + n - 1 such that the i-th (k, d)-mer in Text is equal to (ai|bi) for 1 ≤ i ≤ n (if such a string exists).
Graded Code Challenge (Optional): Implement MaximalNonBranchingPaths.
Input: The adjacency list of a graph whose nodes are integers.
Output: The collection of all maximal nonbranching paths in this graph.
Tree Coloring Problem: Color the internal nodes of a tree given the colors of its leaves.
Input: An adjacency list, followed by color labels for leaf nodes.
Input: Color labels for all nodes, in any order.
Code Challenge: Solve the Tree Coloring Problem.
You can now see that sequencing Tyrocidine B1 from a real spectrum, for which two-thirds of all masses are false, presents a much more difficult problem than sequencing this peptide from the simulated Spectrum25. In the following challenge problem, you will need to further develop the methods we studied in this chapter to analyze a real spectrum.
Final Challenge: Tyrocidine B1 is just one of many known NRPs produced by Bacillus brevis. A single bacterial species may produce dozens of different antibiotics, and even after 70 years of research, there are likely undiscovered antibiotics produced by Bacillus brevis. Try to sequence the tyrocidine corresponding to the real experimental spectrum below. Since the fragmentation technology used for generating the spectrum tends to produce ions with charge +1, you can safely assume that all charges are +1. Return the peptide as a collection of space-separated integer masses.
Continue here as soon as your assembly of the Staph reads has completed.
k N50 #long contigs total length of long contigs
25
55
85
Which assembly performed the best in terms of each of these statistics? Justify your answer.Why do you think that the value you chose performed the best?
(Multiple choice) When you increase the length of k-mers, the de Bruijn graph ____________. Justify your answer.
You will use the Quality Assessment Tool for Genome Assembly QUAST (Gurevich et al, 2013) to evaluate the quality of your assembly using the Staph reference genome as the gold standard.
Download the contigs.fasta file as part of the SPAdes output from the best assembly you chose for question #8 above.
Go to QUAST (http://quast.bioinf.spbau.ru/) and upload your contigs.fasta file with the “Add files” button.
Leave the “Scaffolds” and “Find genes” boxes unchecked and keep the indicator on “Prokaryotic.”
Click on the “Another genome” link underneath “Genome.” Fill in a name and upload the staph_genome.fasta file that we provided for the “Reference” file. (Note: we provide this file as a .txt, you will need to save it as .fasta). Leave the other two inputs (“Genes” and “Operons”) blank and click “Evaluate.”
A link to the report should appear on the right side of the page in a few moments.
1. How many misassemblies were there?
2. How significant is the effect of misassemblies on the resulting assembly?
1. What are NG50 and NGA50?
2. How do they compare with the value of N50 that you previously calculated? Why?
What is the known species of Staphylococcus that is most similar to the species that you assembled?
Exercise Break: Solve the Peptide Encoding Problem for Bacillus brevis and Tyrocidine B1 (Val-Lys-Leu-Phe-Pro-Trp-Phe-Asn-Gln-Tyr). How many starting positions in Bacillus brevis encode this peptide? (Genetic code figure reproduced below.)
Exercise Break: Run ConvolutionCyclopeptideSequencing on Spectrum25 (reproduced below) with N = 1000 and M = 20. Identify the 86 highest-scoring linear peptides. (Return the peptides in integer format separated by a single space, e.g., 123-57-200-143 199-143-121-60)
Counting Peptides with Given Mass Problem: Compute the number of peptides of given mass.
Input: An integer m.
Output: The number of linear peptides having integer mass m.
Suggestion: If you have difficulty solving this problem or getting the runtime down, please return to it after learning more about dynamic programming algorithms in a later chapter.
Exercise Break: Solve the Counting Peptides with Given Mass Problem. Recall that we assume that peptides are formed from the following 18 amino acid masses:
G A S P V T C I/L N D K/Q E M H F R Y W
57 71 87 97 99 101 103 113 114 115 128 129 131 137 147 156 163 186
It turns out that there are trillions of peptides have the same integer mass (1322) as Tyrocidine B1 (figure below). Therefore, BFCyclopeptideSequencing is completely impractical, and we will not even bother asking you to implement it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.