GC Content 3 (Making Choices)
As part of the GC Content 2 problem you wrote a function to calculate the GC-content of a DNA sequence. Improve this function by making two additions/ changes to it:
- Allow the function to handle both lower case and upper case sequences
- If the number of bases in the DNA sequence is less than 100 have the function also print the following string: “Warning: The sequence is less than 100 base pairs long and therefore the calculated GC content may not accurately reflect that of the the broader region of the genome.”
Use this function to print the output for the following sequences:
a. ctgccctgcccctggagggtggccccaccggccgagacag
b. ACAAGATGCCATTGTCCCCCGGCCTCCTGCTGCTGCTGCTCTCCGGGGCCACGGCCACCGCTGCCCTGCCCCTGGAGGGTGGCCCCACCGGCCGAGACAGCGAGCATATGCAGGAAGCGGCAGGAATAAGGAAAAGCAGCCTCCTGACTTTCCTCGCTTGGTGGTTTGAGTGGACCTCCCAGGCCAGTGCCGGGCCCCTCATAGGAGAGGAAGCTCGGGAGGTGGCCAGGCGGCAGGAAGGCGCACCCCCCCAGCAATCCGCGCGCCGGGACAGAATGCCCTGCAGGAACTTCTTCTGGAAGACCTTCTCCTCCTGCAAATAAAACCTCACCCATGAATGCTCACGCAAGTTTAATTACAGACCTGAA
c. ccctgcccctggagggtctgccctgcccctggagggtctgccctgcccctggagggtctgccctgcccctggagggtctgccctgcccctggagggttgc
d. CTGCAGGAACTTCTTCTGGAAGACCTTCTCCTCCTGCAAATAAAACCTCACCCATGAATGCTCACGCAAG