JP Feb 16 16
From GcatWiki
Revision as of 19:25, 16 February 2016 by Jupreziosi (talk | contribs) (Created page with "Julia Preziosi Wrote a python code to rename the raw fastq files. (at bottom of page) Ran Blast2Go using NCBI database and the following parameters (default): ...")
Wrote a python code to rename the raw fastq files. (at bottom of page)
Ran Blast2Go using NCBI database and the following parameters (default):
- file_name = raw_input('Enter file name: ').strip()
file_name = 'first80.txt'
Seqlist= [] f = open(file_name)
for pos, line in enumerate(f):
if pos % 4 == 1: Seqlist.append(line)
f.close() NewSeqlist = []
ID = 1
for seq in Seqlist:
seq = ">" + str(ID) + "\n" + seq NewSeqlist.append(seq) ID += 1
print NewSeqlist
newfilename = "renamed_" + file_name
with open (newfilename, 'w') as newfile:
for seq in NewSeqlist: newfile.write(seq)