comparison scripts/S01_phylip2fasta.py @ 5:0d2da4c020dc draft

planemo upload for repository https://github.com/abims-sbr/adaptsearch commit df6ba874c5e5f0cde12c9253b5c192e4a35f2280
author abims-sbr
date Thu, 18 Jan 2018 08:13:26 -0500
parents 49017ea906b5
children e0bea88bb09f
comparison
equal deleted inserted replaced
4:9eb5bb56bf41 5:0d2da4c020dc
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 """
16 if os.path.isfile(sys.argv[1]) : 17 if os.path.isfile(sys.argv[1]) :
17 f1 = sys.argv[1] 18 f1 = sys.argv[1]
18 else: 19 else:
19 print "No existing phylip file ; exiting ..." 20 print "No existing phylip file ; exiting ..."
20 exit() 21 exit()
21 22 """
23 f1 = sys.argv[1]
22 F1 = open("%s" %f1, 'r') 24 F1 = open("%s" %f1, 'r')
23 25
24 ## OUTPUT 26 ## OUTPUT
25 f2 = sys.argv[2] 27 f2 = sys.argv[2]
26 F2 = open("%s" %f2, 'w') 28 F2 = open("%s" %f2, 'w')
48 ################### 50 ###################
49 ### RUN RUN RUN ### 51 ### RUN RUN RUN ###
50 ################### 52 ###################
51 53
52 F1.readline() ## jump the first line 54 F1.readline() ## jump the first line
53
54 fichier_txt, c = format(F1) ### DEF1 ### 55 fichier_txt, c = format(F1) ### DEF1 ###
55
56 F2.write(fichier_txt) 56 F2.write(fichier_txt)
57
58 F1.close() 57 F1.close()
59 F2.close() 58 F2.close()