-
Notifications
You must be signed in to change notification settings - Fork 0
/
concatenateFastaALN.py
executable file
·31 lines (25 loc) · 1.02 KB
/
concatenateFastaALN.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/python
import sys, os, glob
def usage():
print "Usage: concatenateFastaALN.py listoffasta2concatenate(glob)"
if len(sys.argv) !=2:
usage()
exit()
dirlist=glob.glob(sys.argv[1])
index=0
index2=0
dirlist.pop(0)
for file in dirlist:
print file
"""
if index == 0:
os.system("t_coffee -other_pg seq_reformat -in "+path2cat+file+" -in2 "+path2cat+dirlist[1]+" -action +cat_aln > "+path2cat+"alnfile"+str(index2)+".fasta")
print("t_coffee -other_pg seq_reformat -in "+path2cat+file+" -in2 "+path2cat+dirlist[1]+" -action +cat_aln > "+path2cat+"alnfile"+str(index2)+".fasta")
index2+=1
elif index > 1:
os.system("t_coffee -other_pg seq_reformat -in "+path2cat+"alnfile"+str(index2-1)+".fasta -in2 "+path2cat+file+" -action +cat_aln > "+path2cat+"alnfile"+str(index2)+".fasta")
print("t_coffee -other_pg seq_reformat -in "+path2cat+"alnfile"+str(index2-1)+".fasta -in2 "+path2cat+file+" -action +cat_aln > "+path2cat+"alnfile"+str(index2)+".fasta")
index2+=1
else:
print str(index)+ " yay2"
index+=1"""