Skip to content

Commit

Permalink
Fix motif in sequence nan issue
Browse files Browse the repository at this point in the history
  • Loading branch information
choang committed Jun 28, 2023
1 parent f067576 commit 2b8668e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gget/gget_elm.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def elm(
# Get motifs associated with each elm id in original sequence
start = df.iloc[elm_id_index]['start']
stop = df.iloc[elm_id_index]['stop']
if isinstance(start, int) & isinstance(stop, int):
# numpy.int64 is not Python int, therefore needing additional np.integer
if isinstance(start, (int, np.integer)) & isinstance(stop, (int, np.integer)):
df_2.loc[elm_id, 'Motif in original sequence'] = sequence[start-1: stop]
print(sequence[start-1: stop])
else:
Expand Down

0 comments on commit 2b8668e

Please sign in to comment.