Esempio n. 1
0
def main():
    with open(get_rosalind_data_path('fib')) as file:
        integers = file.readline().split(' ')
        print(fibonacci_sequence(int(integers[0]), int(integers[1])))
Esempio n. 2
0
def main():
    with open(get_rosalind_data_path('rna')) as file:
        dna = DNA(file.read())
        print(format_string(dna))
Esempio n. 3
0
def main():
    with open(get_rosalind_data_path('fib')) as file:
        integers = file.readline().split(' ')
        print(fibonacci_sequence(int(integers[0]), int(integers[1])))
Esempio n. 4
0
def main():
    with open(get_rosalind_data_path('iprb')) as file:
        kmn = list(map(lambda x: int(x), file.readline().split(" ")))
        print(compute(kmn[0], kmn[1], kmn[2]))
Esempio n. 5
0
def main():
    dna_list = FASTADNA.read_list_from_file(get_rosalind_data_path('gc'))
    print(format_string(compute(dna_list)))
Esempio n. 6
0
def main():
    with open(get_rosalind_data_path('iprb')) as file:
        kmn = list(map(lambda x: int(x), file.readline().split(" ")))
        print(compute(kmn[0], kmn[1], kmn[2]))
def main():
    with open(get_rosalind_data_path('recv')) as file:
        dna = DNA(file.read())
        print(format_string(dna))
Esempio n. 8
0
def main():
    with open(get_rosalind_data_path('hamm')) as file:
        dna = DNA(file.readline())
        dna2 = DNA(file.readline())
        print(dna.get_hamming_distance(dna2))
Esempio n. 9
0
def main():
    with open(get_rosalind_data_path('hamm')) as file:
        dna = DNA(file.readline())
        dna2 = DNA(file.readline())
        print(dna.get_hamming_distance(dna2))
Esempio n. 10
0
def main():
    with open(get_rosalind_data_path('prot')) as file:
        rna = RNA(file.readline())
        print(rna.transcribe_to_protein())
Esempio n. 11
0
def main():
    dna_list = FASTADNA.read_list_from_file(get_rosalind_data_path('gc'))
    print(format_string(compute(dna_list)))
Esempio n. 12
0
def main():
    with open(get_rosalind_data_path('subs')) as file:
        DNAs = DNA(file.readline())
        DNAt = DNA(file.readline())
        index_list = map(lambda x: x, DNAs.find_substring_locations(DNAt))
        print(format_string(index_list))
Esempio n. 13
0
def main():
    with open(get_rosalind_data_path('prot')) as file:
        rna = RNA(file.readline())
        print(rna.transcribe_to_protein())