Previous changeset 15:0c0abdfad3b7 (2016-04-25) Next changeset 17:378fc3676c78 (2016-04-29) |
Commit message:
Uploaded |
modified:
CRAPomeQuery.py |
b |
diff -r 0c0abdfad3b7 -r a5444c834e72 CRAPomeQuery.py --- a/CRAPomeQuery.py Mon Apr 25 11:47:05 2016 -0400 +++ b/CRAPomeQuery.py Fri Apr 29 15:42:11 2016 -0400 |
[ |
@@ -5,12 +5,6 @@ @author: brentkuenzi """ ################################################################################ -## Dependencies ## -import urllib2 -import sys -import numpy -import os -################################################################################ # This program will read in a SAINT formatted 'prey.txt' file or a file # containing a single column list of uniprot accessions (e.g. "P00533" or # "EGFR_HUMAN")query the CRAPome database (v1.1), and return a file specifying @@ -24,6 +18,12 @@ # A copy of the license is included in the section entitled "GNU # Free Documentation License". ################################################################################ +## Dependencies ## +import urllib2 +import sys +import numpy +import os +################################################################################ ## REQUIRED INPUT ## # 1) crappyData: Prey.txt or single column list of Uniprot accessions crappyData = sys.argv[1] # Prey file or File with single column of accessions @@ -33,9 +33,9 @@ ################################################################################ ## Global Variables ## if species == "HUMAN": - database = str(db_path) + "Human_CRAPome_v1-1.txt" + database = "Human_CRAPome_v1-1.txt" if species == "YEAST": - database = str(db_path) + "Yeast_CRAPome_v1-1.txt" + database = "Yeast_CRAPome_v1-1.txt" ################################################################################ ## CRAPomeQuery ## class ReturnValue1(object): @@ -134,7 +134,7 @@ temp.append(i[0]) # append gene name ave = [] total = len(i[3:]) # calculate total experiments - for j in i[3:]: + for j in i[3:]: if j != '0': ave.append(int(j)) # calculate Ave.SC on only experiments with ID cnt+=1 @@ -148,9 +148,6 @@ else: temp.append(i[2]) # append accession temp.append(i[3]) - temp.append("NA") - temp.append("NA") - temp.append("NA") query.append(temp) # final query results header = ["User Input","Mapped Gene Symbol","Num of Expt. (found/total)","Ave SC","Max SC"] |