<commit_before># -*- coding: utf-8 -*-
"""
"main concept of MongoDB is embed whenever possible"
Ref: http://stackoverflow.com/questions/4655610#comment5129510_4656431
"""
from __future__ import (absolute_import, division)

from mongoengine import (EmbeddedDocument, StringField, ListField, BooleanField,
                         IntField)

from scout.constants import (SO_TERM_KEYS, CONSEQUENCE, FEATURE_TYPES)

transcript = dict(
    # The ensemble transcript id
    transcript_id = StringField(required=True)
    # The hgnc gene id
    hgnc_id = IntField()

    ### Protein specific predictions ###
    # The ensemble protein id
    protein_id = StringField()
    # The sift consequence prediction for this transcript
    sift_prediction = StringField(choices=CONSEQUENCE)
    # The polyphen consequence prediction for this transcript
    polyphen_prediction = StringField(choices=CONSEQUENCE)
    # The swiss protein id for the product
    swiss_prot = StringField()
    # The pfam id for the protein product
    pfam_domain = StringField()
    # The prosite id for the product
    prosite_profile = StringField()
    # The smart id for the product
    smart_domain = StringField()

    # The biotype annotation for the transcript
    biotype = StringField()
    # The functional annotations for the transcript
    functional_annotations = ListField(StringField(choices=SO_TERM_KEYS))
    # The region annotations for the transcripts
    region_annotations = ListField(StringField(choices=FEATURE_TYPES))
    # The exon number in the transcript e.g '2/7'
    exon = StringField()
    # The intron number in the transcript e.g '4/6'
    intron = StringField()
    # The strand of the transcript e.g '+'
    strand = StringField()
    # the CDNA change of the transcript e.g 'c.95T>C'
    coding_sequence_name = StringField()
    # The amino acid change on the transcript e.g. 'p.Phe32Ser'
    protein_sequence_name = StringField()

    # If the transcript is relevant
    is_canonical = BooleanField()
    
)

class Transcript(EmbeddedDocument):
    # The ensemble transcript id
    transcript_id = StringField(required=True)
    # The hgnc gene id
    hgnc_id = IntField()<commit_msg>Nothing<commit_after># -*- coding: utf-8 -*-
"""
"main concept of MongoDB is embed whenever possible"
Ref: http://stackoverflow.com/questions/4655610#comment5129510_4656431
"""
from __future__ import (absolute_import, division)

from mongoengine import (EmbeddedDocument, StringField, ListField, BooleanField,
                         IntField)

from scout.constants import (SO_TERM_KEYS, CONSEQUENCE, FEATURE_TYPES)

# transcript = dict(
#     # The ensemble transcript id
#     transcript_id = StringField(required=True)
#     # The hgnc gene id
#     hgnc_id = IntField()
#
#     ### Protein specific predictions ###
#     # The ensemble protein id
#     protein_id = StringField()
#     # The sift consequence prediction for this transcript
#     sift_prediction = StringField(choices=CONSEQUENCE)
#     # The polyphen consequence prediction for this transcript
#     polyphen_prediction = StringField(choices=CONSEQUENCE)
#     # The swiss protein id for the product
#     swiss_prot = StringField()
#     # The pfam id for the protein product
#     pfam_domain = StringField()
#     # The prosite id for the product
#     prosite_profile = StringField()
#     # The smart id for the product
#     smart_domain = StringField()
#
#     # The biotype annotation for the transcript
#     biotype = StringField()
#     # The functional annotations for the transcript
#     functional_annotations = ListField(StringField(choices=SO_TERM_KEYS))
#     # The region annotations for the transcripts
#     region_annotations = ListField(StringField(choices=FEATURE_TYPES))
#     # The exon number in the transcript e.g '2/7'
#     exon = StringField()
#     # The intron number in the transcript e.g '4/6'
#     intron = StringField()
#     # The strand of the transcript e.g '+'
#     strand = StringField()
#     # the CDNA change of the transcript e.g 'c.95T>C'
#     coding_sequence_name = StringField()
#     # The amino acid change on the transcript e.g. 'p.Phe32Ser'
#     protein_sequence_name = StringField()
#
#     # If the transcript is relevant
#     is_canonical = BooleanField()
#
# )

class Transcript(EmbeddedDocument):
    # The ensemble transcript id
    transcript_id = StringField(required=True)
    # The hgnc gene id
    hgnc_id = IntField()
{'fraction_non_alphanumeric': 0.08434547908232119, 'fraction_numerical': 0.01349527665317139, 'mean_word_length': 3.5470347648261757, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7130695', 'n_tokens_mistral': 1377, 'n_tokens_neox': 1283, 'n_words': 401}