@@ -118,8 +118,8 @@ def rmHeader(outdir, commonNames):
118118 if commonNames == False :
119119 rh = Popen (split ("python bin/02_RemoveHeader.py " + outdir ))
120120 elif commonNames == True :
121- rh = Popen (split ("python bin/02_RemoveHeader.py " + outdir +
122- " --changeNames" ))
121+ rh = Popen (split ("python bin/02_RemoveHeader.py " + outdir +
122+ " --changeNames" ))
123123 rh .wait ()
124124 if rh .returncode == 0 :
125125 return True
@@ -206,34 +206,34 @@ def runcodeml(cpu, outdir, forward, starttime):
206206#-----------------------------------------------------------------------------
207207
208208def helplist ():
209- print ("\n ### AlignmentProcessor will run the subsituion rate pipeline to \
210- produce trimmed axt files for use with KaKs_calculator. ###\n " )
209+ print ("\n AlignmentProcessor0.21 Copyright 2016 by Shawn Rupp\n " )
211210 print ("\t example usage: python AlignmentProcessor.py -% <decimal> \
212211 --axt/phylip --kaks/codeml -i <input fasta file> -o \
213- <path to output directory> -r <reference species>" )
214- print ("\t -i path to input file containing a multifasta alignment" )
215- print ("\t -o AlignmentProcessor will use this as its working \
212+ <path to output directory> -r <reference species>\n " )
213+ print ("\t -i\t path to input file containing a multifasta alignment" )
214+ print ("\t -o\t AlignmentProcessor will use this as its working \
216215 directory and print output to this directory" )
217- print ("\t -r the name of the reference species which will be used to \
216+ print ("\t -r\t the name of the reference species which will be used to \
218217 determine the open reading frame" )
219- print ("\t --ucsc converts headers of CDS fasta files obtained from \
218+ print ("\t --ucsc\t converts headers of CDS fasta files obtained from \
220219 the UCSC genome browser" )
221- print ("\t --axt Converts files to axt for use in KaKs_Calcuator." )
222- print (" \t --phylip Converts files to phylip for use in PhyML." )
223- print ("\t --kaks Runs KaKs_Calcuator if --axt is also specified" )
224- print ("\t --codeml Runs codeml if --phylip is also specified" )
225- print ("\t -t number of threads to use for CodeML." )
226- print ("\t -f specifies the forward branch of the CodeML input tree." )
227- print ("\t --retainStops retain sequences with internal stop codons" )
228- print ("\t -% Sets the percentage cutoff for the countBases step (50% \
220+ print ("\t --axt\t Converts files to axt for use in KaKs_Calcuator." )
221+ print ("\t --phylip\t Converts files to phylip for use in PhyML." )
222+ print ("\t --kaks\t Runs KaKs_Calcuator if --axt is also specified" )
223+ print ("\t --codeml\t Runs codeml if --phylip is also specified" )
224+ print ("\t -t\t number of threads to use for CodeML." )
225+ print ("\t -f\t specifies the forward branch of the CodeML input tree." )
226+ print ("\t -%\t Sets the percentage cutoff for the countBases step (50% \
229227 by default)." )
230- print ("\t --printNameList prints list of genome build names and\
228+ print ("\t --changeNames\t change genome build names to common names." )
229+ print ("\t --retainStops\t retain sequences with internal stop codons" )
230+ print ("\t --printNameList\t prints list of genome build names and\
231231 associated common names" )
232- print ("\t --addNameToList add new genome build name and\
232+ print ("\t --addNameToList\t add new genome build name and\
233233 associated common name to list" )
234- print ("\t -v prints coyright and version information to the screen" )
235- print ("\n ### Please note that you must be in the substituionManager \
236- directory to run the program.###\n " )
234+ print ("\t -v\t prints coyright and version information to the screen" )
235+ print ("\n ### Please note that you must be in the AlignmentProcessor \
236+ directory to run the program. ###\n " )
237237
238238def main ():
239239 starttime = datetime .now ()
@@ -250,13 +250,18 @@ def main():
250250 percent = "0.5"
251251 ref = "void"
252252 forward = ""
253- # Extract values from command line:
253+
254254 for i in argv :
255- if i == "-h" or i == "--help" :
255+ # Print help list
256+ if len (argv ) == 1 :
257+ helplist ()
258+ quit ()
259+ elif i == "-h" or i == "--help" :
256260 helplist ()
257261 quit ()
262+ # Other functions
258263 elif i == "-v" or i == "--version" :
259- print ("\n AlignmentProcessor0.20 Copyright 2016 by Shawn Rupp\n " )
264+ print ("\n AlignmentProcessor0.21 Copyright 2016 by Shawn Rupp\n " )
260265 print ("This program comes with ABSOLUTELY NO WARRANTY\n " )
261266 print ("This is free software, and you are welcome to redistribute\
262267 it under certain conditions\n " )
@@ -265,6 +270,7 @@ def main():
265270 readList ("read" , "void" , "void" )
266271 elif i == "--addNameToList" :
267272 readList ("add" , argv [argv .index (i ) + 1 ], argv [argv .index (i ) + 2 ])
273+ # Extract values from command line:
268274 elif i == "-i" :
269275 fasta = argv [argv .index (i ) + 1 ]
270276 elif i == "-o" :
0 commit comments