models.py 21.7 KB
Newer Older
Hervé  MENAGER's avatar
Hervé MENAGER committed
1
2
3
4
5
from __future__ import unicode_literals

from django.db import models
from django.forms import ModelForm

6
from .ws import get_pubmed_info, get_epo_info, get_uniprot_info, get_taxonomy_info
7

Hervé  MENAGER's avatar
Hervé MENAGER committed
8
9
10
11
12
13
14
15
16
17
18
class Bibliography(models.Model):
    """
    Bibliography data table
    """
    SOURCES = (
        ('PM', 'PubMed article'),
        ('PT', 'Patent')
    )
    source = models.CharField('Bibliographic type', max_length=2, choices=SOURCES)
    id_source = models.CharField('Bibliographic ID', max_length=25)
    title = models.CharField('Title', max_length=300)
19
    journal_name = models.CharField('Journal name', max_length=50, null=True)
Hervé  MENAGER's avatar
Hervé MENAGER committed
20
21
    authors_list = models.CharField('Authors list', max_length=500)
    biblio_year = models.PositiveSmallIntegerField('Year')
22
23
24
25
26
27
28
    cytotox = models.BooleanField('Cytotoxicity data', default=False)
    in_silico = models.BooleanField('in silico study performed', default=False)
    in_vitro = models.BooleanField('in vitro study performed', default=False)
    in_vivo = models.BooleanField('in vivo study performed', default=False)
    in_cellulo = models.BooleanField('in cellulo study performed', default=False)
    pharmacokinetic = models.BooleanField('pharmacokinetic study performed', default=False)
    xray = models.BooleanField('contains xray data', default=False)
Hervé  MENAGER's avatar
Hervé MENAGER committed
29
30
31
32
33

    def get_absolute_url(self):
        return reverse('bibliography-detail', args=[str(self.id)])

    def save(self, *args, **kwargs):
34
35
36
37
38
39
40
41
        if self.source == 'PM':
            info = get_pubmed_info(self.id_source)
        else:
            info = get_epo_info(self.id_source)
        self.title = info['title']
        self.journal_name = info['journal_name']
        self.authors_list = info['authors_list']
        self.biblio_year = info['biblio_year']
Hervé  MENAGER's avatar
Hervé MENAGER committed
42
43
        super(Bibliography, self).save(*args, **kwargs)

Hervé  MENAGER's avatar
Hervé MENAGER committed
44
45
46
    class Meta:
        verbose_name_plural = "bibliographies"

Hervé  MENAGER's avatar
Hervé MENAGER committed
47
48
49
class BibliographyForm(ModelForm):
    class Meta:
        model = Bibliography
50
        exclude = ['title','journal_name', 'authors_list', 'biblio_year']
Hervé  MENAGER's avatar
Hervé MENAGER committed
51
52

class Taxonomy(models.Model):
53
    taxonomy_id = models.DecimalField('NCBI TaxID', unique=True, max_digits=9, decimal_places=0)
Hervé  MENAGER's avatar
Hervé MENAGER committed
54
    name = models.CharField('Organism name', max_length=200)
Hervé  MENAGER's avatar
Hervé MENAGER committed
55
56
    class Meta:
        verbose_name_plural = "taxonomies"
Hervé  MENAGER's avatar
Hervé MENAGER committed
57
58
59
60
61
62
63
64
65
66
67
68
69
70

class MolecularFunction(models.Model):
    go_id = models.CharField('Gene Ontology ID', unique=True, max_length=10) # GO term id format: 'GO:0000000' 
    description = models.CharField('description', max_length=500)

class Protein(models.Model):
    uniprot_id = models.CharField('Uniprot ID', unique=True, max_length=10)
    recommended_name_long = models.CharField('Uniprot Recommended Name (long)', max_length=75)
    short_name = models.CharField('Short name', max_length=50)
    gene_name = models.CharField('Gene name', unique=True, max_length=30)
    entry_name = models.CharField('Entry name', max_length=30)
    organism = models.ForeignKey('Taxonomy')
    molecular_functions = models.ManyToManyField(MolecularFunction)

