Skip to content
Snippets Groups Projects
Commit 158faf38 authored by Hélène  BORGES's avatar Hélène BORGES
Browse files

Merge branch 'master' of gitlab.pasteur.fr:odoppelt/iPPIDB

parents 23ffd54e 0387a60a
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -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):
......
......@@ -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']:
......
# -*- 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'),
),
]
......@@ -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)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment