You will write three functions for the work of a molecular biology laboratory: the size of a band in a gel, the pieces of a cut ring, and the copies in a PCR.
The idea. In a gel, the logarithm of the size falls in a straight line with the distance. A ring cut at sites gives pieces. A PCR multiplies the copies by in each cycle.
Your tasks.
size_from_gel. It takes a ladder, as a dictionary of sizes and distances, and the distance of a band. It fits the line of against the distance by least squares, and gives the size.ring_pieces. It takes the length of the ring and a list of cut sites, and gives the sizes of the pieces, from the largest to the smallest.pcr_copies. It gives the number of copies after some cycles, from some starting molecules, with an efficiency between 0 and 1.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…