Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1898,9 +1898,10 @@ with gr.Blocks(theme=theme, title='DeepSEQreen', css=CSS, delete_cache=(3600, 48
|
|
1898 |
exact_match = alignment_df[alignment_df['X2'] == processed_fasta]
|
1899 |
if not exact_match.empty:
|
1900 |
row = exact_match.iloc[0]
|
|
|
1901 |
return gr.Dropdown(
|
1902 |
-
value=
|
1903 |
-
info=f"Reason: Exact match found with {row['ID2']} from family {
|
1904 |
|
1905 |
# If no exact match, then calculate alignment score
|
1906 |
def align_score(query):
|
@@ -1909,7 +1910,7 @@ with gr.Blocks(theme=theme, title='DeepSEQreen', css=CSS, delete_cache=(3600, 48
|
|
1909 |
|
1910 |
alignment_df['score'] = alignment_df['X2'].parallel_apply(align_score)
|
1911 |
row = alignment_df.loc[alignment_df['score'].idxmax()]
|
1912 |
-
family = row['Target Family'].title()
|
1913 |
return gr.Dropdown(value=family,
|
1914 |
info=f"Reason: Best sequence identity ({row['score']}) "
|
1915 |
f"with {row['ID2']} from family {family}")
|
|
|
1898 |
exact_match = alignment_df[alignment_df['X2'] == processed_fasta]
|
1899 |
if not exact_match.empty:
|
1900 |
row = exact_match.iloc[0]
|
1901 |
+
family = str(row['Target Family']).title()
|
1902 |
return gr.Dropdown(
|
1903 |
+
value=family,
|
1904 |
+
info=f"Reason: Exact match found with {row['ID2']} from family {family}")
|
1905 |
|
1906 |
# If no exact match, then calculate alignment score
|
1907 |
def align_score(query):
|
|
|
1910 |
|
1911 |
alignment_df['score'] = alignment_df['X2'].parallel_apply(align_score)
|
1912 |
row = alignment_df.loc[alignment_df['score'].idxmax()]
|
1913 |
+
family = str(row['Target Family']).title()
|
1914 |
return gr.Dropdown(value=family,
|
1915 |
info=f"Reason: Best sequence identity ({row['score']}) "
|
1916 |
f"with {row['ID2']} from family {family}")
|