<commit_before># -*- coding: utf-8 -*-
from mongoengine import (Document, ListField, StringField, FloatField,
                         DateTimeField, BooleanField, EmbeddedDocument,
                         EmbeddedDocumentField, MapField, ReferenceField,
                         IntField, SortedListField)

ACTIONS = ['add', 'delete', 'edit']

class Gene(EmbeddedDocument):

    meta = {'strict': False}

    hgnc_id = IntField(required=True)
    symbol = StringField()

    disease_associated_transcripts = ListField(StringField())
    reduced_penetrance = BooleanField(default=False)
    mosaicism = BooleanField(default=False)
    database_entry_version = StringField()

    ar = BooleanField()
    ad = BooleanField()
    mt = BooleanField()
    xr = BooleanField()
    xd = BooleanField()
    x = BooleanField()
    y = BooleanField()

    action = StringField(choices=ACTIONS)
    
    def __unicode__(self):
        return "{this.hgnc_id}: {this.symbol}".format(this=self)


class GenePanel(Document):
<commit_msg>add fields to panel gene<commit_after># -*- coding: utf-8 -*-
from mongoengine import (Document, ListField, StringField, FloatField,
                         DateTimeField, BooleanField, EmbeddedDocument,
                         EmbeddedDocumentField, MapField, ReferenceField,
                         IntField, SortedListField)

ACTIONS = ['add', 'delete', 'edit']

class Gene(EmbeddedDocument):

    meta = {'strict': False}

    hgnc_id = IntField(required=True)
    symbol = StringField()

    disease_associated_transcripts = ListField(StringField())
    reduced_penetrance = BooleanField(default=False)
    mosaicism = BooleanField(default=False)
    database_entry_version = StringField()
    inheritance_models = ListField(StringField())
    curator = StringField()

    ar = BooleanField()
    ad = BooleanField()
    mt = BooleanField()
    xr = BooleanField()
    xd = BooleanField()
    x = BooleanField()
    y = BooleanField()

    action = StringField(choices=ACTIONS)

    def __unicode__(self):
        return "{this.hgnc_id}: {this.symbol}".format(this=self)


class GenePanel(Document):

{'fraction_non_alphanumeric': 0.10886907555138432, 'fraction_numerical': 0.0009385265133740028, 'mean_word_length': 3.155945419103314, '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': '772080', 'n_tokens_mistral': 623, 'n_tokens_neox': 595, 'n_words': 132}