Skip to content

Commit

Permalink
Fixed processing of references in Baccin2019
Browse files Browse the repository at this point in the history
  • Loading branch information
npalacioescat committed Nov 19, 2024
1 parent 940309e commit f507bf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pypath/inputs/baccin2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def get_partners(components, sources, references):
_ref for _ref in
(
ref.strip().replace('.0', '')
for ref in rec[7].split(',')
for ref in str(rec[7]).split(',')
)
if _ref.isdigit()
}
Expand Down
6 changes: 6 additions & 0 deletions pypath/inputs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,17 @@ def read_xls(
)

try:

if isinstance(sheet, int):

sheet = book.sheet_by_index(sheet)

else:

sheet = book.sheet_by_name(sheet)

except xlrd.biffh.XLRDError:

sheet = book.sheet_by_index(0)

table = [
Expand Down

0 comments on commit f507bf9

Please sign in to comment.