Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
6c263443
Commit
6c263443
authored
8 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
add draft model code to retrieve uniprot info from Protein
parent
2ded0768
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ippisite/ippidb/models.py
+7
-1
7 additions, 1 deletion
ippisite/ippidb/models.py
with
7 additions
and
1 deletion
ippisite/ippidb/models.py
+
7
−
1
View file @
6c263443
...
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
...
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
from
django.db
import
models
from
django.db
import
models
from
django.forms
import
ModelForm
from
django.forms
import
ModelForm
from
.ws
import
get_pubmed_info
,
get_epo_info
from
.ws
import
get_pubmed_info
,
get_epo_info
,
get_uniprot_info
class
Bibliography
(
models
.
Model
):
class
Bibliography
(
models
.
Model
):
"""
"""
...
@@ -68,6 +68,12 @@ class Protein(models.Model):
...
@@ -68,6 +68,12 @@ class Protein(models.Model):
organism
=
models
.
ForeignKey
(
'
Taxonomy
'
)
organism
=
models
.
ForeignKey
(
'
Taxonomy
'
)
molecular_functions
=
models
.
ManyToManyField
(
MolecularFunction
)
molecular_functions
=
models
.
ManyToManyField
(
MolecularFunction
)
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
)
class
Domain
(
models
.
Model
):
class
Domain
(
models
.
Model
):
pfam_acc
=
models
.
CharField
(
'
Pfam Accession
'
,
max_length
=
10
,
unique
=
True
)
pfam_acc
=
models
.
CharField
(
'
Pfam Accession
'
,
max_length
=
10
,
unique
=
True
)
pfam_id
=
models
.
CharField
(
'
Pfam Family Identifier
'
,
max_length
=
20
)
pfam_id
=
models
.
CharField
(
'
Pfam Family Identifier
'
,
max_length
=
20
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment