Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This piece of python program class dnaString (str): def __new__(self,s): return str.__new__(self,s.upper()) def length (self): return (len(self)) def getATCG (self,num_A,num_T,num_C,num_G): num_A = self.count(A) num_T =

This piece of python program class dnaString (str): def __new__(self,s): return str.__new__(self,s.upper()) def length (self): return (len(self)) def getATCG (self,num_A,num_T,num_C,num_G): num_A = self.count("A") num_T = self.count("T") num_C = self.count ("C") num_G = self.count ("G") return ( (self.length(), num_A, num_T, num_G, num_C) )

def printnum_A (self): print ("Adenine base content A: {0}".format(self.count("A"))) def printnum_T (self): print ("Adenine base content T: {0}".format(self.count("T"))) def printnum_C (self): print ("Base content C: {0}".format(self.count("C"))) def printnum_G (self): print ("Base content G: {0}".format(self.count("G")))

dna = input("Enter a dna sequence: ") x=dnaString(dna) x.printnum_T() x.printnum_A() x.printnum_G() x.printnum_C()

Only count the first line of this CTCGCGTTGCAGGCCGGCGTGTCGCGCAACGACGTGTGGGGCCTGACGGGCAGGGAGGATCTCGGCGGCG CCAACTATGCGGTCTTTCGGCTCGAAAGCCAGTTCCAGACCTCCGACGGCGCGCTGACCGTGCCCGGCTC CGCATTCAGTTCGCAAGCCTACGTCGGGCTCGGCGGCGACTGGGGGACCGTGACGCTCGGGCGCCAGTTC GATTTCGTCGGCGATCTGATGCCGGCTTTCGCGATCGGCGCGAACACGCCGGCCGGCCTGCTCGCGTGGG GCTTGCCGGCGAATGCGTCGGCGGGCGGTGCGCTCGACAACCGCGTGTGGGGCGTCCAGGTGAACAATGC How can I modify the program for it to count all lines?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

4. Identify cultural variations in communication style.

Answered: 1 week ago

Question

9. Understand the phenomenon of code switching and interlanguage.

Answered: 1 week ago

Question

8. Explain the difference between translation and interpretation.

Answered: 1 week ago