Skip to content

Commit

Permalink
removed old category parsing from vector upload
Browse files Browse the repository at this point in the history
  • Loading branch information
cornhundred committed Jun 29, 2016
1 parent f0a9207 commit b17bc18
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
27 changes: 0 additions & 27 deletions clustergrammer/load_vect_post.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
def main(real_net, vect_post):
import numpy as np
import categories
from copy import deepcopy
from __init__ import Network
import proc_df_labels
Expand All @@ -11,15 +10,9 @@ def main(real_net, vect_post):

all_rows = []
all_sigs = []
tmp_col_cat = {}
is_col_cat = False
for inst_sig in sigs:
all_sigs.append(inst_sig['col_name'])

if 'cat' in inst_sig:
is_col_cat = True
tmp_col_cat[inst_sig['col_name']] = inst_sig['cat']

col_data = inst_sig['data']

for inst_row_data in col_data:
Expand All @@ -31,26 +24,6 @@ def main(real_net, vect_post):
net.dat['nodes']['row'] = all_rows
net.dat['nodes']['col'] = all_sigs

if is_col_cat:
all_cat = []

for tmp_sig in all_sigs:
all_cat.append(tmp_col_cat[tmp_sig])

net.dat['node_info']['col']['cat-0'] = all_cat

categories.dict_cat(net)

net.dat['node_info']['col']['full_names'] = []

# construct full_names from single column category
# need to improve
for inst_index in range(len(all_cat)):
inst_cat = all_cat[inst_index]
inst_name = net.dat['nodes']['col'][inst_index]
inst_tuple = (inst_name, inst_cat)
net.dat['node_info']['col']['full_names'].append(inst_tuple)

net.dat['mat'] = np.empty((len(all_rows), len(all_sigs)))
net.dat['mat'][:] = np.nan

Expand Down
5 changes: 0 additions & 5 deletions fake_vect_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ def make_json():
inst_col['col_name'] = col_name
inst_col['link'] = 'col-link'

# if col_num < 5:
# inst_col['cat'] = 'brain'
# else:
# inst_col['cat'] = 'lung'

# save to columns
inst_col['data'] = [] #vector

Expand Down

0 comments on commit b17bc18

Please sign in to comment.