Giter Site home page Giter Site logo

phizz-genes's Introduction

phizz-genes

A small django app to represent genes, transcripts, omim phenotypes, aliases etc

Instructions

  • Add phizz-genes to your INSTALLED_APPS settings like:
INSTALLED_APPS = [
   ...
   'genes',
]
  • Run python manage.py migrate to create the models

Models

class Gene(models.Model):
    
    #The ensembl gene id, ex. 'ENSG00000156110'
    #can be use with link like:
    #ensembl.org/Homo_sapiens/Gene/Summary?g=ENSG00000156110
    ensembl_id = models.CharField(max_length=20)

    chrom = models.CharField(max_length=30)
    start = models.IntegerField()
    stop = models.IntegerField()
    
    #The hgnc symbol, ex. 'ADK
    hgnc_symbol = models.CharField(max_length=20, blank=True)
    
    description = models.CharField(max_length=200, null=True)
    #The hgnc id, ex. '257' for using link like:
    #genenames.org/cgi-bin/gene_symbol_report?hgnc_id=HGNC:257
    hgnc_id = models.IntegerField(null=True)
    
    #entrez id, ex. 132, for using link like:
    #ncbi.nlm.nih.gov/gene/132
    entrez_id = models.IntegerField(null=True)
    
    #vega id, ex. OTTHUMG00000018506, for using link like:
    #http://vega.sanger.ac.uk/Homo_sapiens/Gene/Summary?db=core;g=OTTHUMG00000018506
    vega_id = models.CharField(max_length=20, null=True)
    
    #ucsc id, ex. uc001jwi.4, for using link like:
    #http://genome.cse.ucsc.edu/cgi-bin/hgGene?org=Human&hgg_chrom=none&hgg_type=knownGene&hgg_gene=uc001jwi.4
    ucsc_id = models.CharField(max_length=20, null=True)
    
    #pli_score is the estimated sensibility to lof mutations estimated by ExAC
    pli_score = models.DecimalField(max_digits=6, decimal_places=5, null=True)
    
    def __str__(self):
        return self.hgnc_symbol

#One gene can have several transcripts, one transcript are attached to one gene
class Transcript(models.Model):
    gene = models.ForeignKey(Gene, on_delete=models.CASCADE)
    refseq_name = models.CharField(max_length=30, null=True)
    ensembl_transcript_id = models.CharField(max_length=30)
    
    def __str__(self):
        return self.refseq_name

#One phenotype can have several transcripts, one transcript are attached to one gene
class Omim(models.Model):
    gene = models.ForeignKey(Gene, on_delete=models.CASCADE)
    omim_id = models.IntegerField()

class Alias(models.Model):
    gene = models.ForeignKey(Gene, on_delete=models.CASCADE)
    alias = models.CharField(max_length=20)

class UniProt(models.Model):
    gene = models.ForeignKey(Gene, on_delete=models.CASCADE)
    uniprot_id = models.CharField(max_length=20)

phizz-genes's People

Contributors

moonso avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.