#!/usr/bin/env python
import os
import sys
inputfile=sys.argv[1]
outputfile=sys.argv[2]
u=open(outputfile,'w')
with open(inputfile,'r') as s:
si=s.readlines()
for sil in si:
sili=sil.strip()
if str(sili[0]) == ">":
u.write(sil)
n=0
else:
for silib in sili:
# bc=silib.lower()
bc=silib.upper()
n=n+1
u.write(bc)
if n%80 == 0:
u.write("\n")
if n%80 != 0:
u.write("\n")
#!/usr/bin/env python
u=open('3utr_mouse.fa','w')
with open('mouse_3utr.fa','r') as s:
si=s.readlines()
for sil in si:
sili=sil.strip()
if str(sili[0]) == ">":
u.write(sil)
n=0
else:
for silib in sili:
bc=silib.lower()
n=n+1
u.write(bc)
if n%50 == 0:
u.write("\n")
if n%50 != 0:
u.write("\n")
网友评论