diff --git a/ippisite/db.sqlite3 b/ippisite/db.sqlite3 index db5d773a7c69fd5c0d0e7127f3eb1efe378bb8eb..8606d46f594d3b1d168826016966cfb95c9e8726 100644 Binary files a/ippisite/db.sqlite3 and b/ippisite/db.sqlite3 differ diff --git a/ippisite/ippidb/management/commands/import_v1_data.py b/ippisite/ippidb/management/commands/import_v1_data.py index f5419e9bc6c182f2262b7447d36e855de388c538..de644fccde949c7dd2019a953793a6a7b502fb61 100644 --- a/ippisite/ippidb/management/commands/import_v1_data.py +++ b/ippisite/ippidb/management/commands/import_v1_data.py @@ -228,7 +228,50 @@ select distinct protein.NumUniprot, domain.PfamNumAccession , complexe.NbCopy, compound.log_d = row[13] #LogD compound.a_log_p = row[14] #ALogP compound.mean_atom_vol_vdw = row[15] #MeanAtomVolVdW - compound.molecular_weight = row[16] + compound.molecular_weight = row[16] #MolecularWeight + compound.nb_acceptor_h = row[17] #NbAcceptorH + compound.nb_aliphatic_amines = row[18] #NbAliphaticsAmines + compound.nb_aromatic_bonds = row[19] #NbAromaticBonds + compound.nb_aromatic_ether = row[20] #NbAromaticsEther + compound.nb_aromatic_sssr = row[21] #NbAromaticsSSSR + compound.nb_atom = row[22] #NbAtom + compound.nb_atom_non_h = row[23] #NbAtomNonH + compound.nb_benzene_like_rings = row[24] #NbBenzLikeRings + compound.nb_bonds = row[25] #NbBonds + compound.nb_bonds_non_h = row[26] #NbBondsNonH + compound.nb_br = row[27] #NbBr + compound.nb_c = row[28] #NbC + compound.nb_chiral_centers = row[29] #NbChiralCenters + compound.nb_circuits = row[30] #NbCircuits + compound.nb_cl = row[31] #NbCl + compound.nb_csp2 = row[32] #NbCsp2 + compound.nb_csp3 = row[33] #NbCsp3 + compound.nb_donor_h = row[34] #NbDonorH + compound.nb_double_bonds = row[35] #NbDoubleBonds + compound.nb_f = row[36] #NbF + compound.nb_i = row[37] #NbI + compound.nb_multiple_bonds = row[38] #NbMultBonds + compound.nb_n = row[39] #NbN + compound.nb_o = row[40] #NbO + compound.nb_rings = row[41] #NbRings + compound.nb_rotatable_bonds = row[42] #NbRotatableBonds + compound.randic_index = row[44] #RandicIndex + compound.rdf070m = row[45] #RDF070m + compound.rotatable_bond_fraction = row[46] #RotatableBondFraction + compound.sum_atom_polar = row[47] #SumAtomPolar + compound.sum_atom_vol_vdw = row[48] #SumAtomVolVdW + compound.tpsa = row[51] #TPSA + compound.ui = row[52] #Ui + compound.wiener_index = row[54] #WienerIndex + if row[55]!='N': + compound.common_name = row[55] #CmpdNameSh + compound.pubchem_id = row[56] #IdPubchem + if row[57]!='N': + compound.chemspider_id = row[57] #IdPubchem + compound.chembl_id = row[58] + compound.iupac_name = row[59] + #compound.mddr_compound = row[60] + #FIXME lookup MDDR to get the right ID compound.save() except Exception as e: if options['stoponfail']: diff --git a/ippisite/ippidb/migrations/0015_auto_20170519_1442.py b/ippisite/ippidb/migrations/0015_auto_20170519_1442.py new file mode 100644 index 0000000000000000000000000000000000000000..1fca3005fce46c0e16f303ccfd014beb9c630e59 --- /dev/null +++ b/ippisite/ippidb/migrations/0015_auto_20170519_1442.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.1 on 2017-05-19 14:42 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ippidb', '0014_auto_20170519_1243'), + ] + + operations = [ + migrations.AlterField( + model_name='compound', + name='pubchem_id', + field=models.CharField(blank=True, max_length=10, null=True, verbose_name='Pubchem ID'), + ), + ] diff --git a/ippisite/ippidb/migrations/0016_auto_20170519_1453.py b/ippisite/ippidb/migrations/0016_auto_20170519_1453.py new file mode 100644 index 0000000000000000000000000000000000000000..f33ad147e4718a43b7b49bbe90ed61510e000e8e --- /dev/null +++ b/ippisite/ippidb/migrations/0016_auto_20170519_1453.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.1 on 2017-05-19 14:53 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ippidb', '0015_auto_20170519_1442'), + ] + + operations = [ + migrations.AlterField( + model_name='compound', + name='iupac_name', + field=models.CharField(blank=True, max_length=255, null=True, verbose_name='IUPAC name'), + ), + ] diff --git a/ippisite/ippidb/migrations/0017_auto_20170519_1500.py b/ippisite/ippidb/migrations/0017_auto_20170519_1500.py new file mode 100644 index 0000000000000000000000000000000000000000..f62efeeaadac44fe2c45aed5f9a3e3a704165015 --- /dev/null +++ b/ippisite/ippidb/migrations/0017_auto_20170519_1500.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.1 on 2017-05-19 15:00 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ippidb', '0016_auto_20170519_1453'), + ] + + operations = [ + migrations.AlterField( + model_name='compound', + name='chembl_id', + field=models.CharField(blank=True, max_length=30, null=True, verbose_name='Chembl ID'), + ), + ] diff --git a/ippisite/ippidb/models.py b/ippisite/ippidb/models.py index 5678657f079b2806ecc3062e716539eb0b563a72..00dd5ee9c3bc07a873fd14ccc08742f0e2d64d2c 100644 --- a/ippisite/ippidb/models.py +++ b/ippisite/ippidb/models.py @@ -236,10 +236,10 @@ class Compound(models.Model): ui = models.DecimalField('Unsaturation index', max_digits=4, 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) + pubchem_id = models.CharField('Pubchem ID', 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) + chembl_id = models.CharField('Chembl ID', max_length=30, blank=True, null=True) + iupac_name = models.CharField('IUPAC name', max_length=255, blank=True, null=True) mddr_compound = models.ForeignKey('MDDRCompoundImport', blank=True, null=True)