Skip to content

Commit 80f27b7

Browse files
committed
Add is_marg to models/API
1 parent e52049d commit 80f27b7

3 files changed

Lines changed: 40 additions & 1 deletion

File tree

colocus/api/serializers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ class Meta:
249249
'neg_log_p',
250250
'effect_cond',
251251
'effect_marg',
252-
'cond_minp_variant'
252+
'cond_minp_variant',
253+
'is_marg'
253254
)
254255

255256

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Generated by Django 4.2.9 on 2025-04-06 16:31
2+
3+
from django.db import migrations, models
4+
import django.db.models.deletion
5+
6+
7+
class Migration(migrations.Migration):
8+
dependencies = [
9+
("core", "0001_initial"),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name="finemappedsignal",
15+
name="is_marg",
16+
field=models.BooleanField(
17+
default=False,
18+
help_text="True if this signal's summary statistics are from the marginal analysis, not a conditional analysis.This can happen in cases where the marginal analysis is the only analysis (no conditional analysis was needed), or if there was a problem in fine-mapping at this particular locus",
19+
),
20+
),
21+
migrations.AlterField(
22+
model_name="marginalanalysis",
23+
name="dataset",
24+
field=models.ForeignKey(
25+
help_text="Analysis was part of this dataset",
26+
on_delete=django.db.models.deletion.CASCADE,
27+
related_name="marginal_analyses",
28+
to="core.dataset",
29+
),
30+
),
31+
]

colocus/core/models.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,13 @@ class FineMappedSignal(models.Model):
526526
"that variant will also be the most significant in the conditional analysis."
527527
)
528528

529+
is_marg = models.BooleanField(
530+
default=False,
531+
null=False,
532+
help_text="True if this signal's summary statistics are from the marginal analysis, not a conditional analysis."
533+
"This can happen in cases where the marginal analysis is the only analysis (no conditional analysis was needed),"
534+
" or if there was a problem in fine-mapping at this particular locus")
535+
529536

530537
class ColocResult(models.Model):
531538
"""

0 commit comments

Comments
 (0)