Question: Hello, I have to make a working score_GC script that works on python.Mainly a script that can calculate final C vs G score in a
Hello, I have to make a working score_GC script that works on python.Mainly a script that can calculate final C vs G score in a dna string. It should read a fasta file, passes DNA to the c_vs_g function, and stores a list of integers
Scoring changes in G versus c content along the length of dna string. First, notice python's indexing along this DNA string. We index starting from zero. These index values are automatically assigned when you save the string to memory. dna = " A T G A T index 0 1 2 3 4 5 6 7 8 Following along that same DNA string, we can score the c versus G content by: starting with a score of zero adding 1 each time we encounter a 'C' subtracting 1 each time we encounter a 'G' (and continue without changing the previous score if you encounter an 'T'.) 'A' or dna = " A G A T C" index 0 1 2 4 5 6 7 nuc_score 0 +1 0 -1 0 +1 0 +1 +1 cumu score 0 1 1 0 0 1 1 2 3 In the table above, cumu_score is the cumulative score since the beginning of the string. Above that I have a nuc_score to show what we add or subtract from the cumulative score at each position. Above that I have the index positions and dna string. The score at index position i=5 is 1. The score increases to 3 by the time we reach the end of the string. * Stop and think: if we have a very long and completely random DNA sequence (where every nucleotide occurs with an equal frequency), what is the predicted final score at the end of the string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
