Skip to content

Commit

Permalink
update read gmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cwieder committed Dec 13, 2023
1 parent 70e7bee commit 7d41cc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sspa/process_pathways.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def process_gmt(infile):
GMT-like pd.DataFrame containing pathways
'''
if infile[-4:] == ".csv":
pathways_df = pd.read_csv(infile, index_col=0)
pathways_df = pd.read_csv(infile, index_col=0, dtype='object')
elif infile[-4:] == ".gmt":
input_gmt = []
with open(infile, "r") as f:
Expand All @@ -120,6 +120,6 @@ def process_gmt(infile):

pathways_df = pathways_df.dropna(axis=0, how='all', subset=pathways_df.columns.tolist()[1:])
pathways_df = pathways_df.dropna(axis=1, how='all')

pathways_df = pathways_df.astype('object')
return pathways_df

0 comments on commit 7d41cc9

Please sign in to comment.