Question: or this question, you will write a program that takes a sequence ( or any string ) and calculates the GC content ( as a
or this question, you will write a program that takes a sequence or any string and calculates the GC
content as a percentage The result of this calculation will then be displayed to the canvas.
You will test your program with three sequences which can be found in aqfiles.zip:
sequencetxt a small region of the dog Leptin gene
sequencetxt the human Sonic Hedgehog gene
sequencetxt the entire Ebola genome
This program is noninteractive, so you wont need functions like setup or draw
Here are the specifications for this problem:
For the purpose of this question, do not worry about ensuring only ATC and G characters are
present in the input sequence. This sequence could in theory be any string but only count the G
and C characters.
Hardcode the input sequence as a string literal at the beginning of your program. To do this, define
a variable and assign it the value of one of the sequences from the files in aqfiles.zip. Since
we havent covered file inputoutput yet just copyandpaste the sequence from the file into your
program.
Use a forloop to count the number of G and C characters in the input sequence using the variable
you defined at the top of your program.
After the forloop calculate what percent of characters in the string were G and Chint: you might
want to use the len function
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
