diff --git a/ippisite/db.sqlite3 b/ippisite/db.sqlite3 index 57542b95b741e72c1e7980fb7ecdb36ade6e1767..db5d773a7c69fd5c0d0e7127f3eb1efe378bb8eb 100644 Binary files a/ippisite/db.sqlite3 and b/ippisite/db.sqlite3 differ diff --git a/ippisite/ippidb/admin.py b/ippisite/ippidb/admin.py index dc4f162a8eabad23ea8491c384f210cd84bfc67a..21a59ca38af6ea0bd3206be7d8a17e905f8c38d0 100644 --- a/ippisite/ippidb/admin.py +++ b/ippisite/ippidb/admin.py @@ -20,8 +20,8 @@ class DomainAdmin(admin.ModelAdmin): @admin.register(ProteinDomainBoundComplex) class ProteinDomainBoundComplexAdmin(admin.ModelAdmin): - list_display = ('protein', 'domain', 'ppc_copy_nb', 'ppp_copy_nb_per_p', 'pockets_nb') - list_display_links = ('protein', 'domain', 'ppc_copy_nb', 'ppp_copy_nb_per_p', 'pockets_nb') + list_display = ('protein', 'domain', 'ppc_copy_nb', 'ppp_copy_nb_per_p') + list_display_links = ('protein', 'domain', 'ppc_copy_nb', 'ppp_copy_nb_per_p') @admin.register(ProteinDomainPartnerComplex) class ProteinDomainPartnerComplexAdmin(admin.ModelAdmin): diff --git a/ippisite/ippidb/management/commands/import_v1_data.py b/ippisite/ippidb/management/commands/import_v1_data.py index acbf3758bd5608a4d2a55400cefe58734dca6121..f5419e9bc6c182f2262b7447d36e855de388c538 100644 --- a/ippisite/ippidb/management/commands/import_v1_data.py +++ b/ippisite/ippidb/management/commands/import_v1_data.py @@ -175,6 +175,7 @@ select distinct protein.NumUniprot, domain.PfamNumAccession , complexe.NbCopy, ppi = Ppi() disease, created = Disease.objects.get_or_create(name=row[7]) ppi.pdb_id = row[4] + ppi.pockets_nb = 1 ppi.symmetry = Symmetry.objects.get(code='AS') ppi.save() ppi.diseases.add(disease) @@ -194,7 +195,6 @@ select distinct protein.NumUniprot, domain.PfamNumAccession , complexe.NbCopy, c.ppc_copy_nb = row[2] if isinstance(c, ProteinDomainBoundComplex): c.ppp_copy_nb_per_p = 1 - c.pockets_nb = 1 c.save() # create the PpiComplex object ppi_complex = PpiComplex() @@ -223,7 +223,12 @@ select distinct protein.NumUniprot, domain.PfamNumAccession , complexe.NbCopy, compound.is_macrocycle = (row[4]=='Y') compound.aromatic_ratio = row[5] compound.balaban_index = row[6] - compound.balaban_index = row[6] + compound.fsp3 = row[7] #Csp3Ratio + compound.gc_molar_refractivity=row[10] #GCMolarRefractivity + 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.save() except Exception as e: if options['stoponfail']: diff --git a/ippisite/ippidb/migrations/0014_auto_20170519_1243.py b/ippisite/ippidb/migrations/0014_auto_20170519_1243.py new file mode 100644 index 0000000000000000000000000000000000000000..3aef4f320ee659e960a6df1b4ea503dbabb02eb3 --- /dev/null +++ b/ippisite/ippidb/migrations/0014_auto_20170519_1243.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.1 on 2017-05-19 12:43 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ippidb', '0013_auto_20170518_1943'), + ] + + operations = [ + migrations.RemoveField( + model_name='proteindomainboundcomplex', + name='pockets_nb', + ), + migrations.AddField( + model_name='ppi', + name='pockets_nb', + field=models.IntegerField(default=1, verbose_name='Total number of pockets in the complex'), + ), + ] diff --git a/ippisite/ippidb/models.py b/ippisite/ippidb/models.py index b47f5943d089df98cd0d731d58f52f47888b6b09..5678657f079b2806ecc3062e716539eb0b563a72 100644 --- a/ippisite/ippidb/models.py +++ b/ippisite/ippidb/models.py @@ -131,7 +131,6 @@ class ProteinDomainComplex(models.Model): 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" @@ -158,6 +157,7 @@ class Disease(models.Model): class Ppi(models.Model): pdb_id = models.CharField('PDB ID', max_length=4, null=True) + pockets_nb = models.IntegerField('Total number of pockets in the complex', default=1) symmetry = models.ForeignKey(Symmetry) diseases = models.ManyToManyField(Disease)