Question

Use the list of sequence ["ATATCCG", "TCCG", "ATGTACTG", "ATGGCTG", "ATCA"] as an example, write a program...

Use the list of sequence ["ATATCCG", "TCCG", "ATGTACTG", "ATGGCTG", "ATCA"] as an example, write a program that finds the sequence with the highest GC content (the percentage of G and C nucleotides) among a list of sequences. The program prints the sequence and its GC content. Using python, thanks!

Homework Answers

Answer #1
def gc_percentage(dna):
    count = 0
    for ch in dna:
        if ch in "GC":
            count += 1
    return (count * 100) / len(data)


data = ["ATATCCG", "TCCG", "ATGTACTG", "ATGGCTG", "ATCA"]
max_gc_index = 0
for i in range(len(data)):
    if gc_percentage(data[i]) > gc_percentage(data[max_gc_index]):
        max_gc_index = i

print("sequence with maximum GC content is " + data[max_gc_index])
print("It's GC percentage is " + str(gc_percentage(data[max_gc_index])))

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a Python program prints out the unique elements of a list lst in a sorted...
Write a Python program prints out the unique elements of a list lst in a sorted manner (i.e it removes duplicates from the list). For example, if list is [10,20,30,20,10,50,60,40,80,50,40], the output should be [10, 20, 30, 40, 50, 60, 80].?
Write a Python program that does the following: Creates a list with the values 2,4,6,8,10 Gets...
Write a Python program that does the following: Creates a list with the values 2,4,6,8,10 Gets a number as input from the user Prints 'in the list' if the input number is a value in the list, and 'not in the list' otherwise
Write a Python program using while loop that finds and prints the sum of this geometric...
Write a Python program using while loop that finds and prints the sum of this geometric series. 1 + 2 +4 +8 + … + 1024
Write a python program to determine the smallest number in a sequence and illustrate it with...
Write a python program to determine the smallest number in a sequence and illustrate it with a table showing the values of the variables for each step. use the sequence​ {7,5,3,2,4}
TATA-Pribnow box: Motifs TATAAA or TATAAT of six nucleotides, known as TATA boxes, are an essential...
TATA-Pribnow box: Motifs TATAAA or TATAAT of six nucleotides, known as TATA boxes, are an essential part of a promoter site on DNA for transcription to occur. Write a Python program that finds all the TATA boxes in a DNA sequence and reports their types and locations. If there is no such a box, your program should report that as well. Test your program on several DNA sequences with none, and with several TATA boxes of both types. Please use...
Question1: Write a Python Program that asks for the grades of 5 quizzes and then prints...
Question1: Write a Python Program that asks for the grades of 5 quizzes and then prints the highest grade. [6 Marks] Question2: Write a Python Program that does the following tasks. [8 Marks] Create an empty list Ask the user for 5 positive numbers and append them to the list Find and print the sum of all the numbers in the list Delete the last element from the list and then print the list Question3: Consider you have the following...
Use C++ only. 1) Write a full program that will take a list of years and...
Use C++ only. 1) Write a full program that will take a list of years and it will check if they are leap years. As soon as the program finds the first leap year from the list, the program terminates. The program also terminates when it reads a -1. Please make use of the do . . . while loop structure and the break statement. Example of sample runs: Enter a list of years: 1841 1854 1862 1875 1879 1892...
Write a python program that reads a word list and prints out all the anagrams in...
Write a python program that reads a word list and prints out all the anagrams in the word list. In earlier exercises you saw how to read a word list. Also, in earlier examples we saw how the sorted characters of a word are a useful canonical representation of an anagram (Hint: Therefore, useful as a key).
Attached is a text file full of names. Write a program that prompts the user to...
Attached is a text file full of names. Write a program that prompts the user to type in a name. If the name appears in the list of names, the program prints a message indicating the name was found. If the name entered by the user is not in the database, the program prints a different message indicating the name was not found. The program will continue prompting the user and searching for names until the user enters "quit". The...
Write a Python program using that takes a number as input and then prints if the...
Write a Python program using that takes a number as input and then prints if the number is even or odd. The program should use a function isEven that takes a number as a parameter and returns a logical value true if the number is even, false otherwise.