Skip to content

Commit

Permalink
Update reduce_petagraph_csv_size_github_actions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
benstear authored Nov 16, 2023
1 parent cd657d9 commit 1dcdc20
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions tests/reduce_petagraph_csv_size_github_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,8 @@
#path='/Users/stearb/Desktop/DESKTOP_TRANSFER/R03_local/Petagraph_Sept2023/data/base_csvs/basecontext10Sep2023/'
path='/var/lib/neo4j/import/'


# In[ ]:





# In[3]:


cuicodes = pd.read_csv(path+'CUI-CODEs.csv')


# In[4]:


#c=dict(Counter([i.split(':')[0] for i in cuicodes[':END_ID']]).most_common())
#plt.bar(height=list(c.values()),x=range(len(list(c.values()))))


# In[5]:


dropsabs = ['HSCLO','MSH','MEDCIN','LNC','MTH','NDC','ICD10PCS','MTHSPL','REFSEQ','RXNORM','ICD10CM','ICPC2ICD10ENG','MDR',
'MMSL','UWDA','CHV','CPT','SNOMEDCT_VET','GS','ORPHANET','NDDF','VANDF','UMD','MMX','ICD10AM','ICD9CM',
'HCPT','MTHICD9','PDQ','CSP','NIC','LCH_NW','ICD10','NOC','DRUGBANK']
Expand All @@ -60,7 +39,7 @@
cuicodes_reduced.to_csv('/var/lib/neo4j/import/CUI-CODEs.csv',index=False)

del cuicodes

'''
print('HEREEEEEEEE')
codes = pd.read_csv(path+'CODEs.csv')
codes_reduced = codes[codes['SAB'].isin(cuicodes_reduced['sabs'].values)]
Expand All @@ -82,7 +61,7 @@
cuicodes_reduced.drop('sabs',axis=1,inplace=True)

'''

# In[9]:

Expand All @@ -102,9 +81,6 @@

# # CUI-CUIs

# In[10]:


cuicuis = pd.read_csv(path+'CUI-CUIs.csv')

# DROP CUIs from START_ID and END_ID cols
Expand Down

0 comments on commit 1dcdc20

Please sign in to comment.