Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
from os import path

VERSION = (1, 0, '0b1')
VERSION = (1, 1, '0b1')
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))

Expand Down
1 change: 1 addition & 0 deletions varsome_api/models/elements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
from .uniprot import *
from .wustl import *
from .gwas import *
from .acmg import *
42 changes: 42 additions & 0 deletions varsome_api/models/elements/acmg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2018 Saphetor S.A.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from jsonmodels import models, fields

__author__ = "ckopanos"


class ACMGClassification(models.Base):
met_criteria = fields.BoolField()
name = fields.StringField(help_text="ACMG Classification Name")
user_explain = fields.ListField(items_types=(str,), help_text="Criteria explanation", required=False,
nullable=True)


class ACMGRule(models.Base):
pathogenic_subscore = fields.StringField(required=False, nullable=True)
benign_subscore = fields.StringField(required=False, nullable=True)
verdict = fields.StringField(required=False, nullable=True)


class ACMGVerdict(models.Base):
classifications = fields.ListField(items_types=(str,), help_text="Classification names", required=False,
nullable=True)
ACMG_rules = fields.EmbeddedField(ACMGRule)


class ACMG(models.Base):
classifications = fields.ListField(required=False, items_types=(ACMGClassification,),
help_text="ACMG Classifications")
verdict = fields.EmbeddedField(ACMGVerdict, nullable=True, required=False, help_text="ACMG Verdict")
5 changes: 4 additions & 1 deletion varsome_api/models/elements/sanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CosmicLicensedDrugEntry(models.Base):

class CosmicLicensedDetails(models.Base):
entry_type = fields.StringField(help_text="Entry type", required=False, nullable=True)
cosmic_id = fields.ListField(items_types=(str,), help_text="Cosmic ID", required=False, nullable=True)
cosmic_id = fields.ListField(items_types=(str, dict,), help_text="Cosmic ID", required=False, nullable=True)
pub_med_references = fields.ListField(items_types=(int,), help_text="PUBMED References", required=False,
nullable=True)
histology_freq = fields.ListField(items_types=(int, str, float), help_text="Histology frequency", required=False,
Expand Down Expand Up @@ -84,6 +84,9 @@ class CosmicLicensedDetails(models.Base):
class ComsicPublicDetails(models.Base):
num_samples = fields.IntField(help_text='Number of samples')
id = fields.StringField(help_text='Cosmic ID')
is_consistent = fields.BoolField(help_text='Cosmic ID is consistent across databases')




class CosmicPublic(models.Base):
Expand Down
3 changes: 1 addition & 2 deletions varsome_api/models/variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


from .fields import DictField
from .elements import *

Expand Down Expand Up @@ -58,6 +56,7 @@ class AnnotatedVariant(models.Base):
uniprot_variants = fields.ListField(required=False, items_types=(UniprotVariants,), help_text="UniProt variants")
wustl_civic = fields.ListField(required=False, items_types=(Civic,), help_text="CIViC")
gwas = fields.ListField(required=False, items_types=(GWAS,), help_text="GWAS")
acmg_annotation = fields.EmbeddedField(ACMG, required=False, nullable=True, help_text="ACMG Annotations")

@property
def genes(self):
Expand Down