<commit_before>from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.orm import backref
from werkzeug.utils import cached_property

from database import db, count_expression
from .model import BioModel, make_association_table
from .protein import Protein


class GeneListEntry(BioModel):
    gene_list_id = db.Column(db.Integer, db.ForeignKey('genelist.id'))

    p = db.Column(db.Float(precision=53))
    fdr = db.Column(db.Float(precision=53))

    gene_id = db.Column(db.Integer, db.ForeignKey('gene.id'))
    gene = db.relationship('Gene')


class GeneList(BioModel):
    name = db.Column(db.String(256), nullable=False, unique=True, index=True)
    entries = db.relationship(GeneListEntry)

    # some gene lists are specific only to one type of mutations:
    mutation_source_name = db.Column(db.String(256))


class Gene(BioModel):
    """Gene is uniquely identified although has multiple protein isoforms.

    The isoforms are always located on the same chromosome, strand and are
    a product of the same gene. The major function of this model is to group
    isoforms classified as belonging to the same gene and to verify
    consistency of chromosomes and strands information across the database.
    """<commit_msg>Correct the max length of gene list name<commit_after>from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.orm import backref
from werkzeug.utils import cached_property

from database import db, count_expression
from .model import BioModel, make_association_table
from .protein import Protein


class GeneListEntry(BioModel):
    gene_list_id = db.Column(db.Integer, db.ForeignKey('genelist.id'))

    p = db.Column(db.Float(precision=53))
    fdr = db.Column(db.Float(precision=53))

    gene_id = db.Column(db.Integer, db.ForeignKey('gene.id'))
    gene = db.relationship('Gene')


class GeneList(BioModel):
    name = db.Column(db.String(255), nullable=False, unique=True, index=True)
    entries = db.relationship(GeneListEntry)

    # some gene lists are specific only to one type of mutations:
    mutation_source_name = db.Column(db.String(256))


class Gene(BioModel):
    """Gene is uniquely identified although has multiple protein isoforms.

    The isoforms are always located on the same chromosome, strand and are
    a product of the same gene. The major function of this model is to group
    isoforms classified as belonging to the same gene and to verify
    consistency of chromosomes and strands information across the database.
    """
{'fraction_non_alphanumeric': 0.07893738140417457, 'fraction_numerical': 0.007590132827324478, 'mean_word_length': 4.561181434599156, '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': '7119931', 'n_tokens_mistral': 803, 'n_tokens_neox': 717, 'n_words': 255}