Beispiel #1
0
from seq import Seq
import operator

print("-------Exercise 10-------")
FASTA_GENE_SEQ = ["U5.txt", "FRAT1.txt", "FXN.txt", "RNU6_269P.txt", "ADA.txt"]
for fasta in FASTA_GENE_SEQ:
    s = Seq()
    s.read_fasta_format(fasta)
    var = s.count()
    max_key = max(var, key=var.get)
    print(max_key)
Beispiel #2
0
from Hello.Client0 import Client
from seq import Seq

PRACTICE = 2
EXERCISE = 7

print(f"--------| {PRACTICE}, Exercise {EXERCISE} |-------")

IP = "127.0.0.1"
PORT = 9992
PORT_2 = 9777
c = Client(IP, PORT)
c_2 = Client(IP, PORT_2)

s = Seq()
s.read_fasta_format("../P1/FRAT1.txt")
count = 0
i = 0
while i < len(s.bases) and count < 5:
    fragment = s.bases[i:i + 10]
    count += 1
    i += 10
    print(f"Fragment {count} : {fragment}")
    if count % 2 == 0:
        print(c_2.talk(f"Fragment {count} : {fragment}"))
    else:
        print(c.talk(f"Fragment {count} : {fragment}"))
Beispiel #3
0
from seq import Seq

print("-----|  Exercise 9 |------")
s = Seq()
s.read_fasta_format('U5.txt')

print(f"Sequence: (Length: {s.len()}) {s}")
print(f"\tBases: {s.count()}")
print(f"\tRev: {s.reverse_mode()}")
print(f"\tComp: {s.complementary()}")