Mercurial > repos > trinity_ctat > analyze_differential_expression
comparison analyze_diff_exp_wrapper.py @ 2:6f54e220d035 draft
Adding some debugging statements.
author | trinity_ctat |
---|---|
date | Mon, 02 Oct 2017 12:55:27 -0400 |
parents | 5bbc80dbfb5f |
children | b5d906ce0f06 |
comparison
equal
deleted
inserted
replaced
1:54f173578868 | 2:6f54e220d035 |
---|---|
54 Normalized_Matrix=sys.argv[2] | 54 Normalized_Matrix=sys.argv[2] |
55 Pvalue=sys.argv[3] | 55 Pvalue=sys.argv[3] |
56 Cvalue=sys.argv[4] | 56 Cvalue=sys.argv[4] |
57 | 57 |
58 def run_command(cmd): | 58 def run_command(cmd): |
59 print "The command used: " + cmd | 59 print "The command used: " + cmd |
60 pipe= subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE) | 60 pipe= subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE) |
61 pipe.wait() | 61 pipe.wait() |
62 ret= pipe.returncode | 62 ret= pipe.returncode |
63 if ret: | 63 if ret: |
64 print "command died: " + str(ret) | 64 print "command died: " + str(ret) |
65 print pipe.stderr.readlines() | 65 print pipe.stderr.readlines() |
66 sys.exit(1) | 66 sys.exit(ret) |
67 else: | 67 else: |
68 return | 68 return |
69 print " " | |
70 | 69 |
70 print "" | |
71 Final_tar_gz= "edgeR.tar.gz" | 71 Final_tar_gz= "edgeR.tar.gz" |
72 run_command("cp "+ sys.argv[1] + " " + "Final_tar_gz") | 72 run_command("cp "+ sys.argv[1] + " " + "Final_tar_gz") |
73 run_command("tar -xvf " + "Final_tar_gz") | 73 run_command("tar -xvf " + "Final_tar_gz") |
74 run_command("mv " + "edgeR_results" + "/* ." ) | 74 run_command("mv " + "edgeR_results" + "/* ." ) |
75 | |
76 print "" | |
77 run_command("pwd") | |
78 run_command("ls -lad ./*") | |
79 print "\nedgeR_results" | |
80 run_command("ls -lad edgeR_results/*") | |
75 | 81 |
76 # run the analyze command | 82 # run the analyze command |
77 cmd= TRINITY_BASE_DIR + "/Analysis/DifferentialExpression/analyze_diff_expr.pl "+ "--matrix " + Normalized_Matrix + " -P " + Pvalue + " -C " + Cvalue | 83 cmd= TRINITY_BASE_DIR + "/Analysis/DifferentialExpression/analyze_diff_expr.pl "+ "--matrix " + Normalized_Matrix + " -P " + Pvalue + " -C " + Cvalue |
78 run_command(cmd) | 84 run_command(cmd) |
79 | 85 |