comparison scripts/S01_phylip2fasta.py @ 6:e0bea88bb09f draft

planemo upload for repository https://github.com/abims-sbr/adaptsearch commit 76e603ecd0118c8060d972b675a13db858956eb6
author abims-sbr
date Thu, 18 Jan 2018 09:02:24 -0500
parents 0d2da4c020dc
children
comparison
equal deleted inserted replaced
5:0d2da4c020dc 6:e0bea88bb09f
11 print "put arguments!!" 11 print "put arguments!!"
12 print "USAGE: S01_phylip2fasta.py INPUT OUTPUT" 12 print "USAGE: S01_phylip2fasta.py INPUT OUTPUT"
13 """ 13 """
14 14
15 ## INPUT 15 ## INPUT
16 """
17 if os.path.isfile(sys.argv[1]) : 16 if os.path.isfile(sys.argv[1]) :
18 f1 = sys.argv[1] 17 f1 = sys.argv[1]
19 else: 18 else:
20 print "No existing phylip file ; exiting ..." 19 print "No existing phylip file ; exiting ..."
21 exit() 20 exit()
22 """ 21
23 f1 = sys.argv[1]
24 F1 = open("%s" %f1, 'r') 22 F1 = open("%s" %f1, 'r')
25 23
26 ## OUTPUT 24 ## OUTPUT
27 f2 = sys.argv[2] 25 f2 = sys.argv[2]
28 F2 = open("%s" %f2, 'w') 26 F2 = open("%s" %f2, 'w')
50 ################### 48 ###################
51 ### RUN RUN RUN ### 49 ### RUN RUN RUN ###
52 ################### 50 ###################
53 51
54 F1.readline() ## jump the first line 52 F1.readline() ## jump the first line
53
55 fichier_txt, c = format(F1) ### DEF1 ### 54 fichier_txt, c = format(F1) ### DEF1 ###
55
56 F2.write(fichier_txt) 56 F2.write(fichier_txt)
57
57 F1.close() 58 F1.close()
58 F2.close() 59 F2.close()