@@ -0,0 +1,1914 @@
+'''%0AWritten by Cham K.%0AJune 16th 2015%0A'''%0A%0Afrom sequence_manipulation import nucleotide_count%0A%0Adef nucleotide_composition(sequence, base):%0A    ''' (str, str) -%3E (float)%0A    Returns the amount (percentage rounded to 2 decimal places) of a specified nitrogenous base (A, T, C, or G) in a DNA sequence.%0A    Can process upper-case and lower-case sequence input with or without whitespace characters.%0A%0A    %3E%3E%3Enucleotide_composition('G A T A C C', 'A')%0A    33.33%0A    %3E%3E%3Enucleotide_composition('gaataaccgatac', 'T')%0A    15.38%0A    '''%0A    module = nucleotide_count%0A    A = module.nucleotide_count(sequence, 'A')%0A    T = module.nucleotide_count(sequence, 'T')%0A    C = module.nucleotide_count(sequence, 'C')%0A    G = module.nucleotide_count(sequence, 'G')%0A    total_bases = A + T + C + G%0A%0A    if base == 'A':%0A        return float(%22%25.2f%22 %25 ((A/total_bases)*100))%0A    if base == 'T':%0A        return float(%22%25.2f%22 %25 ((T/total_bases)*100))%0A    if base == 'C':%0A        return float(%22%25.2f%22 %25 ((C/total_bases)*100))%0A    if base == 'G':%0A        return float(%22%25.2f%22 %25 ((G/total_bases)*100))%0A    else:%0A        return %22ERROR: Null or invalid input recieved for base argument. Base value can be 'A', 'T', 'C', or 'G'.%22%0A    %0Adef total_nucleotide_composition(sequence):%0A    ''' (str, str) -%3E (dict)%0A    Returns a dictionary containing percent composition values (rounded to 2 decimal places) of all bases (A, T, C, and G) in a DNA sequence.%0A    Can process upper-case and lower-case sequence input with or without whitespace characters.%0A    %0A    %3E%3E%3Etotal_nucleotide_composition('G A T A C C')%0A    %7B'G': 16.67, 'C': 33.33, 'T': 16.67, 'A': 33.33%7D%0A    %3E%3E%3Etotal_nucleotide_composition('gaataaccgatac')%0A    %7B'A':46.15, 'T':15.38, 'C':15.38, 'G':15.38%7D%0A    '''%0A    return %7B'A':nucleotide_composition(sequence, 'A'), 'T':nucleotide_composition(sequence, 'T'), 'C':nucleotide_composition(sequence, 'C'), 'G':nucleotide_composition(sequence, 'G')%7D%0A

Create nucleotide_composition.py