예제 #1
0
class DupeGeneNote(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    date = db.Column(db.DateTime)
    author = db.Column(db.String(255))
    body = db.Column(db.Text())
    gene_description_id = db.Column(db.Integer,
                                    db.ForeignKey('gene_description.id'))
    gene_description = db.relationship('GeneDescription', backref='dupe_notes')
    genotype_id = db.Column(db.Integer, db.ForeignKey('genotype.id'))
    genotype = db.relationship('Genotype', backref='dupe_notes')
예제 #2
0
class PubId(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    pubmed_id = db.Column(db.String(1000))
    pub_title = db.Column(db.Text())
    pub_authors = db.Column(db.Text())
    repertoire_id = db.Column(db.Integer, db.ForeignKey('repertoire.id'))
    repertoire = db.relationship('Repertoire', backref='pub_ids')
    sequence_id = db.Column(db.Integer, db.ForeignKey('gene_description.id'))
    gene_description = db.relationship('GeneDescription', backref='pub_ids')
    germline_set_id = db.Column(db.Integer, db.ForeignKey('germline_set.id'))
    germline_set = db.relationship('GermlineSet', backref='pub_ids')
예제 #3
0
class AttachedFile(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    filename = db.Column(db.String(1000))
    notes_id = db.Column(db.Integer, db.ForeignKey('notes_entry.id'))
    notes_entry = db.relationship('NotesEntry', backref='attached_files')
    gene_description_id = db.Column(db.Integer,
                                    db.ForeignKey('gene_description.id'))
    gene_description = db.relationship('GeneDescription',
                                       backref='attached_files')
    novel_vdjbase_id = db.Column(db.Integer, db.ForeignKey('novel_vdjbase.id'))
    novel_vdjbase = db.relationship('NovelVdjbase', backref='attached_files')
예제 #4
0
class NotesEntry(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    notes_text = db.Column(db.Text())

    notes_attachment_filename = db.Column(db.String(1000))
    submission_id = db.Column(db.Integer, db.ForeignKey('submission.id'))
    submission = db.relationship('Submission', backref = 'notes_entries')
    germline_set_id = db.Column(db.Integer, db.ForeignKey('germline_set.id'))
    germline_set = db.relationship('GermlineSet', backref = 'notes_entries')
    novel_vdjbase_id = db.Column(db.Integer, db.ForeignKey('novel_vdjbase.id'))
    novel_vdjbase = db.relationship('NovelVdjbase', backref = 'notes_entries')
예제 #5
0
class Acknowledgements(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    ack_name = db.Column(db.String(1000))
    ack_institution_name = db.Column(db.String(1000))
    ack_ORCID_id = db.Column(db.String(255))
    submission_id = db.Column(db.Integer, db.ForeignKey('submission.id'))
    submission = db.relationship('Submission', backref='acknowledgements')
    description_id = db.Column(db.Integer,
                               db.ForeignKey('gene_description.id'))
    gene_description = db.relationship('GeneDescription',
                                       backref='acknowledgements')
    germline_set_id = db.Column(db.Integer, db.ForeignKey('germline_set.id'))
    germline_set = db.relationship('GermlineSet', backref='acknowledgements')
예제 #6
0
class RecordSet(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    rec_accession_no = db.Column(db.String(1000))
    rec_record_title = db.Column(db.String(1000))
    rec_url = db.Column(db.String(1000))
    inferred_sequence_id = db.Column(db.Integer,
                                     db.ForeignKey('inferred_sequence.id'))
    inferred_sequence = db.relationship('InferredSequence',
                                        backref='record_set')
    genotype_description_id = db.Column(
        db.Integer, db.ForeignKey('genotype_description.id'))
    genotype_description = db.relationship('GenotypeDescription',
                                           backref='record_set')
예제 #7
0
class GenotypeDescription(db.Model, GenotypeDescriptionMixin):
    id = db.Column(db.Integer, primary_key=True)
    genotype_name = db.Column(db.String(1000))
    genotype_subject_id = db.Column(db.String(1000))
    genotype_biosample_ids = db.Column(db.String(255))
    genotype_run_ids = db.Column(db.String(1000))
    gen_ncbi_hash = db.Column(db.String(1000))
    submission_id = db.Column(db.Integer, db.ForeignKey('submission.id'))
    submission = db.relationship('Submission', backref='genotype_descriptions')
    inference_tool_id = db.Column(db.Integer,
                                  db.ForeignKey('inference_tool.id'))
    inference_tool = db.relationship('InferenceTool',
                                     backref='genotype_descriptions')
    locus = db.Column(db.String(255))
    sequence_type = db.Column(db.String(255))
    genotype_filename = db.Column(db.String(1000))
예제 #8
0
class Genotype(db.Model, GenotypeMixin):
    id = db.Column(db.Integer, primary_key=True)
    sequence_id = db.Column(db.String(1000))
    sequences = db.Column(db.Integer)
    closest_reference = db.Column(db.String(1000))
    closest_host = db.Column(db.String(1000))
    nt_diff = db.Column(db.Integer)
    nt_diff_host = db.Column(db.Integer)
    nt_substitutions = db.Column(db.String(1000))
    aa_diff = db.Column(db.Integer)
    aa_substitutions = db.Column(db.String(1000))
    unmutated_sequences = db.Column(db.Integer)
    assigned_unmutated_frequency = db.Column(db.Numeric(precision=(12, 2)))
    unmutated_umis = db.Column(db.Integer)
    allelic_percentage = db.Column(db.Numeric(precision=(12, 2)))
    unmutated_frequency = db.Column(db.Numeric(precision=(12, 2)))
    unique_vs = db.Column(db.Integer)
    unique_ds = db.Column(db.Integer)
    unique_js = db.Column(db.Integer)
    unique_cdr3s = db.Column(db.Integer)
    unique_vs_unmutated = db.Column(db.Integer)
    unique_ds_unmutated = db.Column(db.Integer)
    unique_js_unmutated = db.Column(db.Integer)
    unique_cdr3s_unmutated = db.Column(db.Integer)
    haplotyping_gene = db.Column(db.String(1000))
    haplotyping_ratio = db.Column(db.String(1000))
    nt_sequence = db.Column(db.Text())
    nt_sequence_gapped = db.Column(db.Text())
    description_id = db.Column(db.Integer,
                               db.ForeignKey('genotype_description.id'))
    genotype_description = db.relationship('GenotypeDescription',
                                           backref='genotypes')
예제 #9
0
class JournalEntry(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    date = db.Column(db.DateTime)
    author = db.Column(db.String(255))
    type = db.Column(db.String(255))
    title = db.Column(db.String(1000))
    body = db.Column(db.Text())
    submission_id = db.Column(db.Integer, db.ForeignKey('submission.id'))
    submission = db.relationship('Submission', backref='journal_entries')
    gene_description_id = db.Column(db.Integer,
                                    db.ForeignKey('gene_description.id'))
    gene_description = db.relationship('GeneDescription',
                                       backref='journal_entries')
    germline_set_id = db.Column(db.Integer, db.ForeignKey('germline_set.id'))
    germline_set = db.relationship('GermlineSet', backref='journal_entries')
    parent_id = db.Column(db.Integer, db.ForeignKey('journal_entry.id'))
    children = db.relationship('JournalEntry',
                               backref=backref('parent', remote_side=[id]))
예제 #10
0
class SampleName(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    sam_accession_no = db.Column(db.String(1000))
    sam_record_title = db.Column(db.String(1000))
    sam_url = db.Column(db.String(1000))
    genotype_description_id = db.Column(
        db.Integer, db.ForeignKey('genotype_description.id'))
    genotype_description = db.relationship('GenotypeDescription',
                                           backref='sample_names')
예제 #11
0
class InferenceTool(db.Model, InferenceToolMixin):
    id = db.Column(db.Integer, primary_key=True)
    tool_settings_name = db.Column(db.String(1000))
    tool_name = db.Column(db.String(1000))
    tool_version = db.Column(db.String(1000))
    tool_starting_database = db.Column(db.Text())
    tool_settings = db.Column(db.Text())
    submission_id = db.Column(db.Integer, db.ForeignKey('submission.id'))
    submission = db.relationship('Submission', backref='inference_tools')
예제 #12
0
class InferredSequence(db.Model, InferredSequenceMixin):
    id = db.Column(db.Integer, primary_key=True)
    sequence_id = db.Column(db.Integer, db.ForeignKey('genotype.id'))
    sequence_details = db.relationship('Genotype', backref = 'inferred_sequences')
    submission_id = db.Column(db.Integer, db.ForeignKey('submission.id'))
    submission = db.relationship('Submission', backref = 'inferred_sequences')
    genotype_id = db.Column(db.Integer, db.ForeignKey('genotype_description.id'))
    genotype_description = db.relationship('GenotypeDescription', backref = 'inferred_sequences')
    seq_accession_no = db.Column(db.String(1000))
    seq_record_title = db.Column(db.String(1000))
    ncbi_hash = db.Column(db.String(1000))
    deposited_version = db.Column(db.String(1000))
    run_ids = db.Column(db.String(1000))
    inferred_extension = db.Column(db.Boolean)
    ext_3prime = db.Column(db.Text())
    start_3prime_ext = db.Column(db.Integer)
    end_3prime_ext = db.Column(db.Integer)
    ext_5prime = db.Column(db.Text())
    start_5prime_ext = db.Column(db.Integer)
    end_5prime_ext = db.Column(db.Integer)
예제 #13
0
class Submission(db.Model, SubmissionMixin):
    id = db.Column(db.Integer, primary_key=True)
    submission_id = db.Column(db.String(1000))
    submission_date = db.Column(db.DateTime)
    submission_status = db.Column(db.String(255))
    public = db.Column(db.Boolean)
    submitter_name = db.Column(db.String(1000))
    submitter_address = db.Column(db.String(1000))
    submitter_email = db.Column(db.String(255))
    species = db.Column(db.String(255))
    population_ethnicity = db.Column(db.String(1000))
    owner_id = db.Column(db.Integer, db.ForeignKey('user.id'))
    owner = db.relationship('User', backref='submissions')
예제 #14
0
class Repertoire(db.Model, RepertoireMixin):
    id = db.Column(db.Integer, primary_key=True)
    repository_name = db.Column(db.String(1000))
    rep_accession_no = db.Column(db.String(1000))
    rep_title = db.Column(db.String(1000))
    dataset_url = db.Column(db.String(500))
    miairr_compliant = db.Column(db.String(255))
    miairr_link = db.Column(db.String(500))
    sequencing_platform = db.Column(db.String(1000))
    read_length = db.Column(db.String(1000))
    primers_overlapping = db.Column(db.String(255))
    submission_id = db.Column(db.Integer, db.ForeignKey('submission.id'))
    submission = db.relationship('Submission', backref='repertoire')
예제 #15
0
class GenomicSupport(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    sequence_type = db.Column(db.String(255))
    sequence = db.Column(db.Text())
    notes = db.Column(db.Text())
    repository = db.Column(db.String(1000))
    accession = db.Column(db.String(1000))
    url = db.Column(db.String(1000))
    patch_no = db.Column(db.String(1000))
    gff_seqid = db.Column(db.String(1000))
    sequence_start = db.Column(db.Integer)
    sequence_end = db.Column(db.Integer)
    sense = db.Column(db.String(255))
    sequence_id = db.Column(db.Integer, db.ForeignKey('gene_description.id'))
    gene_description = db.relationship('GeneDescription', backref = 'genomic_accessions')
예제 #16
0
# Copyright William Lees
#
# This source code, and any executable file compiled or derived from it, is governed by the European Union Public License v. 1.2,
# the English version of which is available here: https://perma.cc/DK5U-NDVE
#

# ORM definitions for user management

from head import db
from flask_security import UserMixin, RoleMixin

roles_users = db.Table(
    'roles_users', db.Column('user_id', db.Integer(),
                             db.ForeignKey('user.id')),
    db.Column('role_id', db.Integer(), db.ForeignKey('role.id')))


class Role(db.Model, RoleMixin):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(80), unique=True)
    description = db.Column(db.String(250))

    def __repr__(self):
        return ('%s' % (self.name))


roles_submissions = db.Table(
    'roles_submissions',
    db.Column('user_id', db.Integer(), db.ForeignKey('user.id')),
    db.Column('submission_id', db.Integer(), db.ForeignKey('submission.id')))
예제 #17
0
class PrimerSet(db.Model, PrimerSetMixin):
    id = db.Column(db.Integer, primary_key=True)
    primer_set_name = db.Column(db.String(1000))
    primer_set_notes = db.Column(db.Text())
    repertoire_id = db.Column(db.Integer, db.ForeignKey('repertoire.id'))
    repertoire = db.relationship('Repertoire', backref='primer_sets')
예제 #18
0
# ORM definitions for GeneDescription
# This file is automatically generated from the schema by schema/build_from_schema.py

from head import db
from db.userdb import User
from db.styled_table import *
from flask_table import Table, Col, LinkCol, create_table
from db.view_table import ViewCol
from sqlalchemy.orm import backref

                        
inferred_sequences_gene_descriptions = db.Table('inferred_sequences_gene_descriptions',
    db.Column('inferred_sequences_id', db.Integer(), db.ForeignKey('inferred_sequence.id')),
    db.Column('gene_descriptions_id', db.Integer(), db.ForeignKey('gene_description.id')))
    

                        
supporting_observations_supporting_gene_descriptions = db.Table('supporting_observations_supporting_gene_descriptions',
    db.Column('supporting_observations_id', db.Integer(), db.ForeignKey('genotype.id')),
    db.Column('supporting_gene_descriptions_id', db.Integer(), db.ForeignKey('gene_description.id')))
    

                        
duplicate_sequences_published_duplicates = db.Table('duplicate_sequences_published_duplicates',
    db.Column('duplicate_sequences_id', db.Integer(), db.ForeignKey('genotype.id')),
    db.Column('published_duplicates_id', db.Integer(), db.ForeignKey('gene_description.id')))
    

from db._gene_description_db import *
예제 #19
0
class Primer(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    primer_name = db.Column(db.String(1000))
    primer_seq = db.Column(db.String(1000))
    primer_set_id = db.Column(db.Integer, db.ForeignKey('primer_set.id'))
    primer_set = db.relationship('PrimerSet', backref='primers')