Question: Please give the the code in python. Thank you so much in advance. 4. A dna string is specified as 'gcatgactattocttgac'. What is the 6th

 Please give the the code in python. Thank you so much

Please give the the code in python. Thank you so much in advance.

4. A dna string is specified as 'gcatgactattocttgac'. What is the 6th base from the beginning?, from the end? Answer this question both using negative indexing and also without assuming negative index- ing. Key Ideas:Element extraction using the str[index], negative indexing, len ufunc. 5. Three restriction sites are: (a) Ecorl = gaatto (b) BamHI = ggatec (c) Hind III = aagett Enter a sequence (like AGATTC), say which restriction sites are present? Key Ideas: Testing with the in conjugator, boolean data types. 6. Count the number of a in a dna (say goatgactattccttgac). Key Ideas: Single line if condition in for loop used for increment- ing counts. Strings can be iterated letter by letter in a for loop. 7. List the occurrences of all the bases in a dna string. The output will look like A: 6 C: 4 T: 2 G: 4 8. Make the above action into a function (say basecount (dna)) and allow for the case when both lowercase and uppercase letters may be present in the input(See next problem for ispiration). You can now take the easy track and use the count method for counting the number of appearances of act,g. 9. use the count method to calculate the GC content of dna. The output should appear as %GC Content: 68.24 Key Ideas: C style printing using % operator, float mask. 10. Read the help on string objects and attempt the following for dna strings. (a) replace all occurances of 'a' with 'A' and revert back. (b) return capitalized version

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!