Previous changeset 8:355ad1ce474b (2016-03-23) Next changeset 10:c414a56f5874 (2016-04-18) |
Commit message:
Uploaded |
modified:
ProteinInteractions.py |
b |
diff -r 355ad1ce474b -r dd0b4c901d0a ProteinInteractions.py --- a/ProteinInteractions.py Wed Mar 23 10:45:39 2016 -0400 +++ b/ProteinInteractions.py Wed Mar 23 11:15:44 2016 -0400 |
[ |
@@ -81,6 +81,7 @@ def get_info(uniprot_accession_in): # Get aa lengths and gene name. + print uniprot_accession_in error = open('error proteins.txt', 'a+') i = 0 while i == 0: @@ -133,13 +134,14 @@ data = read_listfile(listfile).data # Change to filtered list. SS = (read_listfile(listfile).header).index("SaintScore") + uni_ids = (read_listfile(listfile).header).index("PreyGene") - 1 filt_data = [] for i in data: if i[SS] >= SAINTscore: filt_data.append(i) accessions = [] for i in filt_data: - accessions.append(get_info(i[1]).sp) + accessions.append(get_info(i[uni_ids]).sp) GO = [] for i in CPDB[2:]: if i[3] >= CPDB_filter: @@ -180,10 +182,11 @@ with open('network.sif', 'wt') as y: data = read_listfile(listfile).data SS = (read_listfile(listfile).header).index("SaintScore") + uni_ids = (read_listfile(listfile).header).index("PreyGene") - 1 filt_data = [] for i in data: if i[SS] >= SAINTscore: - filt_data.append(get_info(i[1]).sp) + filt_data.append(get_info(i[uni_ids]).sp) for i in filt_data: if dd_network[i] != []: lst = [] |