71
72
73
74
75
76
    def save(self, *args, **kwargs):
        info = get_epo_info(self.id_source)
        self.recommended_name_long = info['recommended_name']
        self.organism = info['organism']
        super(Protein, self).save(*args, **kwargs)

Hervé  MENAGER's avatar
Hervé MENAGER committed
77
78
79
80
class Domain(models.Model):
    pfam_acc = models.CharField('Pfam Accession', max_length=10, unique=True) 
    pfam_id = models.CharField('Pfam Family Identifier', max_length=20) 
    pfam_description = models.CharField('Pfam Description', max_length=100)
81
    domainfamily = models.CharField('Domain family', max_length=25)  #TODO: what is this field? check database contents
Hervé  MENAGER's avatar
Hervé MENAGER committed
82

83
class ProteinDomainComplex(models.Model):
Hervé  MENAGER's avatar
Hervé MENAGER committed
84
    protein_id = models.ForeignKey('Protein')
85
86
87
    domain_id = models.ForeignKey('Domain')
    ppc_copy_nb = models.IntegerField('Number of copies of the protein in the complex')
    
Hervé  MENAGER's avatar
Hervé MENAGER committed
88
89
    class Meta:
        verbose_name_plural = "complexes"
90
91
92
93
94
95

class ProteinDomainBoundComplex(ProteinDomainComplex):
    ppp_copy_nb_per_p = models.IntegerField('Number of copies of the protein in the pocket')
    pockets_nb = models.IntegerField('Total number of pockets in the complex')
    class Meta:
        verbose_name_plural = "bound complexes"
Hervé  MENAGER's avatar
Hervé MENAGER committed
96
    
97
98
99
class ProteinDomainPartnerComplex(ProteinDomainComplex):
    class Meta:
        verbose_name_plural = "partner complexes"
Hervé  MENAGER's avatar
Hervé MENAGER committed
100

101
102
103
class Symmetry(models.Model):
    code = models.CharField('Symmetry code', max_length=2)
    description = models.CharField('Description', max_length=300)
Hervé  MENAGER's avatar
Hervé MENAGER committed
104

105
106
107
108
109
110
    class Meta:
        verbose_name_plural = "symmetries"

class Ppi(models.Model):
    ppi_id = models.IntegerField('PPI identifier')
    complex_id = models.ForeignKey(ProteinDomainComplex)
111
    cc_nb = models.IntegerField('Number of copies of the complex in the PPI', default=1)
Hervé  MENAGER's avatar
Hervé MENAGER committed
112
    pdb_id = models.CharField('PDB ID', max_length=4)
113
    symmetry_id = models.ForeignKey(Symmetry)
Hervé  MENAGER's avatar
Hervé MENAGER committed
114

115
116
117
class Disease(models.Model):
    ppi_id = models.ForeignKey(Ppi)
    disease_name = models.CharField('Disease', max_length=30) # is there any database/nomenclature for diseases?
Hervé  MENAGER's avatar
Hervé MENAGER committed
118
119


