Skip to content

Commit

Permalink
Merge pull request #42 from TyberiusPrime/master
Browse files Browse the repository at this point in the history
Significant speed up in pandasGEXpress
  • Loading branch information
oena committed Jun 22, 2018
2 parents c3631b7 + c1653b5 commit 7214fd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmapPy/pandasGEXpress/parse_gctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def get_ordered_idx(id_type, id_list, meta_df):
if id_type is None:
id_list = range(0, len(list(meta_df.index)))
elif id_type == "id":
id_list = [list(meta_df.index).index(str(i)) for i in id_list]
lookup = {x: i for (i,x) in enumerate(meta_df.index)}
id_list = [lookup[str(i)] for i in id_list]
return sorted(id_list)
else:
return None
Expand Down

0 comments on commit 7214fd4

Please sign in to comment.