Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -47,12 +47,12 @@ if uploaded_file and st.button("Analyze File"):
|
|
47 |
percentage = {aa: round(count[aa] / length * 100, 2) for aa in AMINO_ACIDS}
|
48 |
result_rows.append({"Entry": entry, "Protein Name": name, **percentage})
|
49 |
|
50 |
-
df_result = pd.DataFrame(result_rows)
|
51 |
-
|
52 |
# Calculate overall percentage
|
53 |
overall_percentage = {aa: round(all_counts[aa] / all_length * 100, 2) for aa in AMINO_ACIDS}
|
54 |
overall_row = {"Entry": "OVERALL", "Protein Name": "ALL SEQUENCES", **overall_percentage}
|
55 |
-
|
|
|
|
|
56 |
|
57 |
st.dataframe(df_result)
|
58 |
|
|
|
47 |
percentage = {aa: round(count[aa] / length * 100, 2) for aa in AMINO_ACIDS}
|
48 |
result_rows.append({"Entry": entry, "Protein Name": name, **percentage})
|
49 |
|
|
|
|
|
50 |
# Calculate overall percentage
|
51 |
overall_percentage = {aa: round(all_counts[aa] / all_length * 100, 2) for aa in AMINO_ACIDS}
|
52 |
overall_row = {"Entry": "OVERALL", "Protein Name": "ALL SEQUENCES", **overall_percentage}
|
53 |
+
|
54 |
+
# Combine overall row first, then all individual rows
|
55 |
+
df_result = pd.concat([pd.DataFrame([overall_row]), pd.DataFrame(result_rows)], ignore_index=True)
|
56 |
|
57 |
st.dataframe(df_result)
|
58 |
|