120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
class Compound(models.Model):
    canonical_smile = models.CharField('Canonical Smile', unique=True, max_length=250)
    #TODO index this table on canonical_smile
    is_macrocycle = models.BooleanField('Contains one or more macrocycles') 
    aromatic_ratio = models.DecimalField('Aromatic ratio', max_digits=3, decimal_places=2)
    balaban_index = models.DecimalField('Balaban index', max_digits=3, decimal_places=2)  
    fsp3 = models.DecimalField('Fsp3', max_digits=3, decimal_places=2)
    dh_Petitjean = models.DecimalField('Dh Petitjean', max_digits=4, decimal_places=2) 
    diam_graph_non_h_petitjean = models.IntegerField('Diameter for the molecular graph for heavy atoms (Petitjean)') 
    gc_molar_refractivity = models.DecimalField('GC Molar Refractivity', max_digits=5, decimal_places=2)
    g_petitjean = models.DecimalField('G Petitjean', max_digits=3, decimal_places=2)
    ig_petitjean = models.DecimalField('Ig Petitjean', max_digits=3, decimal_places=2)
    log_d = models.DecimalField('LogD (Partition coefficient octanol-1/water, with pKa information)', max_digits=4, decimal_places=2)
    a_log_p = models.DecimalField('ALogP (Partition coefficient octanol-1/water)', max_digits=4, decimal_places=2)
    mean_atom_vol_vdw = models.DecimalField('Mean atom volume computed with VdW radii', max_digits=4, decimal_places=2)
    molecular_weight = models.DecimalField('Molecular weight', max_digits=6, decimal_places=2)
    nb_acceptor_h = models.IntegerField('Number of hydrogen bond acceptors')
    nb_aliphatic_amines = models.IntegerField('Number of aliphatics amines')
    nb_aromatic_bonds = models.IntegerField('Number of aromatic bonds')
    nb_aromatic_ether = models.IntegerField('Number of aromatic ethers')
    nb_aromatic_sssr = models.IntegerField('Number of aromatic Smallest Set of System Rings (SSSR)')
    nb_atom = models.IntegerField('Number of atoms') 
    nb_atom_non_h = models.IntegerField('Number of non hydrogen atoms') 
    nb_benzene_like_rings = models.IntegerField('Number of benzene-like rings')
    nb_bonds = models.IntegerField('Number of bonds')
    nb_bonds_non_h = models.IntegerField('Number of bonds not involving a hydrogen')  
    nb_br = models.IntegerField('Number of Bromine atoms')  
    nb_c = models.IntegerField('Number of Carbon atoms')  
    nb_chiral_centers = models.IntegerField('Number of chiral centers')  
    nb_circuits = models.IntegerField('Number of circuits')  
    nb_cl = models.IntegerField('Number of Chlorine atoms')  
    nb_csp2 = models.IntegerField('Number of sp2-hybridized carbon atoms')  
    nb_csp3 = models.IntegerField('Number of sp3-hybridized carbon atoms')  
    nb_donor_h = models.IntegerField('Number of hydrogen bond donors')  
    nb_double_bonds = models.IntegerField('Number of double bonds')  
    nb_f = models.IntegerField('Number of fluorine atoms')  
    nb_i = models.IntegerField('Number of iodine atoms')  
    nb_multiple_bonds = models.IntegerField('Number of multiple bonds')  
    nb_n = models.IntegerField('Number of nitrogen atoms')
    nb_o = models.IntegerField('Number of oxygen atoms')  
    nb_rings = models.IntegerField('Number of rings')  
    nb_rotatable_bonds = models.IntegerField('Number of rotatable bonds')  
    radius_graph_non_h_petitjean = models.IntegerField('Radius for the molecular graph for heavy atoms (Petitjean)')  
    randic_index = models.DecimalField('Randic index', max_digits=4, decimal_places=2)  
    rdf070m = models.DecimalField('RDF070m, radial distribution function weighted by the atomic masses at 7Å', max_digits=5, decimal_places=2)  
    rotatable_bond_fraction = models.DecimalField('Fraction of rotatable bonds', max_digits=3, decimal_places=2)  
    sum_atom_polar = models.DecimalField('Sum of atomic polarizabilities', max_digits=5, decimal_places=2)  
    sum_atom_vol_vdw = models.DecimalField('Sum of atom volumes computed with VdW radii', max_digits=6, decimal_places=2)  
    surface_vdw_petitjean = models.DecimalField('Van der Waals surface area (Petitjean)', max_digits=6, decimal_places=2)  
    thickness_petitjean = models.DecimalField('Thickness (Petitjean)', max_digits=4, decimal_places=2)  
    tpsa = models.DecimalField('Topological Polar Surface Area (TPSA)', max_digits=5, decimal_places=2)  
    ui = models.DecimalField('Unsaturation index', max_digits=4, decimal_places=2)  
    vol_vdw_petitjean = models.DecimalField('Van der Waals volume (Petitjean)', max_digits=7, decimal_places=2)  
    wiener_index = models.IntegerField('Wiener index')  
    common_name = models.CharField('Common name', unique=True, max_length=20, blank=True, null=True)  
    pubchem_id = models.CharField('Pubchem ID', unique=True, max_length=10, blank=True, null=True)  
    chemspider_id = models.CharField('Chemspider ID', unique=True, max_length=10, blank=True, null=True)  
    chembl_id = models.CharField('Chembl ID', unique=True, max_length=30, blank=True, null=True)  
    iupac_name = models.CharField('IUPAC name', unique=True, max_length=255, blank=True, null=True)  
