diff scripts/S01_phylip2fasta.py @ 3:49017ea906b5 draft

planemo upload for repository https://github.com/abims-sbr/adaptsearch commit cf1b9c905931ca2ca25faa4844d45c908756472f
author abims-sbr
date Wed, 17 Jan 2018 08:55:00 -0500
parents 92615a423389
children 0d2da4c020dc
line wrap: on
line diff
--- a/scripts/S01_phylip2fasta.py	Wed Sep 27 10:02:43 2017 -0400
+++ b/scripts/S01_phylip2fasta.py	Wed Jan 17 08:55:00 2018 -0500
@@ -6,14 +6,19 @@
 ## DESCRIPTION: formatting a fasta format into phylip format for using with PAML
 
 import string, os, sys
-
+"""
 if len(sys.argv) == 1:
     print "put arguments!!"
-    print "USAGE: $T4S02_phylip2fasta.py INPUT OUTPUT"
-
+    print "USAGE: S01_phylip2fasta.py INPUT OUTPUT"
+"""
 
 ## INPUT
-f1 = sys.argv[1]
+if os.path.isfile(sys.argv[1]) :
+    f1 = sys.argv[1]
+else:
+    print "No existing phylip file ; exiting ..."
+    exit()
+
 F1 = open("%s" %f1, 'r')
 
 ## OUTPUT