Mercurial > repos > cstrittmatter > ss2v110
comparison bin/SeqSero2_package.py @ 10:e6437d423693 draft
planemo upload commit 70dc513aa7d7ac6785847dfd86323687613b6b68-dirty
author | cstrittmatter |
---|---|
date | Fri, 01 May 2020 13:30:43 -0400 |
parents | 357e38526e2a |
children | 08832c0d3cbd |
comparison
equal
deleted
inserted
replaced
9:43f6b7f6ebb3 | 10:e6437d423693 |
---|---|
1234 return xmlfile,new_fasta | 1234 return xmlfile,new_fasta |
1235 | 1235 |
1236 def judge_subspecies(fnameA,dirpath): | 1236 def judge_subspecies(fnameA,dirpath): |
1237 #seqsero2 -a; judge subspecies on just forward raw reads fastq | 1237 #seqsero2 -a; judge subspecies on just forward raw reads fastq |
1238 samid_strcmd = "python " + dirpath + "/../SalmID.py -i "+fnameA | 1238 samid_strcmd = "python " + dirpath + "/../SalmID.py -i "+fnameA |
1239 #subprocess.check_call(samid_strcmd + " > Salmidoutput.txt",shell=True) | |
1240 print(samid_strcmd) | 1239 print(samid_strcmd) |
1240 #seqsero2 -a; judge subspecies on just forward raw reads fastq | |
1241 #salmID_output=subprocess.Popen("SalmID.py -i "+fnameA,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) | |
1241 salmID_output=subprocess.Popen(samid_strcmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) | 1242 salmID_output=subprocess.Popen(samid_strcmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) |
1242 out, err = salmID_output.communicate() | 1243 out, err = salmID_output.communicate() |
1243 print("judge_subspecies -> err = salmID_output.communicate() " + err) | |
1244 out=out.decode("utf-8") | 1244 out=out.decode("utf-8") |
1245 print(out) | |
1246 print(err) | |
1245 file=open("data_log.txt","a") | 1247 file=open("data_log.txt","a") |
1246 file.write(out) | 1248 file.write(out) |
1247 file.close() | 1249 file.close() |
1248 salm_species_scores=out.split("\n")[1].split("\t")[6:] | 1250 salm_species_scores=out.split("\n")[1].split("\t")[6:] |
1249 salm_species_results=out.split("\n")[0].split("\t")[6:] | 1251 salm_species_results=out.split("\n")[0].split("\t")[6:] |