VyLala commited on
Commit
e80d020
·
verified ·
1 Parent(s): 26b8b6f

Upload 2 files

Browse files
.gitattributes CHANGED
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  credentials.json filter=crypt diff=crypt
37
 
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  credentials.json filter=crypt diff=crypt
37
 
38
+ A_flowchart_in_the_image_illustrates_a_data_proces.png filter=lfs diff=lfs merge=lfs -text
A_flowchart_in_the_image_illustrates_a_data_proces.png ADDED

Git LFS Details

  • SHA256: 0edc2e766793aba72cf84d275ced4ecaab929be01eef08faef3bbde1e158ac34
  • Pointer size: 132 Bytes
  • Size of remote file: 1.51 MB
mtdna_tool_explainer_updated.html ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>mtDNA Tool – System Overview</title>
7
+ <style>
8
+ body { font-family: Arial, sans-serif; line-height: 1.6; padding: 2rem; max-width: 900px; margin: auto; background-color: #f9f9f9; color: #333; }
9
+ h1, h2 { color: #2c3e50; }
10
+ img { max-width: 100%; border: 1px solid #ccc; padding: 5px; background: #fff; }
11
+ code { background: #eee; padding: 2px 4px; border-radius: 4px; }
12
+ .highlight { background: #ffffcc; padding: 4px 8px; border-left: 4px solid #ffcc00; margin: 1rem 0; }
13
+ </style>
14
+ </head>
15
+ <body>
16
+
17
+ <h1>mtDNA Location Classifier – Brief System Pipeline and Usage Guide</h1>
18
+
19
+ <p>The <strong>mtDNA Tool</strong> is a lightweight pipeline designed to help researchers extract metadata such as geographic origin, sample type (ancient/modern), and optional niche labels (e.g., ethnicity, specific location) from mtDNA GenBank accession numbers. It supports batch input and produces structured Excel summaries.</p>
20
+
21
+ <h2>System Overview Diagram</h2>
22
+ <p>The figure below shows the core execution flow—from input accession to final output.</p>
23
+ <img src="./A_flowchart_in_the_image_illustrates_a_data_proces.png" alt="mtDNA Pipeline Flowchart">
24
+
25
+ <h2>Key Steps</h2>
26
+ <ol>
27
+ <li><strong>Input</strong>: One or more GenBank accession numbers are submitted (e.g., via UI, CSV, or text).</li>
28
+
29
+ <li><strong>Metadata Collection</strong>: Using <code>fetch_ncbi_metadata</code>, the pipeline retrieves metadata like country, isolate, collection date, and reference title. If available, supplementary material and full-text articles are parsed using DOI, PubMed, or Google Custom Search.</li>
30
+
31
+ <li><strong>Text Extraction & Preprocessing</strong>:
32
+ <ul>
33
+ <li>All available documents are parsed and cleaned (tables, paragraphs, overlapping sections).</li>
34
+ <li>Text is merged into two formats: a smaller <code>chunk</code> and a full <code>all_output</code>.</li>
35
+ </ul>
36
+ </li>
37
+
38
+ <li><strong>LLM-based Inference (Gemini + RAG)</strong>:
39
+ <ul>
40
+ <li>Chunks are embedded with FAISS and stored for reuse.</li>
41
+ <li>The Gemini model answers specific queries like predicted country, sample type, and any niche label requested by the user.</li>
42
+ </ul>
43
+ </li>
44
+
45
+ <li><strong>Result Structuring</strong>:
46
+ <ul>
47
+ <li>Each output includes predicted fields + explanation text (methods used, quotes, sources).</li>
48
+ <li>Summarized and saved using <code>save_to_excel</code>.</li>
49
+ </ul>
50
+ </li>
51
+ </ol>
52
+
53
+ <h2>Output Format</h2>
54
+ <p>The final output is an Excel file with the following fields:</p>
55
+ <ul>
56
+ <li><code>Sample ID</code></li>
57
+ <li><code>Predicted Country</code> and <code>Country Explanation</code></li>
58
+ <li><code>Predicted Sample Type</code> and <code>Sample Type Explanation</code></li>
59
+ <li><code>Sources</code> (links to articles)</li>
60
+ <li><code>Time Cost</code></li>
61
+ </ul>
62
+
63
+ <h2>System Highlights</h2>
64
+ <ul>
65
+ <li>RAG + Gemini integration for improved explanation and transparency</li>
66
+ <li>Excel export for structured research use</li>
67
+ <li>Optional ethnic/location/language inference using isolate names</li>
68
+ <li>Quality check (e.g., fallback on short explanations, low token count)</li>
69
+ <li>Report Button – After results are displayed, users can submit errors or mismatches using the report text box below the output table</li>
70
+ </ul>
71
+
72
+ <h2>Citation</h2>
73
+ <div class="highlight">
74
+ Phung, V. (2025). mtDNA Location Classifier. HuggingFace Spaces. https://huggingface.co/spaces/VyLala/mtDNALocation
75
+ </div>
76
+
77
+ <h2>Contact</h2>
78
+ <p>If you are a researcher working with historical mtDNA data or edge-case accessions and need scalable inference or logging, reach out through the HuggingFace space or email provided in the repo README.</p>
79
+
80
+ </body>
81
+ </html>