Spaces:
Sleeping
Sleeping
Commit ·
32560ed
1
Parent(s): d137e98
Add default data.
Browse files- GHIST_2024_bottleneck.fs +3 -0
- app.py +2 -2
GHIST_2024_bottleneck.fs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
41 unfolded "mypop"
|
| 2 |
+
0 24020 18388 15133 14035 11804 10010 9326 8458 7321 7412 6421 5993 5382 5193 4645 4338 4042 3883 4051 3479 3518 3140 2890 2940 2859 2874 2391 2518 2456 2505 2093 2133 2122 1926 2118 2029 1882 1784 1898 0
|
| 3 |
+
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
app.py
CHANGED
|
@@ -43,7 +43,7 @@ def dadi_main(log10nu, log10T, theta, mu, L, fname, state=None):
|
|
| 43 |
fig.clear()
|
| 44 |
|
| 45 |
# If we have a data filename for the first time, or if it has changed, load the data
|
| 46 |
-
if (state is None
|
| 47 |
if fname.endswith('.fs'):
|
| 48 |
data = dadi.Spectrum.from_file(fname)
|
| 49 |
elif '.vcf' in fname:
|
|
@@ -124,7 +124,7 @@ twoepoch = gr.Interface(
|
|
| 124 |
gr.Slider(0,5e5,10, randomize=True),
|
| 125 |
gr.Number(label="Mutation rate (mu)", value=1.4e-8),
|
| 126 |
gr.Number(label="Sequence length (L)", value=1e8),
|
| 127 |
-
gr.File(label="Data file (.vcf, .vcf.gz, or .fs)"),
|
| 128 |
gr.State(value=None)],
|
| 129 |
outputs=[gr.Plot(),
|
| 130 |
gr.Textbox(label="nu", lines=1),
|
|
|
|
| 43 |
fig.clear()
|
| 44 |
|
| 45 |
# If we have a data filename for the first time, or if it has changed, load the data
|
| 46 |
+
if (state is None) or (state is not None and state[1] != fname):
|
| 47 |
if fname.endswith('.fs'):
|
| 48 |
data = dadi.Spectrum.from_file(fname)
|
| 49 |
elif '.vcf' in fname:
|
|
|
|
| 124 |
gr.Slider(0,5e5,10, randomize=True),
|
| 125 |
gr.Number(label="Mutation rate (mu)", value=1.4e-8),
|
| 126 |
gr.Number(label="Sequence length (L)", value=1e8),
|
| 127 |
+
gr.File('GHIST_2024_bottleneck.fs', label="Data file (.vcf, .vcf.gz, or .fs)"),
|
| 128 |
gr.State(value=None)],
|
| 129 |
outputs=[gr.Plot(),
|
| 130 |
gr.Textbox(label="nu", lines=1),
|