tonigi commited on
Commit
1fb077a
·
1 Parent(s): 9b875e2
Files changed (2) hide show
  1. README.txt +43 -0
  2. app.py +20 -1
README.txt ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Protein Sequence Table
2
+
3
+ A Gradio-based web application that reformats protein sequences based on UniProt IDs and displays detailed annotations in a structured format.
4
+
5
+ ## Features
6
+
7
+ The application retrieves protein data from UniProt and presents the following information for each residue:
8
+ - Position number in the sequence
9
+ - Amino acid (single-letter code)
10
+ - Secondary structure annotation
11
+ - Associated Pfam domain
12
+ - Disorder prediction
13
+ - Participation in disulfide bridges
14
+ - Post-translational modifications:
15
+ * Glycosylation sites
16
+ * Phosphorylation sites
17
+ - Functional annotations:
18
+ * Active sites
19
+ * Metal binding sites
20
+ * DNA binding regions
21
+ * RNA binding regions
22
+ * Ligand binding sites
23
+ * Other modifications
24
+
25
+ ## Usage
26
+
27
+ 1. Launch the application
28
+ 2. Enter a valid UniProt ID (e.g., P53_HUMAN) in the input field
29
+ 3. Click "Submit" to generate the analysis
30
+ 4. Results will be displayed in a interactive data frame format
31
+
32
+ ## Requirements
33
+
34
+ - Python 3.7+
35
+ - Gradio
36
+ - Pandas
37
+ - Requests
38
+ - XML parsing libraries
39
+
40
+ ## Note
41
+
42
+ The application processes UniProt's XML format to extract annotations.
43
+
app.py CHANGED
@@ -244,8 +244,27 @@ def process_uniprot_id(uniprot_id):
244
  with gr.Blocks() as demo:
245
  with gr.Column():
246
  gr.Markdown("# Protein Sequence Analysis")
247
- input_text = gr.Textbox(label="UniProt ID", placeholder="Enter UniProt ID (e.g., P53_HUMAN)")
 
 
 
 
248
  submit_btn = gr.Button("Submit")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  output_df = gr.Dataframe()
250
 
251
  submit_btn.click(
 
244
  with gr.Blocks() as demo:
245
  with gr.Column():
246
  gr.Markdown("# Protein Sequence Analysis")
247
+ input_text = gr.Textbox(
248
+ label="UniProt ID",
249
+ placeholder="Enter UniProt ID (e.g., P53_HUMAN)",
250
+ value="", # Empty default value
251
+ )
252
  submit_btn = gr.Button("Submit")
253
+
254
+ # Add examples
255
+ gr.Examples(
256
+ examples=[
257
+ ["P06280"], # Alpha-galactosidase A
258
+ ["P04637"], # Tumor protein p53
259
+ ["P01308"], # Insulin
260
+ ["Q8WZ42"], # Titin
261
+ ["P04637"], # p53 (alternate entry)
262
+ ["P0DTC2"], # SARS-CoV-2 Spike protein
263
+ ],
264
+ inputs=input_text,
265
+ label="Example UniProt IDs"
266
+ )
267
+
268
  output_df = gr.Dataframe()
269
 
270
  submit_btn.click(