Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/bcgsc/pori_ipr_python in…
Browse files Browse the repository at this point in the history
…to GERO-318_all_IPR-A_as_Approved_Therapies
  • Loading branch information
dustinbleile committed Apr 12, 2023
2 parents 40fd455 + e28404d commit b1b5940
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 7 deletions.
109 changes: 103 additions & 6 deletions ipr/content.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
],
"type": "string"
},
"description": {
"description": "Long description of the comparator",
"type": "string"
},
"name": {
"description": "comparator name",
"examples": [
Expand All @@ -76,6 +80,10 @@
"size": {
"description": "the number of samples included in the cohort/reference distribution",
"type": "number"
},
"version": {
"description": "version string",
"type": "string"
}
},
"required": [
Expand Down Expand Up @@ -111,6 +119,21 @@
"null"
]
},
"cnvState": {
"description": "displayed category name",
"example": "Homozygous Deletion",
"type": [
"string",
"null"
]
},
"comments": {
"description": "variant freeform comments",
"type": [
"string",
"null"
]
},
"end": {
"description": "the genomic end position of the copy segment this gene copy number was called from",
"type": [
Expand All @@ -123,6 +146,13 @@
"example": "KRAS",
"type": "string"
},
"germline": {
"description": "germline variant",
"type": [
"boolean",
"null"
]
},
"kbCategory": {
"default": null,
"description": "the graphkb copy variant vocabulary term this variant belongs to. By default only amplifications and deep deletions are matched",
Expand Down Expand Up @@ -152,6 +182,14 @@
"example": "HET",
"type": "string"
},
"library": {
"description": "Library id string",
"example": "P01234",
"type": [
"string",
"null"
]
},
"start": {
"description": "the genomic start position of the copy segment this gene copy number was called from",
"type": [
Expand Down Expand Up @@ -216,6 +254,13 @@
"string"
]
},
"comments": {
"description": "variant freeform comments",
"type": [
"string",
"null"
]
},
"diseaseFoldChange": {
"description": "the fold change with respect to the median of the disease expression comparator cohort",
"pattern": "^[-+]?inf$|",
Expand Down Expand Up @@ -293,6 +338,14 @@
}
]
},
"library": {
"description": "Library id string",
"example": "P01234",
"type": [
"string",
"null"
]
},
"primarySiteFoldChange": {
"description": "the fold change with respect to the median of the primary site expression comparator cohort",
"pattern": "^[-+]?inf$|",
Expand Down Expand Up @@ -637,6 +690,11 @@
"example": 1,
"type": "integer"
},
"pearson": {
"description": "pearson correlation",
"example": 0.48,
"type": "number"
},
"selected": {
"default": false,
"description": "Flag used to determine if this signature should be highlight on the main summary page of the report",
Expand Down Expand Up @@ -785,10 +843,12 @@
"example": "X",
"type": "string"
},
"detectedIn": {
"description": "the sample types this variant was detected in",
"example": "DNA/RNA",
"type": "string"
"comments": {
"description": "variant freeform comments",
"type": [
"string",
"null"
]
},
"endPosition": {
"description": "the genomic end poition of this variant",
Expand All @@ -803,6 +863,13 @@
"example": "KRAS",
"type": "string"
},
"germline": {
"description": "germline variant",
"type": [
"boolean",
"null"
]
},
"hgvsCds": {
"description": "HGVS coding sequence notation for this variant",
"example": "ENST0001:c.1234+3A>G",
Expand Down Expand Up @@ -830,6 +897,14 @@
"null"
]
},
"library": {
"description": "Library id string",
"example": "P01234",
"type": [
"string",
"null"
]
},
"ncbiBuild": {
"description": "the genome reference assembly build version",
"example": "GRCh37",
Expand Down Expand Up @@ -978,7 +1053,7 @@
"pattern": "^(\\w+:\\d+\\|\\w+:\\d+)?$",
"type": "string"
},
"cTermTranscript": {
"ctermTranscript": {
"default": null,
"description": "the 5' transcript name",
"example": "ENST0004.5",
Expand All @@ -987,6 +1062,13 @@
"null"
]
},
"comments": {
"description": "variant freeform comments",
"type": [
"string",
"null"
]
},
"conventionalName": {
"description": "cytogenetic descriptor",
"type": "string"
Expand Down Expand Up @@ -1029,14 +1111,29 @@
"pattern": "^((\\w|-)+)?$",
"type": "string"
},
"germline": {
"description": "germline variant",
"type": [
"boolean",
"null"
]
},
"highQuality": {
"description": "This structural variant has a high level of supporting evidence",
"type": [
"boolean",
"null"
]
},
"nTermTranscript": {
"library": {
"description": "Library id string",
"example": "P01234",
"type": [
"string",
"null"
]
},
"ntermTranscript": {
"default": null,
"description": "the 3' transcript name",
"example": "ENST0001.2",
Expand Down
17 changes: 17 additions & 0 deletions ipr/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
protein_letters_3to1.setdefault('Ter', '*')

SPECIFICATION = os.path.join(os.path.dirname(__file__), 'content.spec.json')
# content in the local specification should match the values in IPR_API_SPEC_JSON_URL
IPR_API_SPEC_JSON_URL = 'https://ipr-api.bcgsc.ca/api/spec.json'


# TODO: GERO-307 - use SPECIFICATION json to derive the variant required and optional details defined below

# 'cnvState' is for display
COPY_REQ = ['gene', 'kbCategory']
Expand All @@ -35,6 +40,9 @@
'size',
'log2Cna',
'cna',
'comments',
'library',
'germline',
]

SMALL_MUT_REQ = ['gene', 'proteinChange']
Expand All @@ -49,12 +57,14 @@
]
SMALL_MUT_OPTIONAL = [
'altSeq',
'comments',
'chromosome',
'endPosition',
'germline',
'hgvsCds',
'hgvsGenomic',
'hgvsProtein',
'library',
'ncbiBuild',
'normalAltCount',
'normalDepth',
Expand All @@ -81,13 +91,15 @@
'biopsySiteQC',
'biopsySiteZScore',
'biopsySitekIQR',
'comments',
'diseaseFoldChange',
'diseasekIQR',
'diseasePercentile',
'diseaseQC',
'diseaseZScore',
'expressionState',
'histogramImage',
'library',
'primarySiteFoldChange',
'primarySitekIQR',
'primarySitePercentile',
Expand Down Expand Up @@ -125,6 +137,11 @@
'frame',
'omicSupport',
'highQuality',
'comments',
'library',
# GERO-307 - tumourAltCount and tumourDepth are available but not rnaAltCount and rnaDepth
'tumourAltCount',
'tumourDepth',
]


Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ known_standard_library = requests

[metadata]
name = ipr
version = 3.6.0
version = 3.7.1
author_email = ipr@bcgsc.ca
author = ipr
maintainer_email = ipr@bcgsc.ca
Expand Down

0 comments on commit b1b5940

Please sign in to comment.