# Python DNA Free Energy, Enthalpy, and Energy Analyzer

Online tutoring services

Need help with this question or any other Computer Science assignment help task? Click on the button below to to hire an expert cheap.

I need someone to write this code for me ASAP. I heard that this company writes code for others. Please let me know if you can do this (and please make sure when you commit, you commit) and how much it would cost. Realistically, it should not take too long. I would need it by 9/21/2020 11:59 PM (but I can be a little flexible). I am willing to pay around \$140 for this project. Thank you.

DNA Thermodynamic Project Instructions:

Take the code I attached in MatLab (AllawiThermo) and copy it into Python Code.

This is the project. However, this project should be simple. It is just taking the program in MatLab and COPYING it over in Python.

Then you should be able to input these values below and get the following outputs:

For example. If I were to input 'AATTG' then for deltaH, deltaS, and deltaG I would get -29.1000, -87.6000, and -1.9200, respectively.

'AATTG' :deltaH = -29.1000; deltaS = -87.6000; deltaG37 = -1.9200

'AAAAAAA': deltaH = -42.8000; deltaS = -126.4000; deltaG37 = -3.5400

'AATTGGCC': deltaH = -54.9000; deltaS = -151.8000; deltaG37 = -7.8400"

I attached the paper from which the values are from (bp thermo 1997, the python code that I wrote (which is incomplete), and the correct MatLab code that he wrote.

Alright here is the project and what I have done so far.

"Take a look at the attached paper (bp thermo 1997). It's quite dense, but the important part is the values in Table 1. Take a look and see if you can understand how to calculate the three values: deltaG, deltaH and deltaS (free energy, enthalpy and entropy) from an arbitrary DNA sequence. Let's do it in Python so it's portable--I use Jupyter, but feel free to use whatever build works for you. I can check your answers in Matlab, or you can use the oligo analyzer tool at IDT DNA (https://www.idtdna.com/site/account/login?returnurl=%2Fcalc%2Fanalyzer) to check.

For now, just practice reading the paper and see if you can build a thermodynamics method in Python that takes in a DNA sequence and spits out the three numbers. Don't forget to add the strand initiation energies. From it, see if you can calculate the parameters of the three unique DNA strands in the second paper I attached. Feel free to ask any questions you have--I'm happy to guide."

I attached the bp thermo 1997 paper below (TABLE 1 REMEMBER).

Alright, I wrote a method to do this called "Python Free Energy, Enthalpy, and Entropy" and attached the python file for that.

Then, this is the most recent update I got.

"We're getting close. Check your syntax at the beginning--using OR at the beginning for both initiation and termination means that the correction will only happen once. You should check the first letter, decide on the correction, and also check the last letter. This means that there will be a correction on each end.

Also, the checking for pairs is close, but some of the complements are off ('CT' and 'AG' are in the same if loop, etc.). I've attached my version of the code in matlab, and you can see what syntax I'm using (with different coding language). See if you can try to match the two. It should open in notepad or the like.

Some numbers to calibrate the code:

'AATTG' :deltaH = -29.1000; deltaS = -87.6000; deltaG37 = -1.9200

'AAAAAAA': deltaH = -42.8000; deltaS = -126.4000; deltaG37 = -3.5400

'AATTGGCC': deltaH = -54.9000; deltaS = -151.8000; deltaG37 = -7.8400"

I attached the file of his code in MatLab (AllawiThermo) for you to copy off of. Basically. Take the MatLab program that he wrote and put it into python (following my coding guidelines), and calibrate the code using the numbers that I gave you.

Let me know if you have any questions. I need this code done ASAP.

## Get Help With a similar task to - Python DNA Free Energy, Enthalpy, and Energy Analyzer

function [ deltaH, deltaS, deltaG37 ] = AllawiThermo( oligo ) %Calculates nearest-neighbor model thermodynamics based on Allawi 1997 %Assumes 1M NaCl %Assumes WC pairing (for now?) numBases = length(oligo); deltaH = 0.0; %kcal/mol deltaS = -1.4; %eu + symmetry correction deltaG37 = 0.4; %kcal/mol + symmetry correction %strand initiation if strcmp(oligo(1), 'G') || strcmp(oligo(1), 'C') deltaH = deltaH + 0.1; deltaS = deltaS - 2.8; deltaG37 = deltaG37 + 0.98; elseif strcmp(oligo(1), 'A') || strcmp(oligo(1), 'T') deltaH = deltaH + 2.3; deltaS = deltaS + 4.1; deltaG37 = deltaG37 + 1.03; else error('non-canonical terminal base'); end %strand initiation (terminal) if strcmp(oligo(numBases), 'G') || strcmp(oligo(numBases), 'C') deltaH = deltaH + 0.1; deltaS = deltaS - 2.8; deltaG37 = deltaG37 + 0.98; elseif strcmp(oligo(numBases), 'A') || strcmp(oligo(numBases), 'T') deltaH = deltaH + 2.3; deltaS = deltaS + 4.1; deltaG37 = deltaG37 + 1.03; else error('non-canonical terminal base'); end %nearest-neighbor calculations for i = 1:numBases-1 pair = [oligo(i) oligo(i+1)]; if strcmp(pair, 'AT') deltaH = deltaH - 7.2; deltaS = deltaS - 20.4; deltaG37 = deltaG37 - 0.88; elseif strcmp(pair, 'TA') deltaH = deltaH - 7.2; deltaS = deltaS - 21.3; deltaG37 = deltaG37 - 0.58; elseif strcmp(pair, 'CG') deltaH = deltaH - 10.6; deltaS = deltaS - 27.2; deltaG37 = deltaG37 - 2.17; elseif strcmp(pair, 'GC') deltaH = deltaH - 9.8; deltaS = deltaS - 24.4; deltaG37 = deltaG37 - 2.24; elseif strcmp(pair, 'AA') || strcmp(pair, 'TT') deltaH = deltaH - 7.9; deltaS = deltaS - 22.2; deltaG37 = deltaG37 - 1; elseif strcmp(pair, 'CA') || strcmp(pair, 'TG') deltaH = deltaH - 8.5; deltaS = deltaS - 22.7; deltaG37 = deltaG37 - 1.45; elseif strcmp(pair, 'GT') || strcmp(pair, 'AC') deltaH = deltaH - 8.4; deltaS = deltaS - 22.4; deltaG37 = deltaG37 - 1.44; elseif strcmp(pair, 'CT') || strcmp(pair, 'AG') deltaH = deltaH - 7.8; deltaS = deltaS - 21.0; deltaG37 = deltaG37 - 1.28; elseif strcmp(pair, 'GA') || strcmp(pair, 'TC') deltaH = deltaH - 8.2; deltaS = deltaS - 22.2; deltaG37 = deltaG37 - 1.3; elseif strcmp(pair, 'GG') || strcmp(pair, 'CC') deltaH = deltaH - 8.0; deltaS = deltaS - 19.9; deltaG37 = deltaG37 - 1.84; else error(['orthogonal base detected at ' i]); end end end
# this function will calculate the entropy, enthalpy and energy released. def calc(str) : # Initialising the values with 0. h = 0 s = -1.4 g = 0.4 if (str == 'A' or str[len(str) - 1] == 'A' or str == 'T' or str[len(str) - 1] == 'T' ): initH = 2 * 2.3; initS = 2 * 4.1; initG = 2 * 1.03; if (str == 'G' or str[len(str) - 1] == 'G' or str == 'C' or str[len(str) - 1] == 'C'): initH = 2 * 0.1; initS = 2 * -2.8; initG = 2 * 0.98; #Taking first character of DNA temp = str #Take pairs from first element to last element for i in range(1, len(str)): temp1 = f'{temp}{str[i]}' #using standard values from chart given in BP thermo paper if temp1 == 'AA' or temp1 == 'TT': h = h + (-7.9) s = s + (-22.2) g = g + (-1) elif temp1 == 'AT' : h = h + (-7.4) s = s + (-20.4) g = g + (-0.88) elif temp1 == 'TA' : h = h + (-7.2) s = s + (-21.3) g = g + (-0.58) elif temp1 == 'CA' : h = h + (-8.5) s = s + (-22.7) g = g + (-1.45) elif temp1 == 'GT' : h = h + (-8.4) s = s + (-22.4) g = g + (-1.44) elif temp1 == 'CT' : h = h + (-7.8) s = s + (-21) g = g + (-1.28) elif temp1 == 'GA' : h = h + (-8.2) s = s + (-22.2) g = g + (-1.30) elif temp1 == 'CG' : h = h + (-10.6) s = s + (-27.2) g = g + (-2.17) elif temp1 == 'GC' : h = h + (-9.8) s = s + (-24.4) g = g + (-2.24) elif temp1 == 'GG' or temp1 == 'CC': h = h + (-8.0) s = s + (-19.9) g = g + (-1.84) elif temp1 == 'AT' or temp1 == 'TG': h = h + (-2.5) s = s + (-8.3) g = g + (0.07) #Moving to next character of DNA temp = str[i] #In these adding initial values which are initial energy, Terminal energy and #Symmetry h = h + initH s = s + initS g = g + initG print (h) print (s) print (g) #Returning the value return h , s , g #calling the function to get values. calc('AATTGTGTGTCCACGTGCA')

## Related Questions

Similar orders to Python DNA Free Energy, Enthalpy, and Energy Analyzer
4
Views
0
Make code and test for a pac man type game.
At the very least I would need the StudentAttackerController.Java code. The code would need to be tested by the “TestAgent - Scored” configuration that would run 100 trials and give an average score at the end. The average score for the code need to have a score 6500 or higher....
14
Views
0
Gameboard with hidden tiles; three guesses to pick all safe squares; gameboard based on files from user input (included)
For this assignment, you will be writing a game. The rules of the game are simple you have a game board with hidden tiles. You have to make three guesses if you pick all safe squares, you win, if you select a bad square, you lose. All game boards have are square, meaning both sides have the same length. The game board size will never be larger than 25 or below 1. The gameboard contains only 4 possible values (3 are requirements, the 4th is for bonus). If the square contains a 'S' it is safe. Meaning you have successfully made one guess. If the square contains a 'B' you lose. Meaning the game is over. If the square contains a 'R' you must pick again, this guess doesn’t count towards your guesses. If the square contains a 'C' it safely clears the area. (See bonus information in code) A game board file has the format ( for a size of 3. ) 3 SSS SRS SBS The game ends after successfully guessing three safe squares or guessing a losing square. After each guess, your program should display the contents of the gameboard square and print the corresponding message. Assignment Requirements Unlike previous examples, this assignment provides a starting point. Would you please c...
7
Views
0 