Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from Bio.Seq import Seq
- def zadanie(name):
- s = []
- file = open(name, "r").readlines()
- seq = ""
- for line in file[1:]:
- s += line.rstrip()
- print("Ilosc par zasad to " + str(len(s)))
- if len(s)/2 % 2 == 0:
- print("Srodkowe zasady to " + s[int(len(s)/2)] + " i " +s[int(len(s)/2+1)])
- else:
- print("Srodkowa zasada to" + s[int(len(s)/2+0.5)])
- seq = Seq("".join(s))
- print("mRNA: " + seq.transcribe())
- print("Translacja: " + seq.translate())
- print "Ilosc alaniny:",s.count(('A'))
- print "Ilosc guaniny:", s.count(('G'))
- print "Ilosc cytozyny:", s.count(('C'))
- print "Ilosc tyminy:", s.count(('T'))
- print "Procent cytozyny", s.count(('C'))/len(s)*100, "%"
- print "Bez alaniny", seq.ungap('A')
- zadanie("seq1.fasta")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement