def rev(argument, cs): print_colored("REV", "yellow") argument = Seq(argument.replace('"', "")) rev_seq = str(Seq.seq_reverse(argument)) response = f"""Initial sequence: {argument} Reverse sequence: {rev_seq}""" cs.send(response.encode()) print(response)
def gene(argument, cs): print_colored("GENE", "yellow") sequence = Seq(Seq.seq_read_fasta_2("./Sequences/" + argument.replace('"', "") + ".txt")) comp_seq = str(Seq.seq_complement(sequence)) rev_seq = str(Seq.seq_reverse(sequence)) colored_response = f"""Initial sequence: {termcolor.colored(sequence, "red")} Complement sequence: {termcolor.colored(comp_seq, "green")} Reverse sequence: {termcolor.colored(rev_seq, "blue")}""" response = f"""Initial sequence: {sequence} Complement sequence: {comp_seq} Reverse sequence: {rev_seq}""" cs.send(response.encode()) print(response)