Skip to content

Commit

Permalink
Fix pdb structure in test 1 and motif position indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
choang committed Jun 28, 2023
1 parent 6185c16 commit 70e4e7b
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions gget/gget_elm.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,15 @@ def elm(
value = value.strip().replace("\n", " ").replace("\t", " ")
df_2.loc[elm_id, column_ignored_colon] = value

if not uniprot:
# Get motifs associated with each elm id in original sequence
start = df.iloc[elm_id_index]['start']
stop = df.iloc[elm_id_index]['stop']
print(type(start))
print(type(stop))
if isinstance(start, int) & isinstance(stop, int):
df_2.loc[elm_id, 'Motif in original sequence'] = sequence[start-1: stop]
print(sequence[start-1: stop])
else:
df_2.loc[elm_id, 'Motif in original sequence'] = np.nan
if not uniprot:
# 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):
df_2.loc[elm_id, 'Motif in original sequence'] = sequence[start-1: stop]
print(sequence[start-1: stop])
else:
df_2.loc[elm_id, 'Motif in original sequence'] = np.nan

# if a motif is found more than once in a UniProt ID or sequence, df_2 will have duplicate rows
df_2 = df_2.drop_duplicates()
Expand Down

0 comments on commit 70e4e7b

Please sign in to comment.