@@ -177,12 +177,13 @@ def DiscoveryTCS(basefile):
177177 CAF_to_TCS .RunModule (basefile + '_assembly/' + miraproject + '_d_results/' + miraproject + '_out.caf' )
178178 TCS .RunModule (basefile + '_assembly/' + miraproject + '_d_results/' + miraproject + '_out.tcs' ,int (config .get ('Variables' ,'minqual' )),int (config .get ('Variables' ,'mincov' )))
179179
180+
180181def SNPgrabber (basefile ):
181182 #Grabs suitable SNPs in the short TCS output DiscoveryTCS and outputs a fasta with only the relevant contigs, tagged with SNP info.
182183 os .chdir (os .path .split (basefile )[0 ])
183184 print ("\n Running SNP Grabber tool module..." )
184- SNPg .RunModule (basefile + '_assembly/' + miraproject + '_d_results/' + miraproject + ' _out.short.tcs' , basefile + '_assembly/' + miraproject + '_d_results/' + miraproject + '_out.unpadded.fasta' , int (config .get ('Variables' ,'minqual' )))
185- shutil . move ( miraproject + '_assembly/' + miraproject + '_d_results/' + miraproject + '_out.short.fasta' , basefile + '.SNPs.fasta' )
185+ SNPg .RunModule (basefile + '_out.short.tcs' , basefile + '_assembly/' + miraproject + '_d_results/' + miraproject + '_out.unpadded.fasta' , basefile + '.SNPs.fasta' , int (config .get ('Variables' , 'minqual' )))
186+
186187
187188def ORFliner (basefile ):
188189 #This will run EMBOSS 'getorf' and use 2 scripts to filter the results and write a report. The paramters for 'getorf' are changed here.
@@ -208,7 +209,8 @@ def ORFliner(basefile):
208209 Metrics .Run_module (seqclean_log_path , basefile + '.fasta' , basefile + '.clean.fasta' , basefile + '.fasta.qual' , basefile + '.clean.fasta.qual' , basefile + '_assembly/' + miraproject + '_d_info/' + miraproject + '_info_assembly.txt' , basefile + '.SNPs.fasta' , basefile + '.BestORF.fasta' , basefile + '.Metrics.html' )
209210 #Finally we write down our report using the data gathered so far:
210211 print ("\n Running Reporter module..." )
211- Reporter .RunModule (basefile + '.BestORF.fasta' , basefile + '.SNPs.fasta' , basefile + '.ORFblast.html' , basefile + '.Report.html' , basefile + '_assembly/' + miraproject + '_d_results/' + miraproject + '_out.short.tcs' )
212+ Reporter .RunModule (basefile + '.BestORF.fasta' , basefile + '.SNPs.fasta' , basefile + '.ORFblast.html' , basefile + '.Report.html' , basefile + '_out.short.tcs' )
213+
212214
213215def B2G (basefile ):
214216 #This will make all necessary runs to get a B2go anottation ready for the GUI aplication. Bummer...
@@ -230,11 +232,13 @@ def B2G(basefile):
230232 else :
231233 quit ("\n ERROR:Program not found... exiting. Check your configuration file.\n " )
232234
235+
233236def SSRfinder (basefile ):
234237 #Runs the SSR finder in batch mode and generates an HTML. It's mostly disk I/O stress and not CPU intensive:
235238 print ("\n Running SSR finder module..." )
236239 ssr .RunModule (basefile + '_assembly/' + miraproject + '_d_results/' + miraproject + '_out.unpadded.fasta' ,basefile + '_assembly/' + miraproject + '_d_results/' + miraproject + '_out.unpadded.fasta.qual' ,basefile + '.SSR.html' ,config .get ('Program paths' ,'Etandem_path' ),config .get ('Variables' ,'min_ssr_qual' ))
237240
241+
238242def TidyUP (basefile ):
239243 #Tidy up the report folder:
240244 os .chdir (os .path .split (basefile )[0 ])
@@ -277,6 +281,7 @@ def TidyUP(basefile):
277281 print (' ' .join (cli ))
278282 RunProgram (cli ,0 )
279283
284+
280285def RunMe (arguments ):
281286 #Function to parse which parts of 4Pipe4 will run.
282287 for option ,number in zip (list (arguments ),range (len (arguments ))):
@@ -299,6 +304,8 @@ def RunMe(arguments):
299304 if option == "9" :
300305 TidyUP (basefile )
301306 print ("\n Pipeline finished.\n " )
307+
308+
302309basefile ,sff ,config = StartUp ()
303310miraproject = SysPrep (basefile )
304- RunMe (arg .run_list )
311+ RunMe (arg .run_list )
0 commit comments