コード例 #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])))
コード例 #2
0
def main():
    with open(get_rosalind_data_path('rna')) as file:
        dna = DNA(file.read())
        print(format_string(dna))
コード例 #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])))
コード例 #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]))
コード例 #5
0
def main():
    dna_list = FASTADNA.read_list_from_file(get_rosalind_data_path('gc'))
    print(format_string(compute(dna_list)))
コード例 #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]))
コード例 #7
0
def main():
    with open(get_rosalind_data_path('recv')) as file:
        dna = DNA(file.read())
        print(format_string(dna))
コード例 #8
0
ファイル: hamm_distance.py プロジェクト: ackellyb/Bioinfo
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))
コード例 #9
0
ファイル: hamm_distance.py プロジェクト: ackellyb/Bioinfo
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))
コード例 #10
0
def main():
    with open(get_rosalind_data_path('prot')) as file:
        rna = RNA(file.readline())
        print(rna.transcribe_to_protein())
コード例 #11
0
def main():
    dna_list = FASTADNA.read_list_from_file(get_rosalind_data_path('gc'))
    print(format_string(compute(dna_list)))
コード例 #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))
コード例 #13
0
def main():
    with open(get_rosalind_data_path('prot')) as file:
        rna = RNA(file.readline())
        print(rna.transcribe_to_protein())