179
    mddr_compound_id = models.ForeignKey('MDDRCompoundImport', blank=True, null=True)  
180
181
182
183
184
185
186
187
188


class MDDRCompoundImport(models.Model):
    mddr_compound_id = models.IntegerField('MDDR compound ID')  
    mddr_name = models.CharField('MDDR name', max_length=40)  
    dvpmt_phase = models.CharField('Development phase', max_length=20)  
    canonical_smile = models.CharField('Canonical Smile', max_length=500, unique=True, blank=True, null=True)  
    #TODO index this table on canonical_smile
    db_import_date = models.DecimalField('MDDR release year/month', max_digits=6, decimal_places=0)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
189

190
191
192
193
    class Meta:
        # over multiple releases of the MDDR database, the same compound can evolve in its development phase
        # the same compound can have different names and development phases in the same MDDR release
        unique_together = (('mddr_compound_id', 'mddr_name', 'dvpmt_phase'),)
Hervé  MENAGER's avatar
Hervé MENAGER committed
194
195


196
197
198
class MDDRCompoundActivityClass(models.Model):
    mddr_compound_id = models.ForeignKey(MDDRCompoundImport)  
    activity_class = models.CharField('Activity Class', max_length=100)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
199
200

    class Meta:
201
        unique_together = (('mddr_compound_id', 'activity_class'),)
Hervé  MENAGER's avatar
Hervé MENAGER committed
202
203


204
205
206
207
class MDDRSimilarity(models.Model):
    canonical_smile_ippidb = models.CharField('Canonical Smile for IPPIDB compound', max_length=500, unique=True, blank=True, null=True)
    canonical_smile_mddr = models.CharField('Canonical Smile for MDDR Compound', max_length=500, unique=True, blank=True, null=True)
    tanimoto = models.DecimalField('Tanimoto', max_digits=6, decimal_places=5)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
208
209

    class Meta:
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
        unique_together = (('canonical_smile_ippidb', 'canonical_smile_mddr'),)

