Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# 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 GnomADCoverage(models.Base):
version = fields.StringField(help_text="Version")
coverage_mean = fields.ListField(help_text="Mean coverage",
items_types=(float, type(None)), required=False, nullable=True)
coverage_median = fields.ListField(help_text="Median coverage",
items_types=(float, type(None)), required=False, nullable=True)
coverage_20_frequency = fields.ListField(help_text="Proportion of samples with over 20x",
items_types=(float, type(None)),
required=False, nullable=True)
class GnomAD(models.Base):
version = fields.StringField(help_text="Version")
ac = fields.IntField(help_text="Allele Count", required=False, nullable=True)
an = fields.IntField(help_text="Allele Number", required=False, nullable=True)
ac_adj = fields.FloatField(help_text="Allele Count", required=False, nullable=True)
an_adj = fields.FloatField(help_text="Allele Number", required=False, nullable=True)
af = fields.FloatField(help_text="Allele Frequency", required=False, nullable=True)
ac_afr = fields.IntField(help_text="Allele Count African", required=False, nullable=True)
ac_amr = fields.IntField(help_text="Allele Count American", required=False, nullable=True)
ac_asj = fields.IntField(help_text="Allele Count Ashkenazi Jewish", required=False, nullable=True)
ac_eas = fields.IntField(help_text="Allele Count East Asian", required=False, nullable=True)
ac_fin = fields.IntField(help_text="Allele Count European (Finnish)", required=False, nullable=True)
primary_site_freq = fields.ListField(items_types=(int, str, float), help_text="Primary site frequency", required=False, nullable=True)
description = fields.ListField(items_types=(str,), help_text="Description", required=False, nullable=True)
accession_number = fields.ListField(items_types=(str,), help_text="Accession number", required=False, nullable=True)
fathmm_prediction = fields.StringField(help_text="FATHMM prediction", required=False, nullable=True)
fathmm_score = fields.FloatField(help_text="FATHMM score", required=False, nullable=True)
num_entries = fields.IntField(help_text="Number of entries", required=False, nullable=True)
num_samples = fields.IntField(help_text="Number of samples", required=False, nullable=True)
gene = fields.ListField(items_types=(str,), help_text="Gene", required=False, nullable=True)
fathmm_mkl_coding_score = fields.FloatField(help_text="FATHMM_MKL coding score", required=False, nullable=True)
fathmm_mkl_coding_groups = fields.StringField(help_text="FATHMM_MKL coding groups", required=False, nullable=True)
fathmm_mkl_non_coding_score = fields.FloatField(help_text="FATHMM_MKL non coding score", required=False,
nullable=True)
fathmm_mkl_non_coding_groups = fields.StringField(help_text="FATHMM_MKL non coding groups", required=False,
nullable=True)
whole_exome_freq = fields.ListField(items_types=(str, int, float,), help_text="Whole exome frequency", required=False,
nullable=True)
whole_genome_reseq_freq = fields.ListField(items_types=(str, int, float,), help_text="Whole genome reseq frequency",
required=False, nullable=True)
resistance_mutation = fields.ListField(items_types=(str,), help_text="Resistance mutation", required=False,
nullable=True)
drug_entries = fields.ListField(items_types=(CosmicLicensedDrugEntry,), help_text="Drug entries", required=False,
nullable=True)
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')
mutationassessor_score = fields.ListField(items_types=(float,), help_text="MutationAssessor score",
required=False)
mutationassessor_score_rankscore = fields.ListField(items_types=(float,),
help_text="MutationAssessor rankscore", required=False,
nullable=True)
fathmm_mkl_coding_pred = fields.ListField(items_types=(str,),
help_text="FATHMM-MKL coding prediction", required=False, nullable=True)
fathmm_mkl_coding_score = fields.ListField(items_types=(float,), help_text="FATHMM-MKL coding score",
required=False)
fathmm_mkl_coding_rankscore = fields.ListField(items_types=(float,),
help_text="FATHMM-MKL coding rankscore", required=False,
nullable=True)
fathmm_pred = fields.ListField(items_types=(str,), help_text="FATHMM prediction", required=False, nullable=True)
fathmm_score = fields.ListField(items_types=(float,), help_text="FATHMM score",
required=False)
fathmm_converted_rankscore = fields.ListField(items_types=(float,), help_text="FATHMM converted rankscore",
required=False, nullable=True)
sift_converted_rankscore = fields.ListField(items_types=(float,), help_text="SIFT converted rankscore",
required=False)
metasvm_pred = fields.ListField(items_types=(str,), help_text="MetaSVM prediction",
required=False)
metasvm_score = fields.ListField(items_types=(float,), help_text="MetaSVM score", required=False, nullable=True)
metasvm_rankscore = fields.ListField(items_types=(float,), help_text="MetaSVM rankscore",
required=False)
metalr_pred = fields.ListField(items_types=(str,), help_text="MetalR prediction", required=False, nullable=True)
metalr_score = fields.ListField(items_types=(float,), help_text="MetalR score", required=False, nullable=True)
metalr_rankscore = fields.ListField(items_types=(float,), help_text="MetalR rankscore", required=False,
nullable=True)
provean_pred = fields.ListField(items_types=(str,), help_text="Provean prediction",
required=False)
provean_score = fields.ListField(items_types=(float,), help_text="Provean score",
required=False)
class TranscriptItem(models.Base):
name = fields.StringField(help_text="Transcript")
coding_impact = fields.StringField(help_text="Coding impact", required=False, nullable=True)
function = fields.ListField(help_text="Function", items_types=(str,), required=False, nullable=True)
hgvs = fields.StringField(required=False, help_text="HGVS cDNA level", nullable=True)
hgvs_p1 = fields.StringField(required=False, nullable=True)
hgvs_p3 = fields.StringField(required=False, nullable=True)
hgvs_notation = fields.StringField(help_text="HGVS notation", required=False, nullable=True)
location = fields.StringField(help_text="Location", required=False, nullable=True)
coding_location = fields.StringField(help_text="Coding location", required=False, nullable=True)
canonical = fields.BoolField(help_text="Canonical", required=False, nullable=True)
gene_symbol = fields.StringField(help_text="Gene symbol", required=False, nullable=True)
class Transcript(models.Base):
items = fields.ListField(help_text='Transcripts', items_types=(TranscriptItem,), required=False)
version = fields.StringField(help_text="Version")
num_entries = fields.IntField(help_text="Number of entries", required=False, nullable=True)
num_samples = fields.IntField(help_text="Number of samples", required=False, nullable=True)
gene = fields.ListField(items_types=(str,), help_text="Gene", required=False, nullable=True)
fathmm_mkl_coding_score = fields.FloatField(help_text="FATHMM_MKL coding score", required=False, nullable=True)
fathmm_mkl_coding_groups = fields.StringField(help_text="FATHMM_MKL coding groups", required=False, nullable=True)
fathmm_mkl_non_coding_score = fields.FloatField(help_text="FATHMM_MKL non coding score", required=False,
nullable=True)
fathmm_mkl_non_coding_groups = fields.StringField(help_text="FATHMM_MKL non coding groups", required=False,
nullable=True)
whole_exome_freq = fields.ListField(items_types=(str, int, float,), help_text="Whole exome frequency", required=False,
nullable=True)
whole_genome_reseq_freq = fields.ListField(items_types=(str, int, float,), help_text="Whole genome reseq frequency",
required=False, nullable=True)
resistance_mutation = fields.ListField(items_types=(str,), help_text="Resistance mutation", required=False,
nullable=True)
drug_entries = fields.ListField(items_types=(CosmicLicensedDrugEntry,), help_text="Drug entries", required=False,
nullable=True)
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):
version = fields.StringField(help_text="Version")
items = fields.ListField(items_types=(ComsicPublicDetails, ), help_text="Details", required=False, nullable=True)
def iterate_embedded_model_instances(self):
for name, field in self.iterate_over_set_fields():
if isinstance(field, fields.EmbeddedField):
subobjs = (getattr(self, name),)
elif isinstance(field, fields.ListField):
subobjs = getattr(self, name)
else:
continue
for subobj in subobjs:
if isinstance(subobj, ModelBase):
yield subobj
# 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 ThousandGenomes(models.Base):
version = fields.StringField(help_text="Version")
ac = fields.ListField(items_types=(int,), help_text="Allele Count", required=False, nullable=True)
af = fields.ListField(items_types=(float,), help_text="Allele Frequency", required=False, nullable=True)
an = fields.ListField(items_types=(int,), help_text="Allele Number", required=False, nullable=True)
ns = fields.ListField(items_types=(int,), help_text="Number of Samples", required=False, nullable=True)
afr_af = fields.ListField(items_types=(float,), help_text="Allele Frequency African", required=False, nullable=True)
amr_af = fields.ListField(items_types=(float,), help_text="Allele Frequency American", required=False,
nullable=True)
eas_af = fields.ListField(items_types=(float,), help_text="Allele Frequency East Asian", required=False,
nullable=True)
eur_af = fields.ListField(items_types=(float,), help_text="Allele Frequency European", required=False,
nullable=True)
sas_af = fields.ListField(items_types=(float,), help_text="Allele Frequency South Asian", required=False,
nullable=True)
main_data = fields.StringField(help_text="Main data point", required=False, nullable=True)
sift_prediction = fields.StringField(help_text="SIFT prediction", required=False, nullable=True)
phylop100way_vertebrate = fields.ListField(items_types=(float,), help_text="phyloP100way vertebrate",
required=False)
phylop46way_placental = fields.ListField(items_types=(float,), help_text="phyloP46way placental",
required=False)
phylop46way_primate = fields.ListField(items_types=(float,), help_text="phyloP46way primate",
required=False)
mutationtaster_converted_rankscore = fields.ListField(items_types=(float,),
help_text="MutationTaster converted rankscore",
required=False, nullable=True)
mutationassessor_pred = fields.ListField(items_types=(str,),
help_text="MutationAssessor prediction",
required=False)
mutationassessor_score = fields.ListField(items_types=(float,), help_text="MutationAssessor score",
required=False)
mutationassessor_score_rankscore = fields.ListField(items_types=(float,),
help_text="MutationAssessor rankscore", required=False,
nullable=True)
fathmm_mkl_coding_pred = fields.ListField(items_types=(str,),
help_text="FATHMM-MKL coding prediction", required=False, nullable=True)
fathmm_mkl_coding_score = fields.ListField(items_types=(float,), help_text="FATHMM-MKL coding score",
required=False)
fathmm_mkl_coding_rankscore = fields.ListField(items_types=(float,),
help_text="FATHMM-MKL coding rankscore", required=False,
nullable=True)
fathmm_pred = fields.ListField(items_types=(str,), help_text="FATHMM prediction", required=False, nullable=True)
fathmm_score = fields.ListField(items_types=(float,), help_text="FATHMM score",
required=False)
fathmm_converted_rankscore = fields.ListField(items_types=(float,), help_text="FATHMM converted rankscore",
required=False, nullable=True)
sift_converted_rankscore = fields.ListField(items_types=(float,), help_text="SIFT converted rankscore",
required=False)
mutationassessor_pred = fields.ListField(items_types=(str,),
help_text="MutationAssessor prediction",
required=False)
mutationassessor_score = fields.ListField(items_types=(float,), help_text="MutationAssessor score",
required=False)
mutationassessor_score_rankscore = fields.ListField(items_types=(float,),
help_text="MutationAssessor rankscore", required=False,
nullable=True)
fathmm_mkl_coding_pred = fields.ListField(items_types=(str,),
help_text="FATHMM-MKL coding prediction", required=False, nullable=True)
fathmm_mkl_coding_score = fields.ListField(items_types=(float,), help_text="FATHMM-MKL coding score",
required=False)
fathmm_mkl_coding_rankscore = fields.ListField(items_types=(float,),
help_text="FATHMM-MKL coding rankscore", required=False,
nullable=True)
fathmm_pred = fields.ListField(items_types=(str,), help_text="FATHMM prediction", required=False, nullable=True)
fathmm_score = fields.ListField(items_types=(float,), help_text="FATHMM score",
required=False)
fathmm_converted_rankscore = fields.ListField(items_types=(float,), help_text="FATHMM converted rankscore",
required=False, nullable=True)
sift_converted_rankscore = fields.ListField(items_types=(float,), help_text="SIFT converted rankscore",
required=False)
metasvm_pred = fields.ListField(items_types=(str,), help_text="MetaSVM prediction",
required=False)
metasvm_score = fields.ListField(items_types=(float,), help_text="MetaSVM score", required=False, nullable=True)
metasvm_rankscore = fields.ListField(items_types=(float,), help_text="MetaSVM rankscore",
required=False)
metalr_pred = fields.ListField(items_types=(str,), help_text="MetalR prediction", required=False, nullable=True)
metalr_score = fields.ListField(items_types=(float,), help_text="MetalR score", required=False, nullable=True)
metalr_rankscore = fields.ListField(items_types=(float,), help_text="MetalR rankscore", required=False,
nullable=True)
provean_pred = fields.ListField(items_types=(str,), help_text="Provean prediction",
class CosmicLicensedDetails(models.Base):
entry_type = fields.StringField(help_text="Entry type", 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,
nullable=True)
genome_wide_screen_freq = fields.ListField(items_types=(int, str, float), help_text="Histology frequency", required=False,
nullable=True)
loh_freq = fields.ListField(items_types=(int, str, float), help_text="LOH frequency", required=False, nullable=True)
age_freq = fields.ListField(items_types=(int, str, float), help_text="Age frequency", required=False, nullable=True)
zygosity_freq = fields.ListField(items_types=(int, str, float), help_text="Zygosity frequency", required=False,
nullable=True)
tumour_origin_freq = fields.ListField(items_types=(int, str, float,), help_text="Tumour original frequency", required=False,
nullable=True)
somatic_status_freq = fields.ListField(items_types=(int, str, float), help_text="Somatic status frequency", required=False,
nullable=True)
primary_site_freq = fields.ListField(items_types=(int, str, float), help_text="Primary site frequency", required=False, nullable=True)
description = fields.ListField(items_types=(str,), help_text="Description", required=False, nullable=True)
accession_number = fields.ListField(items_types=(str,), help_text="Accession number", required=False, nullable=True)
fathmm_prediction = fields.StringField(help_text="FATHMM prediction", required=False, nullable=True)
fathmm_score = fields.FloatField(help_text="FATHMM score", required=False, nullable=True)
num_entries = fields.IntField(help_text="Number of entries", required=False, nullable=True)
num_samples = fields.IntField(help_text="Number of samples", required=False, nullable=True)
gene = fields.ListField(items_types=(str,), help_text="Gene", required=False, nullable=True)
fathmm_mkl_coding_score = fields.FloatField(help_text="FATHMM_MKL coding score", required=False, nullable=True)
fathmm_mkl_coding_groups = fields.StringField(help_text="FATHMM_MKL coding groups", required=False, nullable=True)
fathmm_mkl_non_coding_score = fields.FloatField(help_text="FATHMM_MKL non coding score", required=False,
nullable=True)