Mercurial > repos > estrain > seqsero2_v1_0_1
comparison SeqSero2_package.py @ 24:4e1596ee5c94
Uploaded
author | estrain |
---|---|
date | Sat, 07 Sep 2019 13:56:48 -0400 |
parents | f8c06e3b0fb9 |
children | 2bc92eaf2844 |
comparison
equal
deleted
inserted
replaced
23:f8c06e3b0fb9 | 24:4e1596ee5c94 |
---|---|
1213 return xmlfile,new_fasta | 1213 return xmlfile,new_fasta |
1214 | 1214 |
1215 def judge_subspecies(fnameA,dirpath): | 1215 def judge_subspecies(fnameA,dirpath): |
1216 #seqsero2 -a; judge subspecies on just forward raw reads fastq | 1216 #seqsero2 -a; judge subspecies on just forward raw reads fastq |
1217 salmID_output=subprocess.Popen("./SalmID.py -i "+fnameA,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) | 1217 salmID_output=subprocess.Popen("./SalmID.py -i "+fnameA,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) |
1218 salmID_output2=subprocess.Popen("ls",shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) | |
1218 out, err = salmID_output.communicate() | 1219 out, err = salmID_output.communicate() |
1220 out2, err2 = salmID_output2.communicate() | |
1219 out=out.decode("utf-8") | 1221 out=out.decode("utf-8") |
1222 out2=out2.decode("utf-8") | |
1220 err=err.decode("utf-8") | 1223 err=err.decode("utf-8") |
1224 err2=err2.decode("utf-8") | |
1221 file=open("data_log.txt","a") | 1225 file=open("data_log.txt","a") |
1222 file.write(out) | 1226 file.write(out) |
1223 file.close() | 1227 file.close() |
1224 print("dirpath " + str(dirpath)) | 1228 print("dirpath " + str(dirpath)) |
1225 print("SalmID File" + str(out)) | 1229 print("SalmID File" + str(out)) |
1230 print("SalmID File" + str(out2)) | |
1226 print("SalmID Err File" + str(err)) | 1231 print("SalmID Err File" + str(err)) |
1232 print("SalmID Err File" + str(err2)) | |
1227 print("SalmID 1 "+str(out.split("\n")[1])) | 1233 print("SalmID 1 "+str(out.split("\n")[1])) |
1228 print("SalmID 0 "+str(out.split("\n")[0])) | 1234 print("SalmID 0 "+str(out.split("\n")[0])) |
1229 salm_species_scores=out.split("\n")[1].split("\t")[6:] | 1235 salm_species_scores=out.split("\n")[1].split("\t")[6:] |
1230 salm_species_results=out.split("\n")[0].split("\t")[6:] | 1236 salm_species_results=out.split("\n")[0].split("\t")[6:] |
1231 max_score=0 | 1237 max_score=0 |