"""
class TestActivityDescription(models.Model):
    complex_id = models.ForeignKey(Complex)
    biblio_id = models.ForeignKey(Biblio)
    idppi = models.ForeignKey(Ppi, models.DO_NOTHING, ='IDPPI', blank=True, null=True)  
    testnameactivity = models.CharField(='TestNameActivity', max_length=40)  
    isprimary = models.CharField(='IsPrimary', max_length=1)  
    protboundconstruct = models.CharField(='ProtBoundConstruct', max_length=11)  
    testtype = models.CharField(='TestType', max_length=5)  
    testmodulationtype = models.CharField(='TestModulationType', max_length=13)  
    nbactivescmpdstot = models.IntegerField(='NbActivesCmpdsTot')  
    conccmpds = models.DecimalField(='ConcCmpds', max_digits=7, decimal_places=3, blank=True, null=True)  
    protocol = models.TextField(='Protocol', blank=True, null=True)  
    concproteinbound = models.DecimalField(='ConcProteinBound', max_digits=7, decimal_places=3, blank=True, null=True)  
    concprotein2 = models.DecimalField(='ConcProtein2', max_digits=7, decimal_places=3, blank=True, null=True)  
    controlepos = models.CharField(='ControlePos', max_length=50, blank=True, null=True)  
    controleneg = models.CharField(='ControleNeg', max_length=50, blank=True, null=True)  
    cellline = models.CharField(='CellLine', max_length=50, blank=True, null=True)  
    pepseq = models.CharField(='PepSeq', max_length=100, blank=True, null=True)  
    marker = models.CharField(='Marker', max_length=35, blank=True, null=True)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
232
233
234
235
236





237
238
239
240
241

class Actionevidencetest(models.Model):
    idcmpdaction = models.ForeignKey('Cmpdaction', models.DO_NOTHING, ='IDCmpdAction')  
    idtestactivity = models.ForeignKey('Testactivitydescription', models.DO_NOTHING, ='IDTestActivity')  
    nbcopycompound = models.IntegerField(='NbCopyCompound', blank=True, null=True)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
242
243
244

    class Meta:
#        managed = False
245
246
        db_table = 'actionEvidenceTest'
        unique_together = (('idcmpdaction', 'idtestactivity'),)
Hervé  MENAGER's avatar
Hervé MENAGER committed
247
248


249
250
251
252
253
254
class Actionevidencexray(models.Model):
    idcmpdaction = models.ForeignKey('Cmpdaction', models.DO_NOTHING, ='IDCmpdAction')  
    codepdb = models.CharField(='CodePDB', max_length=4)  
    nbcopycompound = models.IntegerField(='NbCopyCompound')  
    idbindingsite = models.ForeignKey('Bindingsite', models.DO_NOTHING, ='IDBindingSite')  
    idbiblio = models.ForeignKey('Biblio', models.DO_NOTHING, ='IDBiblio', blank=True, null=True)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
255
256
257

    class Meta:
#        managed = False
258
259
        db_table = 'actionEvidenceXRay'
        unique_together = (('idcmpdaction', 'codepdb'),)
Hervé  MENAGER's avatar
Hervé MENAGER committed
260
261
262


class Cmpdaction(models.Model):
263
264
265
266
267
    idcmpdaction = models.AutoField(='IDCmpdAction', primary_key=True)  
    idcomplexebound = models.ForeignKey('Complexe', models.DO_NOTHING, ='IDComplexeBound')  
    idcompound = models.ForeignKey('Compound', models.DO_NOTHING, ='IDCompound')  
    activationmode = models.CharField(='ActivationMode', max_length=11)  
    modulationtype = models.CharField(='ModulationType', max_length=10)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
268
269
270
271
272
273
274

    class Meta:
#        managed = False
        db_table = 'cmpdAction'


class Cmpdactiveresult(models.Model):
275
276
277
278
279
    idcompound = models.ForeignKey('Compound', models.DO_NOTHING, ='IDCompound')  
    idtestactivity = models.ForeignKey('Testactivitydescription', models.DO_NOTHING, ='IDTestActivity')  
    activitytype = models.CharField(='ActivityType', max_length=5)  
    activity = models.DecimalField(='Activity', max_digits=4, decimal_places=2)  
    pourcentinhib = models.IntegerField(='PourcentInhib', blank=True, null=True)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
280
281
282
283
284
285
286
287

    class Meta:
#        managed = False
        db_table = 'cmpdActiveResult'
        unique_together = (('idcompound', 'idtestactivity', 'activitytype'),)


class Cmpdcytotoxresult(models.Model):
288
289
290
    idcompound = models.ForeignKey('Compound', models.DO_NOTHING, ='IDCompound')  
    idtestcytotox = models.ForeignKey('Testcytotoxdescription', models.DO_NOTHING, ='IDTestCytotox')  
    toxicity = models.CharField(='Toxicity', max_length=1)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
291
292
293
294
295
296
297
298

    class Meta:
#        managed = False
        db_table = 'cmpdCytotoxResult'
        unique_together = (('idcompound', 'idtestcytotox'),)


class Cmpdinactiveresult(models.Model):
299
300
301
    idtestactivity = models.ForeignKey('Testactivitydescription', models.DO_NOTHING, ='IDTestActivity')  
    idcompound = models.ForeignKey('Compound', models.DO_NOTHING, ='IDCompound')  
    pourcentinhib = models.IntegerField(='PourcentInhib', blank=True, null=True)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
302
303
304
305
306
307
308
309

    class Meta:
#        managed = False
        db_table = 'cmpdInactiveResult'
        unique_together = (('idtestactivity', 'idcompound'),)


class Cmpdpkresult(models.Model):
310
311
312
313
314
315
316
317
318
319
    idcompound = models.ForeignKey('Compound', models.DO_NOTHING, ='IDCompound')  
    idtestpk = models.ForeignKey('Testpkdescription', models.DO_NOTHING, ='IDTestPK')  
    tolerated = models.CharField(='Tolerated', max_length=1)  
    auc = models.IntegerField(='AUC', blank=True, null=True)  
    clearance = models.DecimalField(='Clearance', max_digits=7, decimal_places=3, blank=True, null=True)  
    cmax = models.DecimalField(='Cmax', max_digits=7, decimal_places=3, blank=True, null=True)  
    oralbioavailability = models.IntegerField(='OralBioavailability', blank=True, null=True)  
    tdemi = models.IntegerField(='Tdemi', blank=True, null=True)  
    tmax = models.IntegerField(='Tmax', blank=True, null=True)  
    voldistribution = models.DecimalField(='VolDistribution', max_digits=5, decimal_places=2, blank=True, null=True)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344

    class Meta:
#        managed = False
        db_table = 'cmpdPKResult'
        unique_together = (('idcompound', 'idtestpk'),)



    class Meta:
#        managed = False
        db_table = 'disease'
        unique_together = (('idppi', 'disease'),)


class DjangoMigrations(models.Model):
    app = models.CharField(max_length=255)
    name = models.CharField(max_length=255)
    applied = models.DateTimeField()

    class Meta:
#        managed = False
        db_table = 'django_migrations'


class Domain(models.Model):
345
346
347
348
349
    iddomain = models.AutoField(='IDDomain', primary_key=True)  
    pfamid = models.CharField(='PfamID', max_length=20)  
    pfamnumaccession = models.CharField(='PfamNumAccession', unique=True, max_length=10)  
    domaindescription = models.CharField(='DomainDescription', max_length=100)  
    domainfamily = models.CharField(='DomainFamily', max_length=25)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
350
351
352
353
354
355

    class Meta:
#        managed = False
        db_table = 'domain'

class Mddrsimilarity(models.Model):
356
357
358
359
    idcompound = models.ForeignKey(Compound, models.DO_NOTHING, ='IDCompound')  
    idmddrcompound = models.ForeignKey(Mddrcompound, models.DO_NOTHING, ='IDMDDRCompound')  
    versionmddr = models.CharField(='VersionMDDR', max_length=7)  
    tanimoto = models.DecimalField(='Tanimoto', max_digits=6, decimal_places=5)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
360
361
362
363
364
365
366
367

    class Meta:
#        managed = False
        db_table = 'mDDRSimilarity'
        unique_together = (('idcompound', 'idmddrcompound', 'versionmddr'),)


class Ppi(models.Model):
368
369
370
371
372
373
    idppi = models.AutoField(='IDPPI', primary_key=True)  
    idcomplexe1 = models.ForeignKey(Complexe, models.DO_NOTHING, ='IDComplexe1', related_name='cplx_id_1')  
    idcomplexe2 = models.ForeignKey(Complexe, models.DO_NOTHING, ='IDComplexe2', related_name='cplx_id_2')  
    idbindingsite1 = models.ForeignKey(Bindingsite, models.DO_NOTHING, ='IDBindingSite1', related_name='bs_id_1') 
    idbindingsite2 = models.ForeignKey(Bindingsite, models.DO_NOTHING, ='IDBindingSite2', related_name='bs_id_2')  
    family = models.CharField(='Family', max_length=25)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
374
375
376
377
378
379
380
381

    class Meta:
#        managed = False
        db_table = 'ppi'
        unique_together = (('idcomplexe1', 'idcomplexe2', 'idbindingsite1', 'idbindingsite2'),)


class Protein(models.Model):
382
383
384
385
386
387
388
    idprotein = models.AutoField(='IDProtein', primary_key=True)  
    numuniprot = models.CharField(='NumUniprot', unique=True, max_length=10)  
    protnamelg = models.CharField(='ProtNameLg', max_length=75)  
    protnamesh = models.CharField(='ProtNameSh', max_length=50)  
    protalias = models.CharField(='ProtAlias', unique=True, max_length=30)  
    protnamesp = models.CharField(='ProtNameSp', max_length=30)  
    organism = models.CharField(='Organism', max_length=80)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
389
390
391
392
393
394
395

    class Meta:
#        managed = False
        db_table = 'protein'


class Refcmpdbiblio(models.Model):
396
397
398
    idcompound = models.ForeignKey(Compound, models.DO_NOTHING, ='IDCompound')  
    idbiblio = models.ForeignKey(Biblio, models.DO_NOTHING, ='IDBiblio')  
    cmpdnameinbiblio = models.CharField(='CmpdNameInBiblio', max_length=20, blank=True, null=True)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
399
400
401
402
403
404
405
406

    class Meta:
#        managed = False
        db_table = 'refCmpdBiblio'
        unique_together = (('idcompound', 'idbiblio'),)


class Refproteinfonction(models.Model):
407
408
    idprotein = models.ForeignKey(Protein, models.DO_NOTHING, ='IDProtein')  
    protfonctionsp = models.CharField(='ProtFonctionSP', max_length=200)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
409
410
411
412
413
414
415
416
417
418
419
420
421
422

    class Meta:
#        managed = False
        db_table = 'refProteinFonction'
        unique_together = (('protfonctionsp', 'idprotein'),)



    class Meta:
#        managed = False
        db_table = 'testActivityDescription'


class Testcytotoxdescription(models.Model):
423
424
425
426
427
    idtestcytotox = models.AutoField(='IDTestCytotox', primary_key=True)  
    idbiblio = models.ForeignKey(Biblio, models.DO_NOTHING, ='IDBiblio')  
    testnamecytotox = models.CharField(='TestNameCytotox', max_length=40)  
    cellline = models.CharField(='CellLine', max_length=50)  
    conccmpd = models.DecimalField(='ConcCmpd', max_digits=7, decimal_places=3, blank=True, null=True)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
428
429
430
431
432
433
434

    class Meta:
#        managed = False
        db_table = 'testCytotoxDescription'


class Testpkdescription(models.Model):
435
436
437
438
439
440
441
442
    idtestpk = models.AutoField(='IDTestPK', primary_key=True)  
    idbiblio = models.ForeignKey(Biblio, models.DO_NOTHING, ='IDBiblio')  
    testnamepk = models.CharField(='TestNamePK', max_length=40)  
    animal = models.CharField(='Animal', max_length=100)  
    administrationmode = models.CharField(='AdministrationMode', max_length=2, blank=True, null=True)  
    concentration = models.DecimalField(='Concentration', max_digits=7, decimal_places=3, blank=True, null=True)  
    dose = models.DecimalField(='Dose', max_digits=7, decimal_places=2, blank=True, null=True)  
    doseinterval = models.IntegerField(='DoseInterval', blank=True, null=True)  
Hervé  MENAGER's avatar
Hervé MENAGER committed
443
444
445
446
447

    class Meta:
#        managed = False
        db_table = 'testPKDescription'
"""