Spaces:
No application file
No application file
Update test.py
Browse files
test.py
CHANGED
|
@@ -1,52 +1,7 @@
|
|
| 1 |
import pandas as pd
|
| 2 |
import re
|
| 3 |
|
| 4 |
-
# Example text extracted from the provided screenshot
|
| 5 |
-
llm_response = """
|
| 6 |
-
Table 1: Biomarker Results
|
| 7 |
-
Biomarker | Method | Result
|
| 8 |
-
--- | --- | ---
|
| 9 |
-
Microsatellite Instability (MSI) | NGS | Stable
|
| 10 |
-
Tumor Mutational Burden (TMB) | NGS | Low
|
| 11 |
|
| 12 |
-
Table 2: Gene Mutations
|
| 13 |
-
Gene | Method | Variant | Interpretation | Protein Alteration | Exon | DNA Alteration | Variant Frequency (%)
|
| 14 |
-
--- | --- | --- | --- | --- | --- | --- | ---
|
| 15 |
-
ARID1A | NGS | Mutated, Pathogenic | p.P227fs | | | 24 |
|
| 16 |
-
CDKN2A | NGS | Mutated, Pathogenic | p.W15* | | | 26 |
|
| 17 |
-
KRAS | NGS | Mutated, Pathogenic | p.G12D | | | 32 |
|
| 18 |
-
TP53 | NGS | Mutated, Pathogenic | p.Y163C | | | 29 |
|
| 19 |
-
|
| 20 |
-
Table 3: Other Findings
|
| 21 |
-
Biomarker | Result
|
| 22 |
-
--- | ---
|
| 23 |
-
MLH1 | Positive
|
| 24 |
-
PD-L1 | Negative
|
| 25 |
-
MSH2 | Positive
|
| 26 |
-
PMS2 | Positive
|
| 27 |
-
MSH6 | Positive
|
| 28 |
-
|
| 29 |
-
Table 4: Genes Tested Without Point Mutations or Indels
|
| 30 |
-
Genes | Tested
|
| 31 |
-
--- | ---
|
| 32 |
-
BRCA2 |
|
| 33 |
-
EGFR |
|
| 34 |
-
IDH1 |
|
| 35 |
-
KIT |
|
| 36 |
-
MET |
|
| 37 |
-
NRAS |
|
| 38 |
-
NTRK1 |
|
| 39 |
-
NTRK2 |
|
| 40 |
-
Neu |
|
| 41 |
-
NTRK3 |
|
| 42 |
-
ERBB2 |
|
| 43 |
-
ATM |
|
| 44 |
-
BRAF |
|
| 45 |
-
PDGFRA |
|
| 46 |
-
PIK3CA |
|
| 47 |
-
RET |
|
| 48 |
-
SMARCB1 |
|
| 49 |
-
"""
|
| 50 |
|
| 51 |
# Function to parse tables from the response
|
| 52 |
def parse_tables(response_text):
|
|
|
|
| 1 |
import pandas as pd
|
| 2 |
import re
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# Function to parse tables from the response
|
| 7 |
def parse_tables(response_text):
|