Skip to content

Commit

Permalink
Addresses #177
Browse files Browse the repository at this point in the history
  • Loading branch information
x0xMaximus committed Nov 2, 2016
1 parent 8e59728 commit e1481d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mark2cure/common/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,14 @@ def clean_df(df, overlap_protection=False, allow_duplicates=True):
# df = df[df['ann_type'].isin(['Chemical', 'Gene', 'Disease'])]
df = df[df['ann_type'].isin(ann_types_arr)]
df['ann_type_id'] = 0

df.ix[df['ann_type'] == 'disease', 'ann_type_id'] = 0

df.ix[df['ann_type'] == 'gene', 'ann_type_id'] = 1
df.ix[df['ann_type'] == 'gene_protein', 'ann_type_id'] = 1 # M2C Enum Syntax

df.ix[df['ann_type'] == 'chemical', 'ann_type_id'] = 2
df.ix[df['ann_type'] == 'drug', 'ann_type_id'] = 2 # M2C Enum Syntax

# We're previously DB Primary Keys
df.reset_index(inplace=True)
Expand Down

0 comments on commit e1481d0

Please sign in to comment.