diff SeqSero2/SeqSero2_package.py @ 12:4ac593d4b40f

planemo upload
author jpayne
date Wed, 14 Aug 2019 17:45:41 -0400
parents eefafc531698
children
line wrap: on
line diff
--- a/SeqSero2/SeqSero2_package.py	Tue Aug 13 08:40:57 2019 -0400
+++ b/SeqSero2/SeqSero2_package.py	Wed Aug 14 17:45:41 2019 -0400
@@ -1172,6 +1172,7 @@
     t="4"
   else:
     t=threads
+  new_fasta = None
   if os.path.getsize(combined_fq)>100 and (fnameB=="" or os.path.getsize(mapped_fq1)>100):#if not, then it's "-:-:-"
     if fnameB!="":
       subprocess.check_output("spades.py --careful --pe1-s "+combined_fq+" --pe1-1 "+mapped_fq1+" --pe1-2 "+mapped_fq2+" -t "+t+" -o "+outdir,shell=True, stderr=subprocess.STDOUT)
@@ -1191,7 +1192,7 @@
 
 def judge_subspecies(fnameA):
   #seqsero2 -a; judge subspecies on just forward raw reads fastq
-  salmID_output=subprocess.check_output("../SalmID/SalmID.py -i "+fnameA, shell=True, stderr=subprocess.STDOUT)
+  salmID_output=subprocess.check_output(os.path.join(dirpath, "SalmID/SalmID.py") + ' -i ' +fnameA, shell=True, stderr=subprocess.STDOUT)
   #out, err = salmID_output.communicate()
   #out=out.decode("utf-8")
   out = salmID_output.decode("utf-8")
@@ -1256,6 +1257,7 @@
   ############################begin the real analysis 
     if analysis_mode=="a":
       if data_type in ["1","2","3"]:#use allele mode
+        H1_cont_stat_list = H2_cont_stat_list = []
         for_fq,rev_fq=get_input_files(make_dir,input_file,data_type,dirpath)
         os.chdir(make_dir)
         ###add a function to tell input files