<commit_before>from colorful.fields import RGBColorField
from django.db import models


class SNPMarker(models.Model):
    rsid = models.BigIntegerField()
    link = models.TextField()
    risk_allele = models.CharField(max_length=128)
    disease_trait = models.TextField()
    comment = models.TextField()
    p_value = models.FloatField(blank=True, null=True)
    or_or_beta = models.FloatField(blank=True, null=True)

    def __str__(self):
        return '{} - {} - {}'.format(self.rsid, self.risk_allele, self.disease_trait)

class AlleleColor(models.Model):
    priority = models.PositiveIntegerField(default=100)
    color = RGBColorField()
    allele = models.CharField(max_length=128)
    snp_marker = models.ForeignKey(SNPMarker, related_name='allele_colors')

    def __str__(self):
        return self.color
<commit_msg>Add AnalyzeDataOrder model<commit_after>from colorful.fields import RGBColorField
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import models


class SNPMarker(models.Model):
    rsid = models.BigIntegerField()
    link = models.TextField()
    risk_allele = models.CharField(max_length=128)
    disease_trait = models.TextField()
    comment = models.TextField()
    p_value = models.FloatField(blank=True, null=True)
    or_or_beta = models.FloatField(blank=True, null=True)

    def __str__(self):
        return '{} - {} - {}'.format(self.rsid, self.risk_allele, self.disease_trait)

class AlleleColor(models.Model):
    priority = models.PositiveIntegerField(default=100)
    color = RGBColorField()
    allele = models.CharField(max_length=128)
    snp_marker = models.ForeignKey(SNPMarker, related_name='allele_colors')

    def __str__(self):
        return self.color

class AnalyzeDataOrder(models.Model):
    user = models.ForeignKey(settings.AUTH_USER_MODEL)
    uploaded_filename = models.CharField(max_length=256)
    status = models.BooleanField(default=False)

    class Meta:
        unique_together = (('user', 'uploaded_filename'),)
{'fraction_non_alphanumeric': 0.10919822921790458, 'fraction_numerical': 0.010329562223315297, 'mean_word_length': 4.453083109919571, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '630703', 'n_tokens_mistral': 660, 'n_tokens_neox': 629, 'n_words': 117}