Mercurial > repos > bornea > nsaf_scoring
comparison nsaf_scoring.py @ 0:46a582eb1ea9 draft
Uploaded
author | bornea |
---|---|
date | Wed, 11 May 2016 10:50:52 -0400 |
parents | |
children | 9ff511e32040 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:46a582eb1ea9 |
---|---|
1 ####################################################################################### | |
2 # Python-code: NSAF scoring wrapper | |
3 # Author: Adam L Borne | |
4 # Contributers: Paul A Stewart, Brent Kuenzi | |
5 ####################################################################################### | |
6 # This program runs the R script that generates a nsaf scoring table. Python script simply | |
7 # handles arguments and interacts with Galaxy. | |
8 ####################################################################################### | |
9 # Copyright (C) Adam Borne. | |
10 # Permission is granted to copy, distribute and/or modify this document | |
11 # under the terms of the GNU Free Documentation License, Version 1.3 | |
12 # or any later version published by the Free Software Foundation; | |
13 # with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. | |
14 # A copy of the license is included in the section entitled "GNU | |
15 # Free Documentation License". | |
16 ####################################################################################### | |
17 ## REQUIRED INPUT ## | |
18 | |
19 # 1) listfile: SaintExpress output file. | |
20 # 2) preyfile: Prey file listing gene name, sequence legnth, and gene id. | |
21 # 3) crapfile: Crapome file can be created at http://crapome.org. (default = "None") | |
22 # 4) interfile: inter file from preprocessing script. | |
23 ####################################################################################### | |
24 import os | |
25 import sys | |
26 import time | |
27 | |
28 | |
29 listfile = sys.argv[1] | |
30 preyfile = sys.argv[2] | |
31 crapfile = sys.argv[3] | |
32 interfile = sys.argv[4] | |
33 ins_path = sys.argv[6] | |
34 | |
35 | |
36 cmd = (r"Rscript "+ str(ins_path) + r"/nsaf_scoring.R " + str(listfile) + r" " | |
37 + str(preyfile) + r" " + str(crapfile) + r" " + str(inter_file)) | |
38 os.system(cmd) | |
39 | |
40 os.rename("SaintTable.txt", sys.argv[5]) |